From c46aa247c78a9238043cc02f7828e65f0118c229 Mon Sep 17 00:00:00 2001 From: Mauro Balades Date: Thu, 15 Aug 2024 16:26:25 +0200 Subject: [PATCH] Update Zen theme CSS to use CSS variables for element separation --- configs/linux/mozconfig | 1 + configs/macos/mozconfig | 1 + src/browser/base/content/zen-styles/zen-compact-mode.css | 5 +++-- .../base/content/zen-styles/zen-sidebar-panels.css | 8 ++------ 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/configs/linux/mozconfig b/configs/linux/mozconfig index 012502b49..5a2b75abc 100644 --- a/configs/linux/mozconfig +++ b/configs/linux/mozconfig @@ -46,6 +46,7 @@ if test "$ZEN_RELEASE"; then export RUSTFLAGS="$RUSTFLAGS -C target-cpu=x86-64-v3 -C target-feature=+sse4.1 -C target-feature=+avx2 -C codegen-units=1" fi export VERBOSE=1 + export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine" fi ac_add_options --target=x86_64-pc-linux diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index e1884650c..caa42ea22 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -33,3 +33,4 @@ else export RUSTFLAGS="-C target-feature=+v8.3a -C codegen-units=1 -Ctarget-cpu=apple-m1" fi export VERBOSE=1 +export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine" diff --git a/src/browser/base/content/zen-styles/zen-compact-mode.css b/src/browser/base/content/zen-styles/zen-compact-mode.css index 996d97afa..6dd96fe54 100644 --- a/src/browser/base/content/zen-styles/zen-compact-mode.css +++ b/src/browser/base/content/zen-styles/zen-compact-mode.css @@ -23,7 +23,8 @@ z-index: 1; height: 100%; margin: 0; - padding: var(--zen-compact-toolbox-margin) !important; + padding: var(--zen-compact-toolbox-margin); + padding-top: calc(var(--zen-compact-toolbox-margin-single) - var(--zen-element-separation)); & #titlebar { border: 1px solid var(--zen-colors-border); @@ -48,7 +49,7 @@ #zen-sidebar-web-panel-wrapper:not(:has(#zen-sidebar-web-panel[hidden="true"])), #sidebar-box:not([positionend="true"]) { margin-right: 0 !important; - margin-left: calc(var(--zen-sidebar-web-panel-spacing) / 2) !important; + margin-left: var(--zen-sidebar-web-panel-spacing) !important; } #sidebar-box[positionend="true"] { diff --git a/src/browser/base/content/zen-styles/zen-sidebar-panels.css b/src/browser/base/content/zen-styles/zen-sidebar-panels.css index 7a23aa760..db0c9ae25 100644 --- a/src/browser/base/content/zen-styles/zen-sidebar-panels.css +++ b/src/browser/base/content/zen-styles/zen-sidebar-panels.css @@ -53,6 +53,7 @@ #zen-sidebar-web-panel-wrapper { --zen-default-sidebar-width: 300px; + --zen-sidebar-web-panel-spacing: var(--zen-element-separation); position: relative; margin-right: 0; display: flex; @@ -67,17 +68,12 @@ } #zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned="true"]) { - --zen-sidebar-web-panel-spacing: 10px; margin: var(--zen-appcontent-separator-from-window); position: absolute; z-index: 1; width: -moz-available; padding: var(--zen-sidebar-web-panel-spacing); - height: calc(100% - 10px); -} - -#zen-sidebar-web-panel:not([pinned="true"]) { - --zen-sidebar-web-panel-spacing: calc(10px / 3); + height: calc(100% - var(--zen-element-separation)); } #zen-sidebar-web-panel {