Skip to content

Commit

Permalink
Merge pull request #9 from PROxZIMA/theme-selection
Browse files Browse the repository at this point in the history
Theme selection
  • Loading branch information
PROxZIMA authored Oct 18, 2021
2 parents 7e2432b + 33093be commit 8723295
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 21 deletions.
21 changes: 14 additions & 7 deletions css/library.css
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,18 @@

/* These change the odd rows of the lists */
#placeContent tree,
#placeContent treechildren:not(.autocomplete-treebody)::-moz-tree-row(odd),
#placeContent treechildren:not(.autocomplete-treebody)::-moz-tree-row(hover) {
background-color: var(--back-color2) !important
treechildren::-moz-tree-row(odd),
treechildren::-moz-tree-row(hover) {
background-color: var(--back-color2) !important;
color: var(--text-color2) !important;
}

#placeContent treechildren:not(.autocomplete-treebody)::-moz-tree-row(selected) {
background-color: var(--back-color1) !important
treechildren::-moz-tree-row(selected, focus) {
background-color: var(--back-color1) !important;
color: var(--text-color1) !important;
}

#placeContent treechildren::-moz-tree-cell {
treechildren::-moz-tree-cell {
border-right: 0px dotted rgba(0,0,0,0.4) !important
}

Expand Down Expand Up @@ -422,4 +424,9 @@
color: var(--text-color2) !important;
}

}
#detailsPane {
background-color: var(--back-color2);
margin-top: 5px;
}

}
18 changes: 13 additions & 5 deletions css/popups.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ menupopup #contentAreaContextMenu {
}

menupopup {
padding: 11px 14px 0 !important;
padding: 11px 14px 19px 14px !important;
margin: -19px -14px 0 !important;
}

Expand Down Expand Up @@ -49,7 +49,7 @@ menupopup menu,
color: inherit !important;
fill-opacity: initial !important;
border-radius: 6px !important;
transition: all 100ms !important;
transition: background-color 100ms !important;
}

menupopup menuitem:hover:not([disabled=true]),
Expand All @@ -73,7 +73,16 @@ menupopup menu[disabled=true],

:is(panel, menupopup)::part(content),
.panel-arrowcontainer slot{
background: none !important;
background: var(--back-color2) !important;
border: 0 !important;
box-shadow: 0 5px 5px -3px rgba(0,0,0,.2),
0 8px 10px 1px rgba(0,0,0,.14),
0 3px 14px 2px rgba(0,0,0,.12) !important;
}

:is(panel, menupopup)::part(content),
#PopupAutoComplete slot{
background: var(--back-color2) !important;
border: 0 !important;
box-shadow: 0 5px 5px -3px rgba(0,0,0,.2),
0 8px 10px 1px rgba(0,0,0,.14),
Expand Down Expand Up @@ -220,7 +229,6 @@ panel[type="autocomplete-richlistbox"] > .autocomplete-richlistbox {
0 5px 5px -3px rgba(0,0,0,.2),
0 8px 10px 1px rgba(0,0,0,.14),
0 3px 14px 2px rgba(0,0,0,.12) !important;
min-height: 45px !important;
}

/* search panel gets special treatment; it has multiple children */
Expand Down Expand Up @@ -289,7 +297,7 @@ panelview {
background: var(--back-color1) !important;
}

panelview > toolbarseparator{
#editBookmarkPanel > #editBookmarkHeaderSeparator, #editBookmarkPanel > .panel-subview-body > #editBookmarkSeparator, panelview > toolbarseparator{
display: none !important;
}

Expand Down
3 changes: 0 additions & 3 deletions css/reddit.css
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,6 @@ IN THE SOFTWARE.
.commentarea .usertext {
background: var(--gray-0) !important;
}
.usertext .md a {
color: var(--text-normal) !important;
}
.panestack-title .title {
color: var(--text-normal) !important;
}
Expand Down
2 changes: 1 addition & 1 deletion css/responsiveNavbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
position: fixed !important;
line-height: 0;
/* max-height: var(--tab-min-height) !important;*/
z-index: 1;
z-index: 2;
pointer-events: none;
background: var(--back-color1) !important;
}
Expand Down
30 changes: 25 additions & 5 deletions userContent.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
--gtk-color: #d700d2;

}

/* Default theme set to light theme */
/*================ LIGHT THEME ================*/

:root,
:root[style*="--lwt-accent-color: rgb(227, 228, 230);"],
:root[style*="--lwt-accent-color: rgb(240, 240, 244);"],
:root[style*="--newtab-background-color: rgba(249, 249, 251, 1);"],
Expand All @@ -39,14 +42,27 @@
--text-color2: var(--dark-color6);
--text-color3: var(--dark-color7);
}

/* Theme for browser webpages */
@media (-moz-toolbar-prefers-color-scheme: dark) {
:root {
--back-color1: var(--dark-color1);
--back-color2: var(--dark-color2);
--back-color3: var(--dark-color3);
--back-color4: var(--dark-color4);

--text-color1: var(--light-color5);
--text-color2: var(--light-color6);
--text-color3: var(--light-color7);
}
}

/*================ DARK THEME ================*/

:root:not([style]),
:root[style*="--lwt-accent-color: rgb(28, 27, 34);"],
:root[style*="--lwt-accent-color: rgb(12, 12, 13);"],
:root[style*="--newtab-background-color: rgba(43, 42, 51, 1);"],
:root[style*="min-width: 30em;"],
:root[style*="min-width: 26em;"],
:root[class*="theme-dark"],
:root[privatebrowsingmode=temporary] {
--back-color1: var(--dark-color1);
--back-color2: var(--dark-color2);
Expand All @@ -64,6 +80,8 @@





@-moz-document url-prefix(chrome://),
url(https://www.mozilla.org/credits/),
url-prefix(https://addons.mozilla.org),
Expand Down Expand Up @@ -292,8 +310,10 @@ url-prefix(view-source:) {
--field-bg-color: var(--back-color1) !important;
}

.canvasWrapper > canvas {
filter: invert(1) !important;
@media (-moz-toolbar-prefers-color-scheme: dark) {
.canvasWrapper > canvas {
filter: invert(1) !important;
}
}

.dropdownToolbarButton > select {
Expand Down

0 comments on commit 8723295

Please sign in to comment.