diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 05:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 05:47:55 +0000 |
commit | 31d6ff6f931696850c348007241195ab3b2eddc7 (patch) | |
tree | 615cb1c57ce9f6611bad93326b9105098f379609 /platform/mv3/extension/css | |
parent | Initial commit. (diff) | |
download | ublock-origin-31d6ff6f931696850c348007241195ab3b2eddc7.tar.xz ublock-origin-31d6ff6f931696850c348007241195ab3b2eddc7.zip |
Adding upstream version 1.55.0+dfsg.upstream/1.55.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'platform/mv3/extension/css')
-rw-r--r-- | platform/mv3/extension/css/dashboard-common.css | 52 | ||||
-rw-r--r-- | platform/mv3/extension/css/dashboard.css | 74 | ||||
-rw-r--r-- | platform/mv3/extension/css/filtering-mode.css | 92 | ||||
-rw-r--r-- | platform/mv3/extension/css/popup.css | 276 | ||||
-rw-r--r-- | platform/mv3/extension/css/settings.css | 192 |
5 files changed, 686 insertions, 0 deletions
diff --git a/platform/mv3/extension/css/dashboard-common.css b/platform/mv3/extension/css/dashboard-common.css new file mode 100644 index 0000000..41d6416 --- /dev/null +++ b/platform/mv3/extension/css/dashboard-common.css @@ -0,0 +1,52 @@ +h2, h3 { + margin: 1em 0; + } +h2 { + font-size: 18px; + } +h3 { + font-size: 16px; + } +a { + text-decoration: none; + } +.fa-icon.info { + color: var(--info0-ink); + fill: var(--info0-ink); + font-size: 115%; + } +.fa-icon.info:hover { + transform: scale(1.25); + } +.fa-icon.info.important { + color: var(--info2-ink); + fill: var(--info2-ink); + } +.fa-icon.info.very-important { + color: var(--info3-ink); + fill: var(--info3-ink); + } +input[type="number"] { + width: 5em; + } +@media (max-height: 640px), (max-height: 800px) and (max-width: 480px) { + .body > p, + .body > ul { + margin: 0.5em 0; + } + .vverbose { + display: none !important; + } + } +/** + On mobile device, the on-screen keyboard may take up + so much space that it overlaps the content being edited. + The rule below makes it possible to scroll the edited + content within view. +*/ +:root.mobile { + overflow: auto; + } +:root.mobile body { + min-height: 600px; + } diff --git a/platform/mv3/extension/css/dashboard.css b/platform/mv3/extension/css/dashboard.css new file mode 100644 index 0000000..e98bcc9 --- /dev/null +++ b/platform/mv3/extension/css/dashboard.css @@ -0,0 +1,74 @@ +body { + align-items: center; + box-sizing: border-box; + display: flex; + flex-direction: column; + } +body > * { + width: min(640px, 100%); + } +#dashboard-nav { + background-color: var(--surface-1); + border: 0; + border-bottom: 1px solid var(--border-1); + display: flex; + flex-shrink: 0; + flex-wrap: wrap; + overflow-x: hidden; + padding: 0; + position: sticky; + top: 0; + z-index: 100; + } +.tabButton { + background-color: transparent; + border: 0; + border-bottom: 3px solid transparent; + border-radius: 0; + color: var(--dashboard-tab-ink); + fill: var(--dashboard-tab-ink); + font-family: var(--font-family); + font-size: var(--font-size); + padding: 0.7em 1.4em calc(0.7em - 3px); + text-decoration: none; + white-space: nowrap; + } +.tabButton:focus { + outline: 0; + } +.tabButton:hover { + background-color: var(--dashboard-tab-hover-surface); + border-bottom-color: var(--dashboard-tab-hover-border); + } + +body[data-pane="settings"] #dashboard-nav .tabButton[data-pane="settings"], +body[data-pane="about"] #dashboard-nav .tabButton[data-pane="about"] { + background-color: var(--dashboard-tab-active-surface); + border-bottom: 3px solid var(--dashboard-tab-active-ink); + color: var(--dashboard-tab-active-ink); + fill: var(--dashboard-tab-active-ink); + } + +body > section { + display: none; + } +body[data-pane="settings"] > section[data-pane="settings"], +body[data-pane="about"] > section[data-pane="about"] { + display: block; + } + +/* high dpi devices */ +:root.hidpi .tabButton { + font-family: Metropolis, sans-serif; + font-weight: 600; + letter-spacing: 0.5px; + } + +/* touch-screen devices */ +:root.mobile #dashboard-nav { + flex-wrap: nowrap; + overflow-x: auto; + } +:root.mobile #dashboard-nav .logo { + display: none; + } diff --git a/platform/mv3/extension/css/filtering-mode.css b/platform/mv3/extension/css/filtering-mode.css new file mode 100644 index 0000000..fecb1ac --- /dev/null +++ b/platform/mv3/extension/css/filtering-mode.css @@ -0,0 +1,92 @@ +.filteringModeSlider { + align-items: center; + display: flex; + height: 60px; + justify-content: center; + position: relative; + width: 240px; + } + +.filteringModeButton { + background-color: var(--surface-1); + box-sizing: border-box; + border-radius: 30% 15% / 15% 30%; + height: 100%; + position: absolute; + width: 25%; + z-index: 10; + } + +.filteringModeButton > div { + background-color: var(--accent-surface-1); + border: 4px solid var(--accent-surface-1); + border-radius: inherit; + box-sizing: border-box; + height: calc(100% - 2px); + margin: 1px; + width: calc(100% - 2px); + } + +.filteringModeSlider.moving .filteringModeButton > div, +.filteringModeButton > div:hover { + filter: brightness(0.9); + } + +.filteringModeSlider[data-level="0"] .filteringModeButton > div { + background-color: var(--surface-2); + border-color: var(--surface-2); + } + +.filteringModeSlider span[data-level] { + background-color: var(--accent-surface-1); + display: inline-flex; + height: 30%; + margin-left: 1px; + width: 25%; + } + +.filteringModeSlider.moving span[data-level] { + pointer-events: none; + } + +.filteringModeSlider[data-level="0"] .filteringModeButton { + left: 0; + } +.filteringModeSlider[data-level="1"] .filteringModeButton { + left: 25%; + } +.filteringModeSlider[data-level="2"] .filteringModeButton { + left: 50%; + } +.filteringModeSlider[data-level="3"] .filteringModeButton { + left: 75%; + } +[dir="rtl"] .filteringModeSlider[data-level="0"] .filteringModeButton { + left: 75%; + } +[dir="rtl"] .filteringModeSlider[data-level="1"] .filteringModeButton { + left: 50%; + } +[dir="rtl"] .filteringModeSlider[data-level="2"] .filteringModeButton { + left: 25%; + } +[dir="rtl"] .filteringModeSlider[data-level="3"] .filteringModeButton { + left: 0; + } + + +.filteringModeSlider[data-level="0"] span[data-level] { + background-color: var(--surface-2); + } + +.filteringModeSlider[data-level="1"] span[data-level]:nth-of-type(1) ~ span[data-level] { + background-color: var(--surface-2); + } + +.filteringModeSlider[data-level="2"] span[data-level]:nth-of-type(2) ~ span[data-level] { + background-color: var(--surface-2); + } + +.filteringModeSlider[data-level]:not(.moving) span[data-level]:hover { + filter: brightness(0.9); + } diff --git a/platform/mv3/extension/css/popup.css b/platform/mv3/extension/css/popup.css new file mode 100644 index 0000000..385a051 --- /dev/null +++ b/platform/mv3/extension/css/popup.css @@ -0,0 +1,276 @@ + /* External CSS values override */ +.fa-icon.fa-icon-badged > .fa-icon-badge { + bottom: auto; + top: -20%; + } + +:root body, +:root.mobile body { + --font-size: 14px; + --popup-gap: var(--font-size); + --popup-gap-thin: calc(0.5 * var(--popup-gap)); + --popup-gap-extra-thin: calc(0.25 * var(--popup-gap)); + --popup-main-min-width: 18em; + --popup-firewall-min-width: 30em; + --popup-rule-cell-width: 5em; + font-size: var(--font-size); + line-height: 20px; + min-width: 100%; + } +:root body.loading { + opacity: 0; + } +a { + color: var(--ink-1); + fill: var(--ink-1); + text-decoration: none; + } +:focus { + outline: 0; + } + +#main { + align-self: flex-start; + display: flex; + flex-direction: column; + max-width: 340px; + min-width: 100%; + } +:root.portrait #main { + align-self: inherit; + } +hr { + border: 0; + border-top: 1px solid var(--hr-ink); + margin: 0; + padding: 0; + } + +#hostname { + align-items: center; + background-color: var(--popup-toolbar-surface); + display: flex; + justify-content: center; + min-height: calc(var(--font-size) * 3); + padding: 0 var(--popup-gap-extra-thin); + text-align: center; + word-break: break-all; + } +#hostname > span { + word-break: break-all; + } +#hostname > span + span { + font-weight: 600; + } + +#filteringModeText { + color: var(--ink-3); + margin: var(--default-gap-small); + margin-top: 0; + text-align: center; + text-transform: lowercase; + } +#filteringModeText > span { + color: var(--accent-surface-1); + } +#filteringModeText > span:nth-of-type(2) { + display: none; + } +#filteringModeText > span:nth-of-type(2):not(:empty) { + display: inline; + } +#filteringModeText > span:nth-of-type(2):not(:empty)::before { + content: '\2002\2192\2002'; + } +[dir="rtl"] #filteringModeText > span:nth-of-type(2):not(:empty)::before { + content: '\2002\2190\2002'; + } + +.filteringModeSlider { + align-self: center; + margin: var(--popup-gap); + width: calc(var(--popup-main-min-width) - 1em); + } + +.rulesetTools { + background-color: transparent; + border: 0; + box-sizing: border-box; + display: flex; + flex-direction: column; + justify-content: space-evenly; + width: 25%; + } +.rulesetTools [id] { + background-color: var(--popup-ruleset-tool-surface); + border-radius: 4px; + cursor: pointer; + fill: var(--popup-ruleset-tool-ink); + flex-grow: 1; + font-size: 2.2em; + padding: 0; + visibility: hidden; + } +.rulesetTools [id]:not(:first-of-type) { + margin-block-start: 1px; + } +.rulesetTools [id] > svg { + fill: var(--ink-4); + } +body.needReload #refresh { + visibility: visible; + } + +#rulesetStats { + padding: 0 var(--popup-gap-thin); + } +#rulesetStats .rulesetDetails h1 { + font-size: 1em; + font-weight: normal; + margin: 0.5em 0 0.25em 0; + } +#rulesetStats .rulesetDetails p { + color: var(--ink-2); + font-size: var(--font-size-smaller); + margin: 0.25em 0 0.5em 0.5em; + } + +.itemRibbon { + column-gap: var(--popup-gap); + display: grid; + grid-auto-columns: 1fr; + grid-auto-flow: column; + grid-template: auto / 1fr 1fr; + margin: var(--popup-gap); + } +.itemRibbon > span + span { + text-align: end; + } + +.toolRibbon { + align-items: center; + background-color: var(--popup-toolbar-surface); + display: grid; + grid-auto-columns: 1fr; + grid-auto-flow: column; + grid-template: auto / repeat(5, 1fr); + justify-items: center; + white-space: normal; + } +.toolRibbon .tool { + cursor: pointer; + display: flex; + flex-direction: column; + font-size: 1.4em; + min-width: 32px; + padding: var(--popup-gap) + var(--popup-gap-thin); + unicode-bidi: embed; + visibility: hidden; + } +.toolRibbon .tool:hover { + color: var(--ink-1); + fill: var(--ink-1); + } +.toolRibbon .tool.enabled { + visibility: visible; + } +.toolRibbon .tool .caption { + font: 10px/12px sans-serif; + margin-top: 6px; + text-align: center; + } +body.mobile.no-tooltips .toolRibbon .tool { + font-size: 1.6em; + } +.toolRibbon.genericTools { + margin-bottom: 0; + } + +#moreOrLess { + column-gap: 0; + display: grid; + grid-template: auto / 1fr 1fr; + justify-items: stretch; + margin: 1px 0 0 0; + } +#moreOrLess > span { + cursor: pointer; + margin: 0; + padding: var(--popup-gap-thin) var(--popup-gap); + user-select: none; + white-space: nowrap; + } +#moreButton .fa-icon { + transform: rotate(180deg); + } +#lessButton { + border-inline-start: 1px solid var(--surface-1); + text-align: end; + } +body[data-section="a b"] #moreButton { + pointer-events: none; + visibility: hidden; + } +body[data-section=""] #lessButton { + pointer-events: none; + visibility: hidden; + } +body:not([data-section~="a"]) [data-section="a"] { + display: none; + } +body:not([data-section~="b"]) [data-section="b"] { + display: none; + } + +/* configurable UI elements */ +:root:not(.mobile) .toolRibbon .caption, +:root.mobile body.no-tooltips .toolRibbon .caption, +:root.mobile body[data-ui~="-captions"] .toolRibbon .caption { + display: none; + } +:root.mobile .toolRibbon .caption, +:root:not(.mobile) body[data-ui~="+captions"] .toolRibbon .caption { + display: inherit; + } +:root:not(.mobile) .toolRibbon .tool, +:root.mobile body.no-tooltips .toolRibbon .tool, +:root.mobile body[data-ui~="-captions"] .toolRibbon .tool { + padding: var(--popup-gap) var(--popup-gap-thin); + } +:root.mobile #moreOrLess > span { + padding: var(--popup-gap); + } + +/* horizontally-constrained viewport */ +:root.portrait body { + overflow-y: auto; + width: 100%; + } +:root.portrait #main { + max-width: unset; + } +/* mouse-driven devices */ +:root.desktop { + display: flex; + } +:root.desktop body { + --popup-gap: calc(var(--font-size) * 0.875); + } +:root.desktop .rulesetTools [id]:hover { + background-color: var(--popup-ruleset-tool-surface-hover); + } +:root.desktop .rulesetTools [id]:hover > svg { + fill: var(--ink-2); + } +:root.desktop .tool:hover { + background-color: var(--popup-toolbar-surface-hover); + } +:root.desktop #moreOrLess > span:hover { + background-color: var(--surface-2); + /* background-color: var(--popup-toolbar-surface-hover); */ + } + +#templates { + display: none; + } diff --git a/platform/mv3/extension/css/settings.css b/platform/mv3/extension/css/settings.css new file mode 100644 index 0000000..f03e276 --- /dev/null +++ b/platform/mv3/extension/css/settings.css @@ -0,0 +1,192 @@ +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } + } +legend { + color: var(--ink-3); + font-size: var(--font-size-smaller); + padding: var(--default-gap-xxsmall); + } +body .firstRun { + display: none; + } +body.firstRun .firstRun { + background-color: rgb(var(--dashboard-highlight-surface-rgb)); + display: block; + padding: 8px; + } +h3 { + margin: 1em 0; + } +p { + white-space: pre-line; + } + +#defaultFilteringMode { + display: grid; + gap: 1em; + grid: auto-flow dense / 1fr 1fr 1fr; + } +.filteringModeCard { + border: 1px solid var(--surface-3); + border-radius: 4px; + display: flex; + flex-direction: column; + } +.filteringModeCard:has(.radio > [type="radio"]:checked) { + background-color: var(--surface-0); + } +.filteringModeCard .input.radio ~ [data-i18n] { + text-transform: capitalize; + } +.filteringModeCard span:has(> .input) { + align-items: center; + display: inline-flex; + } +.filteringModeCard > div { + align-items: center; + box-sizing: border-box; + display: flex; + padding: 0.5em; + width: 100%; + } +.filteringModeCard > div:nth-of-type(2) { + justify-content: center; + } +.filteringModeCard > div:nth-of-type(3) { + border-top: 1px solid var(--surface-2); + font-size: var(--font-size-smaller); + white-space: pre-line; + } +.filteringModeSlider { + height: calc(60px / 2); + pointer-events: none; + width: calc(240px / 2); + } + +h3[data-i18n="filteringMode0Name"]::first-letter { + text-transform: capitalize; + } +#trustedSites { + box-sizing: border-box; + height: 6rem; + resize: vertical; + width: 100%; + } + +#lists { + margin: 0.5em 0 0 0; + padding: 0; + } +.groupEntry:not([data-groupkey="user"]) .geDetails::before { + color: var(--ink-3); + content: '\2212'; + font-family: monospace; + font-size: large; + margin-inline-end: 0.25em; + -webkit-margin-end: 0.25em; + } +.groupEntry.hideUnused:not([data-groupkey="user"]) .geDetails::before { + content: '+'; + } +.groupEntry { + margin: 0.5em 0; + } +.groupEntry .geDetails { + cursor: pointer; + } +.groupEntry .geName { + pointer-events: none; + } +.groupEntry .geCount { + color: var(--ink-3); + font-size: 90%; + pointer-events: none; + } +.listEntries { + margin-inline-start: 0.6em; + -webkit-margin-start: 0.6em; + } +.groupEntry:not([data-groupkey="user"]) .listEntry:not(.isDefault).unused { + display: none; + } +.listEntry > * { + margin-left: 0; + margin-right: 0; + unicode-bidi: embed; + } +.listEntry .listname { + white-space: nowrap; + } +.listEntry a, +.listEntry .fa-icon { + color: var(--info0-ink); + fill: var(--info0-ink); + display: none; + font-size: 120%; + margin: 0 0.2em 0 0; + } +.listEntry .fa-icon:hover { + transform: scale(1.25); + } +.listEntry .content { + display: inline-flex; + } +.listEntry a.towiki { + display: inline-flex; + } +.listEntry.support a.support { + display: inline-flex; + } +.listEntry.mustread a.mustread { + color: var(--info1-ink); + fill: var(--info1-ink); + display: inline-flex; + } +.listEntry .status { + cursor: default; + display: none; +} + +body.noMoreRuleset .listEntry:not(.checked) { + opacity: 0.5; + pointer-events: none; +} + +/* touch-screen devices */ +:root.mobile .listEntry .fa-icon { + font-size: 120%; + margin: 0 0.5em 0 0; + } +:root.mobile .listEntries { + margin-inline-start: 0; + -webkit-margin-start: 0; + } +:root.mobile .li.listEntry { + overflow-x: auto; + } +:root.mobile .li.listEntry label > span:not([class]) { + flex-grow: 1; + } +:root.mobile .li.listEntry .listname, +:root.mobile .li.listEntry .iconbar { + align-items: flex-start; + display: flex; + white-space: nowrap; + } +:root.mobile .li.listEntry .iconbar { + margin-top: 0.2em; + } + +#templates { + display: none; + } + +@media (max-width: 480px) { + #defaultFilteringMode { + grid: 1fr 1fr 1fr / auto-flow dense; + } + .filteringModeCard > div:nth-of-type(2) { + justify-content: flex-start; + } +} |