diff --git a/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/chrome.css b/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/chrome.css new file mode 100644 index 00000000..3bc23e6b --- /dev/null +++ b/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/chrome.css @@ -0,0 +1,92 @@ + +/* only apply to browser elements */ +@-moz-document url-prefix("chrome://") { + +/* ---------- LAYERS ---------- */ +@layer prefs, scope, effect; + +/* ---------- 1) USER PREFERENCES ---------- */ +@layer prefs { + /* FETCH PREFS OR DEFAULT */ + :root { + --splt-blur_radius: var(--mod-alps-spotlight-blur_radius, 6px); + --splt-brightness: var(--mod-alps-spotlight-brightness, 0.66); + --splt-transition: var(--mod-alps-spotlight-transition, .20s); + } + +/* BLUR */ + /* When blur toggle is on, set specified blur radius */ + @media (-moz-bool-pref: "mod.alps.spotlight.enable_blur") { + :root { + --splt-blur-active: var(--splt-blur_radius); + } + } + /* When blur toggle is off, set blur radius to 0px */ + @media not (-moz-bool-pref: "mod.alps.spotlight.enable_blur") { + :root { + --splt-blur-active: 0px; + } + } + +/* BRIGHTNESS */ + /* When dim toggle is on, set specified brightness */ + @media (-moz-bool-pref: "mod.alps.spotlight.enable_dim") { + :root { + --splt-bright-active: var(--splt-brightness); + } + } + /* When dim toggle is off, set brightness to 1.0 */ + @media not (-moz-bool-pref: "mod.alps.spotlight.enable_dim") { + :root { + --splt-bright-active: 1; + } + } + +/* TRANSITION */ + /* Respect reduced motion*/ + @media (prefers-reduced-motion: reduce) { + :root { + --splt-transition: 0s; + } + } +} + +/* ---------- 2) ESTABLISH SCOPE ---------- */ +@layer scope { + +/* ADDRESS BAR */ + /* If user did not pick docked, neutralize when docked */ + @media not (-moz-bool-pref: "mod.alps.spotlight.on_docked") { + :root:not(:has(#urlbar[open][zen-floating-urlbar="true"])) { + --splt-blur-active: 0px; + --splt-bright-active: 1; + } + } + +/* FLOATING BAR */ + /* If user did not choose floating, neutralize when floating */ + @media not (-moz-bool-pref: "mod.alps.spotlight.on_floating") { + :root:has(#urlbar[open][zen-floating-urlbar="true"]) { + --splt-blur-active: 0px; + --splt-bright-active: 1; + } + } +} + +/* ---------- 3) EFFECT APPLICATION ---------- */ +@layer effect { + +/* Blur the page content when the URL bar is open */ + :root:has(#urlbar[open]) #tabbrowser-tabpanels { + filter: blur(var(--splt-blur-active)) brightness(var(--splt-bright-active)); + transition: filter var(--splt-transition) ease; + } + +/* Keep the bar above the blur/darken filter */ + #urlbar[open] { + position: relative; + z-index: 9999; + } +} + +} diff --git a/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/image.png b/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/image.png new file mode 100644 index 00000000..9cdd7555 Binary files /dev/null and b/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/image.png differ diff --git a/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/preferences.json b/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/preferences.json new file mode 100644 index 00000000..1f34212a --- /dev/null +++ b/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/preferences.json @@ -0,0 +1,60 @@ +[ + { + "property": "mod.alps.spotlight.enable_blur", + "label": "Enable Spotlight Blur", + "type": "checkbox", + "defaultValue": true + }, + { + "property": "mod.alps.spotlight.blur_radius", + "label": "Spotlight Blur Radius (px)", + "type": "string", + "defaultValue": "6px", + "placeholder": "e.g. 4px" + }, + { + "property": "mod.alps.spotlight.enable_brightness", + "label": "Enable Spotlight Brightness", + "type": "checkbox", + "defaultValue": true + }, + { + "property": "mod.alps.spotlight.brightness", + "label": "Spotlight Brightness 0-1, with 1 being full brightness", + "type": "string", + "defaultValue": "0.66", + "placeholder": "e.g. 0.9" + }, + { + "property": "mod.alps.spotlight.on_floating", + "label": "Apply on floating URL searchbar", + "type": "checkbox", + "defaultValue": true + }, + { + "property": "mod.alps.spotlight.on_docked", + "label": "Apply on address bar", + "type": "checkbox", + "defaultValue": false + }, + { + "property": "mod.alps.spotlight.transition", + "label": "Transition Duration (seconds)", + "type": "dropdown", + "defaultValue": ".20s", + "options": [ + { + "label": "Snappy (.15s)", + "value": ".15s" + }, + { + "label": "Default (.20s)", + "value": ".20s" + }, + { + "label": "Gentle (.30s)", + "value": ".30s" + } + ] + } +] \ No newline at end of file diff --git a/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/readme.md b/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/readme.md new file mode 100644 index 00000000..374dcc74 --- /dev/null +++ b/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/readme.md @@ -0,0 +1,13 @@ + +**Zen Spotlight Search** - dim and blur the page behind your search bar for a calmer, focused experience. + +## Features + +- Enable or disable the spotlight effect separately for: + - Floating search bar + - Docked address bar + +- Adjustable filter settings: + - Blur radius + - Brightness level + - Transition speed diff --git a/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/theme.json b/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/theme.json new file mode 100644 index 00000000..9ab91848 --- /dev/null +++ b/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/theme.json @@ -0,0 +1,15 @@ +{ + "id": "e1fdd5c3-b155-45d3-8836-70d0758546ef", + "name": "zen spotlight search", + "description": "Blur and/or darken pages behind your search bar for a more focused experience.", + "homepage": "https://github.com/alpegasus/zen-spotlight-search", + "style": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/chrome.css", + "readme": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/readme.md", + "image": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/image.png", + "author": "alpegasus", + "version": "1.0.0", + "tags": [], + "createdAt": "2025-11-09", + "updatedAt": "2025-11-09", + "preferences": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/e1fdd5c3-b155-45d3-8836-70d0758546ef/preferences.json" +} \ No newline at end of file