clean up formatting

This commit is contained in:
bmFtZQ 2021-04-15 07:13:53 +08:00 committed by GitHub
parent 72fc5a3d76
commit 7f2019f2d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 300 additions and 367 deletions

View file

@ -1,27 +1,31 @@
/* Edge Style Tabs */
/* Edge Style Tab Shadows */
#nav-bar {
box-shadow: 0 -1px 2px -1px #0004 !important;
}
:root[lwthemetextcolor="bright"] #nav-bar {
box-shadow: 0 -1px 2px -1px #0006 !important;
}
.tabbrowser-tab[visuallyselected] .tab-background {
box-shadow: 0 2px 4px #0005, 0 -1px 2px -1px #0004 !important;
}
:root[lwthemetextcolor="bright"] .tabbrowser-tab[visuallyselected] .tab-background, :root[lwthemetextcolor="bright"] {
:root[lwthemetextcolor="bright"] .tabbrowser-tab[visuallyselected] .tab-background,
:root[lwthemetextcolor="bright"] {
box-shadow: 0 2px 4px #0008, 0 -1px 2px -1px #0006 !important;
}
#TabsToolbar > .toolbar-items {
#TabsToolbar>.toolbar-items {
margin-top: -2px !important;
}
.tabbrowser-tab,
#TabsToolbar-customization-target > :not(#tabbrowser-tabs),
#TabsToolbar-customization-target> :not(#tabbrowser-tabs),
#TabsToolbar #tabs-newtab-button,
/* no ::part workaround - may have side effects */
#scrollbutton-up[part="scrollbutton-up"]:not(.menupopup-scrollbutton),
#scrollbutton-down[part="scrollbutton-down"]:not(.menupopup-scrollbutton)
{
#scrollbutton-down[part="scrollbutton-down"]:not(.menupopup-scrollbutton) {
margin-top: 2px !important;
}

View file

@ -1,12 +1,11 @@
.tabbrowser-tab:not([pinned], [tabdrop-samewindow])
{
transition: min-width 150ms cubic-bezier(0, 1, .25, 1), max-width 150ms cubic-bezier(0, .9, .25 ,1) !important;
.tabbrowser-tab:not([pinned], [tabdrop-samewindow]) {
transition: min-width 150ms cubic-bezier(0, 1, .25, 1), max-width 150ms cubic-bezier(0, .9, .25, 1) !important;
}
:-moz-any(.titlebar-placeholder, .titlebar-spacer)[type=pre-tabs]
{
:-moz-any(.titlebar-placeholder, .titlebar-spacer)[type=pre-tabs] {
width: 0 !important;
}
#main-window {
background-color: var(--lwt-accent-color) !important;
}
@ -25,31 +24,26 @@
opacity: 0.9 !important;
}
#TabsToolbar
{
#TabsToolbar {
-moz-appearance: none !important;
-moz-default-appearance: none !important;
background-color: transparent !important;
color: var(--lwt-text-color) !important;
}
/* < FF 65, >= FF 65 */
:-moz-any(.titlebar-placeholder, .titlebar-spacer)
{
/* < FF 65, >= FF 65 */
:-moz-any(.titlebar-placeholder, .titlebar-spacer) {
border: 0 !important;
display: -moz-box !important;
}
:-moz-any(.titlebar-placeholder, .titlebar-spacer)[type=post-tabs]
{
:-moz-any(.titlebar-placeholder, .titlebar-spacer)[type=post-tabs] {
width: 48px !important;
transition: width .666s cubic-bezier(.4, 0, .2, 1) !important;
}
@media (max-width: 700px)
{
:-moz-any(.titlebar-placeholder, .titlebar-spacer)[type=post-tabs]
{
@media (max-width: 700px) {
:-moz-any(.titlebar-placeholder, .titlebar-spacer)[type=post-tabs] {
width: 8px !important;
}
}
@ -61,14 +55,12 @@
#TabsToolbar .tabbrowser-arrowscrollbox::part(scrollbutton-down),
/* no ::part workaround - may have side effects */
#scrollbutton-up[part="scrollbutton-up"]:not(.menupopup-scrollbutton),
#scrollbutton-down[part="scrollbutton-down"]:not(.menupopup-scrollbutton)
{
#scrollbutton-down[part="scrollbutton-down"]:not(.menupopup-scrollbutton) {
margin-top: calc((var(--tab-min-height) - var(--button-size)) / 2) !important;
margin-bottom: calc((var(--tab-min-height) - var(--button-size)) / 2) !important;
}
.tabbrowser-tab
{
.tabbrowser-tab {
min-height: var(--tab-min-height) !important;
overflow: visible !important;
font-size: 12px !important;
@ -77,37 +69,31 @@
padding: 0 !important;
}
.tabbrowser-tab[visuallyselected]
{
.tabbrowser-tab[visuallyselected] {
color: var(--toolbar-color) !important;
}
/* regular */
.tabbrowser-tab[fadein]:not([pinned]):not([style*="max-width"])
{
.tabbrowser-tab[fadein]:not([pinned]):not([style*="max-width"]) {
max-width: 240px !important;
}
/* neighbouring tabs should "pinch" together */
.tabbrowser-tab:not([last-visible-tab])
{
.tabbrowser-tab:not([last-visible-tab]) {
margin-inline-end: -.5px !important;
}
/* special case for pinned tabs when overflowing */
#tabbrowser-tabs:not([overflow]) .tabbrowser-tab:not([first-visible-tab]),
#tabbrowser-tabs[overflow] .tabbrowser-tab:not([first-visible-tab]):not([pinned])
{
#tabbrowser-tabs[overflow] .tabbrowser-tab:not([first-visible-tab]):not([pinned]) {
margin-inline-start: -.5px !important;
}
#tabbrowser-tabs[overflow] .tabbrowser-tab[pinned] .tab-background
{
#tabbrowser-tabs[overflow] .tabbrowser-tab[pinned] .tab-background {
margin: 0 -1px !important;
}
.tab-content
{
.tab-content {
position: relative !important;
overflow: hidden !important;
padding-inline-start: 11px !important;
@ -115,8 +101,7 @@
}
.tab-content::before,
.tab-content::after
{
.tab-content::after {
content: "" !important;
display: block !important;
position: absolute !important;
@ -128,13 +113,11 @@
transition: opacity var(--tab-transition-duration) var(--ease-basic) !important;
}
.tab-content::before
{
.tab-content::before {
left: 0 !important;
}
.tab-content::after
{
.tab-content::after {
right: 0 !important;
}
@ -143,52 +126,44 @@
.tab-icon-image,
.tab-sharing-icon-overlay,
.tab-icon-sound,
.tab-close-button
{
.tab-close-button {
margin-top: 0 !important;
}
.tabbrowser-tab::before,
.tabbrowser-tab::after
{
.tabbrowser-tab::after {
display: none !important;
}
/* tab background color */
.tabbrowser-tab
{
.tabbrowser-tab {
--tab-opacity: 0;
--tab-bgcolor: #fff;
--tab-transition-duration: .2s;
}
#TabsToolbar[brighttext] .tabbrowser-tab
{
#TabsToolbar[brighttext] .tabbrowser-tab {
--tab-opacity: 0;
--tab-bgcolor: #fff;
}
.tabbrowser-tab:not([selected=true]):hover,
.tabbrowser-tab[multiselected]:not([selected=true])
{
.tabbrowser-tab[multiselected]:not([selected=true]) {
--tab-opacity: .3;
}
#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: .06;
}
:-moz-any(#TabsToolbar) .tabbrowser-tab[visuallyselected]
{
:-moz-any(#TabsToolbar) .tabbrowser-tab[visuallyselected] {
--tab-bgcolor: var(--lwt-selected-tab-background-color, var(--toolbar-bgcolor));
--tab-opacity: 1;
}
.tab-background
{
.tab-background {
--tab-border-radius: 4px;
background: var(--tab-bgcolor) !important;
/* rounded top corners */
@ -203,8 +178,7 @@
margin: 0 !important;
}
.tab-line
{
.tab-line {
height: 8px !important;
border-radius: var(--tab-border-radius) var(--tab-border-radius) 0 0 !important;
clip-path: inset(0 0 6px 0);
@ -213,8 +187,7 @@
/* rounded bottom corners */
.tab-background::before,
.tab-background::after
{
.tab-background::after {
content: "" !important;
display: block !important;
position: absolute !important;
@ -226,55 +199,47 @@
clip-path: inset(0);
}
.tab-background::before
{
.tab-background::before {
border-bottom-right-radius: var(--tab-border-radius) !important;
left: 0 !important;
transform: translateX(-8px) !important;
box-shadow: 4px 4px 0 4px var(--tab-bgcolor) !important;
}
.tab-background::after
{
.tab-background::after {
border-bottom-left-radius: var(--tab-border-radius) !important;
right: 0 !important;
transform: translateX(8px) !important;
box-shadow: -4px 4px 0 4px var(--tab-bgcolor) !important;
}
.tabbrowser-tab[visuallyselected][style*=transform] + .tabbrowser-tab[style*=transform] .tab-content::after,
.tabbrowser-tab[visuallyselected][style*=transform]+.tabbrowser-tab[style*=transform] .tab-content::after,
.tabbrowser-tab[style*=transform]:not([visuallyselected]) .tab-content::before,
.tabbrowser-tab[style*=transform] + .tabbrowser-tab:not([visuallyselected]) .tab-content::before,
.tabbrowser-tab:not([visuallyselected]):not(:hover):not([multiselected]) + .tabbrowser-tab:not([visuallyselected]):not(:hover):not([multiselected]) .tab-content::before,
#tabbrowser-tabs[hasadjacentnewtabbutton]:not([overflow]) .tabbrowser-tab[last-visible-tab]:not([visuallyselected]):not(:hover):not([multiselected]) .tab-content::after
{
.tabbrowser-tab[style*=transform]+.tabbrowser-tab:not([visuallyselected]) .tab-content::before,
.tabbrowser-tab:not([visuallyselected]):not(:hover):not([multiselected])+.tabbrowser-tab:not([visuallyselected]):not(:hover):not([multiselected]) .tab-content::before,
#tabbrowser-tabs[hasadjacentnewtabbutton]:not([overflow]) .tabbrowser-tab[last-visible-tab]:not([visuallyselected]):not(:hover):not([multiselected]) .tab-content::after {
opacity: var(--tab-separator-opacity) !important;
}
#tabbrowser-tabs[overflow] .tabbrowser-tab[pinned] + .tabbrowser-tab:not([pinned]) .tab-content::before
{
#tabbrowser-tabs[overflow] .tabbrowser-tab[pinned]+.tabbrowser-tab:not([pinned]) .tab-content::before {
opacity: 0 !important;
}
.tabbrowser-tab[visuallyselected]
{
.tabbrowser-tab[visuallyselected] {
--tab-transition-duration: 0s;
}
.tab-throbber,
.tab-throbber-fallback
{
.tab-throbber-fallback {
margin-inline-end: 8px !important;
}
.tab-icon-image
{
.tab-icon-image {
margin: 0 !important;
opacity: 1 !important;
}
.tab-label-container
{
.tab-label-container {
margin-top: 0 !important;
opacity: 1 !important;
}
@ -284,23 +249,19 @@
}
.tabbrowser-tab[image] .tab-label-container,
.tabbrowser-tab:-moz-any([progress], [busy]) .tab-label-container
{
.tabbrowser-tab:-moz-any([progress], [busy]) .tab-label-container {
padding-inline-start: 10px !important;
}
.tabbrowser-tab[pinned]:-moz-any([soundplaying], [muted], [activemedia-blocked]) .tab-icon-image
{
.tabbrowser-tab[pinned]:-moz-any([soundplaying], [muted], [activemedia-blocked]) .tab-icon-image {
visibility: hidden !important;
}
.tabbrowser-tab[fadein] .tab-close-button
{
.tabbrowser-tab[fadein] .tab-close-button {
visibility: visible !important;
}
.tab-close-button
{
.tab-close-button {
list-style-image: url(close-tab.svg) !important;
width: 16px !important;
height: 16px !important;
@ -310,8 +271,7 @@
.tab-close-button,
.tab-icon-overlay[activemedia-blocked],
.tab-icon-sound
{
.tab-icon-sound {
border-radius: 2px !important;
color: inherit !important;
-moz-context-properties: fill, fill-opacity !important;
@ -324,32 +284,32 @@
.tab-close-button:hover,
.tab-icon-overlay:-moz-any([soundplaying], [muted], [activemedia-blocked]):hover,
.tab-icon-sound:hover
{
.tab-icon-sound:hover {
background-color: var(--toolbarbutton-hover-background) !important;
}
.tab-close-button:hover:active,
.tab-icon-overlay:-moz-any([soundplaying], [muted], [activemedia-blocked]):hover:active,
.tab-icon-sound:hover:active
{
.tab-icon-sound:hover:active {
background-color: var(--toolbarbutton-active-background) !important;
}
.tab-icon-overlay[pinned]
{
.tab-icon-overlay[pinned] {
margin: 0 !important;
margin-inline-start: -16px !important;
}
@keyframes rotate-360
{
0% { transform: rotate(0); }
100% { transform: rotate(1turn); }
@keyframes rotate-360 {
0% {
transform: rotate(0);
}
100% {
transform: rotate(1turn);
}
}
.tab-throbber
{
.tab-throbber {
-moz-context-properties: fill !important;
fill: currentColor !important;
background-image: url(spinner-busy.svg) !important;
@ -359,53 +319,44 @@
position: static !important;
}
.tab-throbber[progress]
{
.tab-throbber[progress] {
background-image: url(spinner-progress.svg) !important;
animation-direction: normal !important;
}
.tab-throbber::before
{
.tab-throbber::before {
display: none !important;
}
/* clipped tabs */
#tabbrowser-tabs[closebuttons=activetab] .tab-content:not([pinned])
{
#tabbrowser-tabs[closebuttons=activetab] .tab-content:not([pinned]) {
padding-inline-start: 8px !important;
}
#tabbrowser-tabs[closebuttons=activetab] .tabbrowser-tab:not([visuallyselected]) .tab-close-button
{
#tabbrowser-tabs[closebuttons=activetab] .tabbrowser-tab:not([visuallyselected]) .tab-close-button {
visibility: collapse !important;
}
#tabbrowser-tabs[closebuttons=activetab] .tab-label-container[textoverflow][labeldirection="ltr"]:not([pinned]),
#tabbrowser-tabs[closebuttons=activetab] .tab-label-container[textoverflow]:not([labeldirection]):-moz-locale-dir(ltr):not([pinned])
{
#tabbrowser-tabs[closebuttons=activetab] .tab-label-container[textoverflow]:not([labeldirection]):-moz-locale-dir(ltr):not([pinned]) {
mask-image: linear-gradient(to right, black 70%, transparent) !important;
}
#tabbrowser-tabs[closebuttons=activetab] .tab-label-container[textoverflow][labeldirection="rtl"]:not([pinned]),
#tabbrowser-tabs[closebuttons=activetab] .tab-label-container[textoverflow]:not([labeldirection]):-moz-locale-dir(rtl):not([pinned])
{
#tabbrowser-tabs[closebuttons=activetab] .tab-label-container[textoverflow]:not([labeldirection]):-moz-locale-dir(rtl):not([pinned]) {
mask-image: linear-gradient(to left, black 70%, transparent) !important;
}
.tab-content[pinned]
{
.tab-content[pinned] {
-moz-box-pack: center !important;
}
.tab-icon-image[pinned],
.tab-throbber[pinned]
{
.tab-throbber[pinned] {
margin: auto !important;
}
.tab-content[pinned]
{
.tab-content[pinned] {
width: 40px !important;
padding: 0 !important;
padding-inline-start: 12px !important;
@ -413,33 +364,27 @@
}
.tab-label-container[pinned],
.tab-close-button[pinned]
{
.tab-close-button[pinned] {
visibility: hidden !important;
}
/* close button / favicon is centered within 36px tab */
/* disabled for now because it's broken in recent version of Firefox */
@supports -moz-bool-pref("materialFox.reduceTabOverflow disabled")
{
#main-window
{
@supports -moz-bool-pref("materialFox.reduceTabOverflow disabled") {
#main-window {
/* same as Chrome */
min-width: 500px !important;
}
#tabbrowser-tabs[overflow] .tab-content
{
#tabbrowser-tabs[overflow] .tab-content {
-moz-box-pack: center !important;
}
#tabbrowser-tabs[overflow] .tab-icon-image
{
#tabbrowser-tabs[overflow] .tab-icon-image {
margin: auto !important;
}
#tabbrowser-tabs[overflow] .tab-content[image]:not([image^="chrome://branding/"]):not([pinned])
{
#tabbrowser-tabs[overflow] .tab-content[image]:not([image^="chrome://branding/"]):not([pinned]) {
width: 36px !important;
padding: 0 !important;
padding-inline-start: 0 !important;
@ -448,43 +393,36 @@
#tabbrowser-tabs[overflow] .tabbrowser-tab:not([visuallyselected]):not([pinned]) .tab-close-button,
#tabbrowser-tabs[overflow] .tabbrowser-tab[visuallyselected]:not([pinned]) :-moz-any(.tab-label-container, .tab-icon-image),
#tabbrowser-tabs[overflow] .tabbrowser-tab[image]:not([image^="chrome://branding/"]):not([pinned]) .tab-label-container
{
#tabbrowser-tabs[overflow] .tabbrowser-tab[image]:not([image^="chrome://branding/"]):not([pinned]) .tab-label-container {
display: none !important;
}
}
#tabbrowser-tabs #tabs-newtab-button
{
#tabbrowser-tabs #tabs-newtab-button {
margin-inline-start: 2px !important;
}
#tabbrowser-tabs[overflow] .tabbrowser-arrowscrollbox
{
#tabbrowser-tabs[overflow] .tabbrowser-arrowscrollbox {
border-radius: 8px 8px 0 0 !important;
background-color: rgba(0, 0, 0, .1) !important;
padding-inline-start: 0 !important;
}
#tabbrowser-tabs[overflow]
{
#tabbrowser-tabs[overflow] {
margin-inline-start: 8px !important;
}
#tabbrowser-tabs[overflow] .tabbrowser-tab[first-visible-tab]:not([pinned]),
#tabbrowser-tabs[overflow] .tabbrowser-tab[pinned] + .tabbrowser-tab:not([pinned]),
#tabbrowser-tabs:not([overflow]) .tabbrowser-tab[first-visible-tab]
{
#tabbrowser-tabs[overflow] .tabbrowser-tab[pinned]+.tabbrowser-tab:not([pinned]),
#tabbrowser-tabs:not([overflow]) .tabbrowser-tab[first-visible-tab] {
margin-inline-start: 8px !important;
}
#tabbrowser-tabs[overflow] .tabbrowser-tab[last-visible-tab]:not([pinned])
{
#tabbrowser-tabs[overflow] .tabbrowser-tab[last-visible-tab]:not([pinned]) {
margin-inline-end: 7px !important;
}
.tabbrowser-tab[usercontextid] > .tab-stack::after
{
.tabbrowser-tab[usercontextid]>.tab-stack::after {
content: "" !important;
position: absolute !important;
display: flex !important;
@ -501,13 +439,11 @@
transition-timing-function: var(--ease-out) !important;
}
.tab-bottom-line
{
.tab-bottom-line {
display: none !important;
}
.tabbrowser-tab[usercontextid][selected] > .tab-stack::after
{
.tabbrowser-tab[usercontextid][selected]>.tab-stack::after {
bottom: calc(100% - 9px) !important;
left: calc(100% - 9px) !important;
width: 6px !important;
@ -523,34 +459,27 @@
#tabbrowser-tabs::part(arrowscrollbox-overflow-end-indicator),
/* no ::part workaround - may have side effects */
spacer[part="overflow-start-indicator"],
spacer[part="overflow-end-indicator"]
{
spacer[part="overflow-end-indicator"] {
display: none !important;
}
.tab-loading-burst[bursting]::before
{
.tab-loading-burst[bursting]::before {
display: none !important;
}
/* high DPI adjustments */
@media (min--moz-device-pixel-ratio: 2)
{
.tabbrowser-tab::before
{
@media (min--moz-device-pixel-ratio: 2) {
.tabbrowser-tab::before {
transform: translateY(.5px) !important;
}
.tabbrowser-tab:last-of-type::after
{
.tabbrowser-tab:last-of-type::after {
transform: translate(-1px, .5px) !important;
}
/* macOS */
@media (-moz-mac-yosemite-theme)
{
.titlebar-buttonbox
{
@media (-moz-mac-yosemite-theme) {
.titlebar-buttonbox {
margin-top: .5px !important;
margin-bottom: -.5px !important;
}