clean up formatting

This commit is contained in:
bmFtZQ 2021-04-15 07:04:02 +08:00 committed by GitHub
parent 1df521b333
commit be93cbb620
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 337 additions and 331 deletions

View file

@ -1,6 +1,8 @@
/* High Contrast Theme */
@media (prefers-contrast) {
:root, :root #navigator-toolbox, findbar {
:root,
:root #navigator-toolbox,
findbar {
--highContrastTheme-border-color: #777 !important;
--highContrastTheme-urlbar-border-color: #000a;
@ -21,7 +23,9 @@
--panelview-toolbarbutton-active-color: var(--highContrastTheme-menuitem-selected-color) !important;
}
:root[lwthemetextcolor="bright"], :root[lwthemetextcolor="bright"] #navigator-toolbox, :root[lwthemetextcolor="bright"] findbar {
:root[lwthemetextcolor="bright"],
:root[lwthemetextcolor="bright"] #navigator-toolbox,
:root[lwthemetextcolor="bright"] findbar {
--highContrastTheme-border-color: #999 !important;
--highContrastTheme-urlbar-border-color: #fffa;
@ -33,14 +37,14 @@
--lwt-toolbarbutton-icon-fill-attention: #55befc !important;
}
menupopup, panel
{
menupopup,
panel {
--menu-border-radius: 2px;
--menu-border: 1px solid #fff;
--menu-shadow: 0 0 0 2px #000, 0 3px 10px 4px rgba(0, 0, 0, .3);
}
:root[lwthemetextcolor="bright"] :-moz-any(menupopup, panel)
{
:root[lwthemetextcolor="bright"] :-moz-any(menupopup, panel) {
--menu-border: 1px solid #fff;
--menu-shadow: 0 0 0 1px #000, 0 3px 10px 4px rgba(0, 0, 0, .3);
}
@ -53,8 +57,7 @@
menupopup menuitem:hover:not([disabled=true]),
menupopup menu:hover:not([disabled=true]),
.autocomplete-richlistitem:hover:not([disabled=true]):not([selected=true]),
#context-navigation .menuitem-iconic:hover:not([disabled])
{
#context-navigation .menuitem-iconic:hover:not([disabled]) {
background-color: var(--highContrastTheme-menuitem-selected-background) !important;
color: var(--highContrastTheme-menuitem-selected-color) !important;
}
@ -67,16 +70,24 @@
color: var(--highContrastTheme-menuitem-selected-color) !important;
}
#urlbar, #searchbar, hbox[anonid="findbar-textbox-wrapper"] {
#urlbar,
#searchbar,
hbox[anonid="findbar-textbox-wrapper"] {
box-shadow: 0 0 0 1px var(--highContrastTheme-urlbar-border-color) inset !important;
}
#urlbar:hover, #searchbar:hover, hbox[anonid="findbar-textbox-wrapper"]:hover:not(:focus-within) {
#urlbar:hover,
#searchbar:hover,
hbox[anonid="findbar-textbox-wrapper"]:hover:not(:focus-within) {
box-shadow: 0 0 0 1px var(--highContrastTheme-urlbar-border-color) inset, 0 0 0 1px var(--highContrastTheme-urlbar-border-color) inset !important;
}
#urlbar[open], #searchbar[open] {
#urlbar[open],
#searchbar[open] {
box-shadow: 0 0 0 1px #000, 0 3px 10px 4px rgba(0, 0, 0, .3), 0 0 0 1px #fff inset !important;
border-radius: 2px !important;
}
.urlbarView-row[selected] {
--urlbar-popup-url-color: var(--highContrastTheme-urlbar-URL-selected-color) !important;
}
@ -84,69 +95,51 @@
:is(:root, :root[lwthemetextcolor="bright"]) #nav-bar {
box-shadow: 0 -1px var(--highContrastTheme-border-color) !important;
}
:is(:root, :root[lwthemetextcolor="bright"]) .tabbrowser-tab[visuallyselected] .tab-background {
box-shadow: 0 0 0 1px var(--highContrastTheme-border-color) !important;
}
.tab-background::before
{
.tab-background::before {
box-shadow: -1px -1px 0 var(--highContrastTheme-border-color) inset, 4px 4px 0 4px var(--tab-bgcolor) !important;
}
.tab-background::after
{
.tab-background::after {
box-shadow: 1px -1px 0 var(--highContrastTheme-border-color) inset, -4px 4px 0 4px var(--tab-bgcolor) !important;
}
.tabbrowser-tab:not([selected=true]):hover,
.tabbrowser-tab[multiselected]:not([selected=true])
{
.tabbrowser-tab[multiselected]:not([selected=true]) {
--tab-opacity: .6;
}
#TabsToolbar[brighttext] .tabbrowser-tab:not([selected=true]):hover,
#TabsToolbar[brighttext] .tabbrowser-tab[multiselected]:not([selected=true])
{
#TabsToolbar[brighttext] .tabbrowser-tab[multiselected]:not([selected=true]) {
--tab-opacity: .2;
}
}
/* Reduce Motion */
@media (prefers-reduced-motion) {
.tabbrowser-tab
{
.tabbrowser-tab {
--tab-transition-duration: 0s !important;
}
#navigator-toolbox :-moz-any(.toolbarbutton-1, toolbarbutton.bookmark-item:not(.subviewbutton)),
.tab-close-button, .tab-icon-overlay[activemedia-blocked], .tab-icon-sound,
.tab-close-button,
.tab-icon-overlay[activemedia-blocked],
.tab-icon-sound,
.urlbar-icon,
#page-action-buttons>toolbarbutton,
.searchbar-search-button,
#tracking-protection-icon-box,
#identity-icon-box,
#identity-permission-box,
#tracking-protection-icon-box, #urlbar:hover #tracking-protection-icon-box, #tracking-protection-icon-container[open] #tracking-protection-icon-box, #tracking-protection-icon-box[active],
#urlbar:is(:hover, :not(:hover)) .urlbar-page-action:-moz-any(
#reader-mode-button,
#pageActionButton,
#pocket-button-box,
#pageAction-urlbar-screenshots_mozilla_org,
#pageAction-urlbar-sendToDevice,
#pageAction-urlbar-emailLink,
#pageAction-urlbar-copyURL,
#pageAction-urlbar-shareURL,
#pageAction-urlbar-addSearchEngine
),
.urlbar-page-action:-moz-any(
#reader-mode-button,
#pageActionButton,
#pocket-button-box,
#pageAction-urlbar-screenshots_mozilla_org,
#pageAction-urlbar-sendToDevice,
#pageAction-urlbar-emailLink,
#pageAction-urlbar-copyURL,
#pageAction-urlbar-shareURL,
#pageAction-urlbar-addSearchEngine
):-moz-any(:hover, [open], [readeractive]),
.urlbar-page-action:-moz-any(:hover, [open]) ~ .urlbar-page-action:-moz-any(
#reader-mode-button,
#tracking-protection-icon-box,
#urlbar:hover #tracking-protection-icon-box,
#tracking-protection-icon-container[open] #tracking-protection-icon-box,
#tracking-protection-icon-box[active],
#urlbar:is(:hover, :not(:hover)) .urlbar-page-action:-moz-any(#reader-mode-button,
#pageActionButton,
#pocket-button-box,
#pageAction-urlbar-screenshots_mozilla_org,
@ -155,8 +148,25 @@
#pageAction-urlbar-copyURL,
#pageAction-urlbar-shareURL,
#pageAction-urlbar-addSearchEngine),
#tracking-protection-icon-container[open] ~ #page-action-buttons .urlbar-page-action:-moz-any(
#reader-mode-button,
.urlbar-page-action:-moz-any(#reader-mode-button,
#pageActionButton,
#pocket-button-box,
#pageAction-urlbar-screenshots_mozilla_org,
#pageAction-urlbar-sendToDevice,
#pageAction-urlbar-emailLink,
#pageAction-urlbar-copyURL,
#pageAction-urlbar-shareURL,
#pageAction-urlbar-addSearchEngine):-moz-any(:hover, [open], [readeractive]),
.urlbar-page-action:-moz-any(:hover, [open])~.urlbar-page-action:-moz-any(#reader-mode-button,
#pageActionButton,
#pocket-button-box,
#pageAction-urlbar-screenshots_mozilla_org,
#pageAction-urlbar-sendToDevice,
#pageAction-urlbar-emailLink,
#pageAction-urlbar-copyURL,
#pageAction-urlbar-shareURL,
#pageAction-urlbar-addSearchEngine),
#tracking-protection-icon-container[open]~#page-action-buttons .urlbar-page-action:-moz-any(#reader-mode-button,
#pageActionButton,
#pocket-button-box,
#pageAction-urlbar-screenshots_mozilla_org,
@ -166,8 +176,7 @@
#pageAction-urlbar-shareURL,
#pageAction-urlbar-addSearchEngine),
hbox[anonid="findbar-textbox-wrapper"] toolbarbutton,
hbox[anonid="findbar-textbox-wrapper"]
{
hbox[anonid="findbar-textbox-wrapper"] {
transition-duration: 0s, 0s, 0s, 0s, 0s !important;
}
}

View file

@ -1,8 +1,7 @@
/* Light Mode */
:root:not([style]),
:root:not([lwtheme]),
:root[style*="--lwt-accent-color:rgb(227, 228, 230); --lwt-text-color:rgba(24, 25, 26);"]
{
:root[style*="--lwt-accent-color:rgb(227, 228, 230); --lwt-text-color:rgba(24, 25, 26);"] {
/* accentcolor */
--lwt-accent-color: #cecece !important;
@ -12,11 +11,13 @@
/* toolbar */
--toolbar-bgcolor: #f7f7f7 !important;
/* tab background (unset to match toolbar-bgcolor) */
--lwt-selected-tab-background-color: unset !important;
/* toolbar_text */
--toolbar-color: #000 !important;
/* toolbar_bottom_separator */
--toolbox-border-bottom-color: #d2d2d2 !important; /* legacy */
--chrome-content-separator-color: #d2d2d2 !important;
/* icons */
@ -49,9 +50,9 @@
--toolbar-field-focus-border-color: #0078d4a0 !important;
--private-browsing-indicator: #0078d4 !important;
}
/* Dark Mode */
:root[style*="--lwt-accent-color:rgb(12, 12, 13); --lwt-text-color:rgba(249, 249, 250);"]
{
:root[style*="--lwt-accent-color:rgb(12, 12, 13); --lwt-text-color:rgba(249, 249, 250);"] {
/* accentcolor */
--lwt-accent-color: #1b1b1b !important;
@ -61,11 +62,15 @@
/* toolbar */
--toolbar-bgcolor: #3b3b3b !important;
/* tab background (unset to match toolbar-bgcolor) */
--lwt-selected-tab-background-color: unset !important;
/* toolbar_text */
--toolbar-color: #fff !important;
/* toolbar_bottom_separator */
--toolbox-border-bottom-color: #5B5B5B !important; /* legacy */
--toolbox-border-bottom-color: #5B5B5B !important;
/* legacy */
--chrome-content-separator-color: #5B5B5B !important;
/* icons */
@ -127,8 +132,7 @@
/* Sidebar Light Mode */
:-moz-any(#sidebar-box, #sidebar),
:-moz-any(.sidebar-panel, body)
{
:-moz-any(.sidebar-panel, body) {
/* sidebar */
--sidebar-background-color: #f5f5f5 !important;
--lwt-sidebar-background-color: var(--sidebar-background-color) !important;
@ -139,9 +143,8 @@
}
/* Sidebar Dark Mode */
:-moz-any(#sidebar-box, #sidebar)[style*="--sidebar-background-color:rgb(56, 56, 61);"], :-moz-any(.sidebar-panel, body)[style*="--lwt-sidebar-background-color:rgb(56, 56, 61);"],
:-moz-any(.sidebar-panel, body)[style*="--lwt-sidebar-background-color:rgb(56, 56, 61);"]
{
:-moz-any(#sidebar-box, #sidebar)[style*="--sidebar-background-color:rgb(56, 56, 61);"],
:-moz-any(.sidebar-panel, body)[style*="--lwt-sidebar-background-color:rgb(56, 56, 61);"] {
/* sidebar */
--sidebar-background-color: #3b3b3b !important;
--lwt-sidebar-background-color: var(--sidebar-background-color) !important;
@ -152,15 +155,13 @@
}
/* Urlbar Button Backgrounds Light Mode */
:-moz-any(#urlbar, #searchbar)
{
:-moz-any(#urlbar, #searchbar) {
--toolbarbutton-hover-background: #0001 !important;
--toolbarbutton-active-background: #0002 !important;
}
/* Urlbar Button Backgrounds Dark Mode */
:root:-moz-lwtheme-brighttext :-moz-any(#urlbar, #searchbar)
{
:root:-moz-lwtheme-brighttext :-moz-any(#urlbar, #searchbar) {
--toolbarbutton-hover-background: #fff1 !important;
--toolbarbutton-active-background: #fff2 !important;
}

View file

@ -6,6 +6,7 @@
transition-duration: 200ms !important;
transition-timing-function: cubic-bezier(1, 0, 0, 1) !important;
}
:-moz-any(.tabbrowser-tab:hover:hover, .tabbrowser-tab[visuallyselected]) .tab-close-button {
transform: none !important;
margin-inline-start: 0 !important;

View file

@ -2,17 +2,17 @@
.toolbarbutton-icon,
.toolbarbutton-badge-stack,
#nav-bar .toolbarbutton-1
{
#nav-bar .toolbarbutton-1 {
transition-duration: 0.1s !important;
transition-property: width, padding, border !important;
}
:root:not([customizing]) #navigator-toolbox:not(:hover) > #nav-bar:not([urlbar-exceeds-toolbar-bounds="true"]) .toolbarbutton-1:not(.webextension-browser-action, [open], [checked]) :-moz-any(.toolbarbutton-icon, .toolbarbutton-badge-stack)
{
width: 0 !important; padding: 0 !important;
:root:not([customizing]) #navigator-toolbox:not(:hover)>#nav-bar:not([urlbar-exceeds-toolbar-bounds="true"]) .toolbarbutton-1:not(.webextension-browser-action, [open], [checked]) :-moz-any(.toolbarbutton-icon, .toolbarbutton-badge-stack) {
width: 0 !important;
padding: 0 !important;
}
:root:not([customizing]) #navigator-toolbox:not(:hover) > #nav-bar:not([urlbar-exceeds-toolbar-bounds="true"]) .toolbarbutton-1:not(.webextension-browser-action, [open], [checked])
{
:root:not([customizing]) #navigator-toolbox:not(:hover)>#nav-bar:not([urlbar-exceeds-toolbar-bounds="true"]) .toolbarbutton-1:not(.webextension-browser-action, [open], [checked]) {
border-width: 0 !important;
}

View file

@ -1,12 +1,11 @@
/* (BUGGY: USE AT OWN RISK!) Swap Account icon and Overflow icon (must be placed next to each other) */
@media (min-width: 687px) {
:root:not([customizing]) #nav-bar-overflow-button
{
:root:not([customizing]) #nav-bar-overflow-button {
transform: translateX(-44px);
}
:root:not([customizing]) #fxa-toolbar-menu-button
{
:root:not([customizing]) #fxa-toolbar-menu-button {
transform: translateX(44px);
}
}

View file

@ -1,26 +1,22 @@
/* (MACOS ONLY!) Enable window vibrancy behind tabs */
#navigator-toolbox:not(:-moz-window-inactive)
{
#navigator-toolbox:not(:-moz-window-inactive) {
background-color: #0001 !important;
}
#main-window[lwthemetextcolor="bright"] #navigator-toolbox:not(:-moz-window-inactive)
{
#main-window[lwthemetextcolor="bright"] #navigator-toolbox:not(:-moz-window-inactive) {
background-color: #1114 !important;
}
#main-window
{
#main-window {
appearance: -moz-mac-vibrant-titlebar-light !important;
}
#main-window[lwthemetextcolor="bright"]
{
#main-window[lwthemetextcolor="bright"] {
appearance: -moz-mac-vibrant-titlebar-dark !important;
}
:-moz-any(#main-window, #navigator-toolbox):-moz-any([inFullscreen="true"], :-moz-window-inactive)
{
:-moz-any(#main-window, #navigator-toolbox):-moz-any([inFullscreen="true"], :-moz-window-inactive) {
appearance: none !important;
background-color: var(--lwt-accent-color) !important;
}