bulma-turbo-themes 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";const I={bulma:{name:"Bulma",description:"Classic Bulma themes"},catppuccin:{name:"Catppuccin",description:"Soothing pastel themes"},github:{name:"GitHub",description:"GitHub-inspired themes"},dracula:{name:"Dracula",description:"Dark vampire aesthetic"}},x=[{id:"bulma-light",name:"Light",description:"Classic Bulma look with a bright, neutral palette.",cssFile:"assets/css/themes/bulma-light.css",icon:"assets/img/bulma-logo.webp",iconFallback:"assets/img/bulma-logo.png",family:"bulma",appearance:"light",colors:{bg:"#ffffff",surface:"#f5f5f5",accent:"#00d1b2",text:"#363636"}},{id:"bulma-dark",name:"Dark",description:"Dark Bulma theme tuned for low-light reading.",cssFile:"assets/css/themes/bulma-dark.css",icon:"assets/img/bulma-logo.webp",iconFallback:"assets/img/bulma-logo.png",family:"bulma",appearance:"dark",colors:{bg:"#1a1a2e",surface:"#252540",accent:"#00d1b2",text:"#f5f5f5"}},{id:"catppuccin-latte",name:"Latte",description:"Light, soft Catppuccin palette for daytime use.",cssFile:"assets/css/themes/catppuccin-latte.css",icon:"assets/img/catppuccin-logo-latte.webp",iconFallback:"assets/img/catppuccin-logo-latte.png",family:"catppuccin",appearance:"light",colors:{bg:"#eff1f5",surface:"#e6e9ef",accent:"#8839ef",text:"#4c4f69"}},{id:"catppuccin-frappe",name:"Frapp\xE9",description:"Balanced dark Catppuccin theme for focused work.",cssFile:"assets/css/themes/catppuccin-frappe.css",icon:"assets/img/catppuccin-logo-latte.webp",iconFallback:"assets/img/catppuccin-logo-latte.png",family:"catppuccin",appearance:"dark",colors:{bg:"#303446",surface:"#414559",accent:"#ca9ee6",text:"#c6d0f5"}},{id:"catppuccin-macchiato",name:"Macchiato",description:"Deep, atmospheric Catppuccin variant with rich contrast.",cssFile:"assets/css/themes/catppuccin-macchiato.css",icon:"assets/img/catppuccin-logo-macchiato.webp",iconFallback:"assets/img/catppuccin-logo-macchiato.png",family:"catppuccin",appearance:"dark",colors:{bg:"#24273a",surface:"#363a4f",accent:"#c6a0f6",text:"#cad3f5"}},{id:"catppuccin-mocha",name:"Mocha",description:"Cozy, high-contrast Catppuccin theme for late-night sessions.",cssFile:"assets/css/themes/catppuccin-mocha.css",icon:"assets/img/catppuccin-logo-macchiato.webp",iconFallback:"assets/img/catppuccin-logo-macchiato.png",family:"catppuccin",appearance:"dark",colors:{bg:"#1e1e2e",surface:"#313244",accent:"#cba6f7",text:"#cdd6f4"}},{id:"dracula",name:"Classic",description:"Iconic Dracula dark theme with vibrant accents.",cssFile:"assets/css/themes/dracula.css",icon:"assets/img/dracula-logo.webp",iconFallback:"assets/img/dracula-logo.png",family:"dracula",appearance:"dark",colors:{bg:"#282a36",surface:"#44475a",accent:"#bd93f9",text:"#f8f8f2"}},{id:"github-light",name:"Light",description:"GitHub-inspired light theme suited for documentation and UI heavy pages.",cssFile:"assets/css/themes/github-light.css",icon:"assets/img/github-logo-light.webp",iconFallback:"assets/img/github-logo-light.png",family:"github",appearance:"light",colors:{bg:"#ffffff",surface:"#f6f8fa",accent:"#0969da",text:"#1f2328"}},{id:"github-dark",name:"Dark",description:"GitHub dark theme optimized for code-heavy views.",cssFile:"assets/css/themes/github-dark.css",icon:"assets/img/github-logo-dark.webp",iconFallback:"assets/img/github-logo-dark.png",family:"github",appearance:"dark",colors:{bg:"#0d1117",surface:"#161b22",accent:"#58a6ff",text:"#c9d1d9"}}],D="bulma-theme-flavor",T="catppuccin-mocha";let R=0;function G(e){const f=Array.from(e.classList);for(const n of f)if(n.startsWith("theme-"))return n.substring(6);return null}function q(e){const n=e.documentElement?.getAttribute("data-baseurl")||"";try{const t=new URL(n,"http://localhost");return t.origin==="http://localhost"?t.pathname.replace(/\/$/,""):""}catch{return""}}async function S(e,f){R++;const n=R,t=x.find(s=>s.id===f)||x.find(s=>s.id===T),m=q(e),c=e.getElementById("theme-flavor-trigger");c&&c.classList.add("is-loading");try{Array.from(e.documentElement.classList).forEach(h=>{h.startsWith("theme-")&&e.documentElement.classList.remove(h)}),e.documentElement.classList.add(`theme-${t.id}`);const u=`theme-${t.id}-css`;let r=e.getElementById(u);if(!r){r=e.createElement("link"),r.id=u,r.rel="stylesheet",r.type="text/css",r.setAttribute("data-theme-id",t.id);try{const h=m?`${window.location.origin}${m}/`:`${window.location.origin}/`,v=new URL(t.cssFile,h).pathname;r.href=v}catch{console.warn(`Invalid theme CSS path for ${t.id}`);return}e.head.appendChild(r);try{await new Promise((h,v)=>{const b=setTimeout(()=>{r.onload=null,r.onerror=null,v(new Error(`Theme ${t.id} load timeout`))},1e4);r.onload=()=>{clearTimeout(b),r.onload=null,r.onerror=null,h()},r.onerror=()=>{clearTimeout(b),r.onload=null,r.onerror=null,v(new Error(`Failed to load theme ${t.id}`))}})}catch(h){console.warn(`Theme CSS failed to load for ${t.id}:`,h)}}n===R&&e.querySelectorAll('link[id^="theme-"][id$="-css"]').forEach(v=>{const b=v.id.replace("theme-","").replace("-css","");b!==t.id&&b!=="base"&&v.remove()});const o=e.getElementById("theme-flavor-trigger-icon");if(o&&t.icon)try{const h=m?`${window.location.origin}${m}/`:`${window.location.origin}/`,v=new URL(t.icon,h).pathname;if(o.src=v,o.alt=`${I[t.family].name} ${t.name}`,o.title=`${I[t.family].name} ${t.name}`,t.iconFallback){const b=new URL(t.iconFallback,h).pathname;o.onerror=()=>{o.onerror=null,o.src=b}}}catch{console.warn(`Invalid theme icon path for ${t.id}`)}e.querySelectorAll("#theme-flavor-menu .dropdown-item.theme-item").forEach(h=>{h.getAttribute("data-theme-id")===t.id?(h.classList.add("is-active"),h.setAttribute("aria-checked","true")):(h.classList.remove("is-active"),h.setAttribute("aria-checked","false"))})}finally{c&&c.classList.remove("is-loading")}}export async function initTheme(e,f){const n=f.__INITIAL_THEME__,t=f.localStorage.getItem(D)||T;if(n&&n===t&&G(e.documentElement)===t){const c=`theme-${t}-css`;e.getElementById(c)||await S(e,t);return}await S(e,t)}export function initNavbar(e){const f=e.location.pathname,n=e.querySelectorAll(".navbar-item");let t=null;const m=new Set;if(n.forEach(s=>{const u=s;if(u.href)try{const r=new URL(u.href).pathname,o=f.replace(/\/$/,"")||"/",L=r.replace(/\/$/,"")||"/";m.add(s),o===L&&(t=s)}catch{}}),n.forEach(s=>{if(s!==t&&m.has(s)){s.classList.remove("is-active");const u=s;u&&"removeAttribute"in u&&typeof u.removeAttribute=="function"&&u.removeAttribute("aria-current")}}),t){t.classList.add("is-active");const s=t;s&&"setAttribute"in s&&typeof s.setAttribute=="function"&&s.setAttribute("aria-current","page")}const c=e.querySelector('[data-testid="nav-reports"]');if(c){const s=["/coverage","/playwright","/lighthouse"],u=f.replace(/\/$/,"")||"/";s.some(o=>u===o||u.startsWith(o+"/"))?c.classList.add("is-active"):c.classList.remove("is-active")}}typeof window<"u"&&(window.initNavbar=initNavbar);export function wireFlavorSelector(e,f){const n=new AbortController,t=e.getElementById("theme-flavor-menu"),m=e.getElementById("theme-flavor-trigger"),c=m?.closest(".navbar-item.has-dropdown"),s=e.getElementById("theme-flavor-select"),u=q(e);if(!t||!m||!c)return{cleanup:()=>{n.abort()}};let r=-1;const o=[],L=f.localStorage.getItem(D)||G(e.documentElement)||T;if(s){for(;s.firstChild;)s.removeChild(s.firstChild);x.forEach(a=>{const l=e.createElement("option");l.value=a.id,l.textContent=a.name,a.id===L&&(l.selected=!0),s.appendChild(l)}),s.disabled=!1,s.addEventListener("change",a=>{const i=a.target?.value||T;f.localStorage.setItem(D,i),S(e,i).catch(d=>{console.error(`Failed to apply theme ${i}:`,d)})},{signal:n.signal})}for(;t.firstChild;)t.removeChild(t.firstChild);const h=Object.keys(I);let v=0;h.forEach(a=>{const l=x.filter(p=>p.family===a);if(l.length===0)return;const i=I[a],d=e.createElement("div");d.className="theme-family-group",d.setAttribute("role","group"),d.setAttribute("aria-labelledby",`theme-family-${a}`),d.style&&typeof d.style.setProperty=="function"&&d.style.setProperty("--animation-delay",`${v}ms`),v+=30;const k=e.createElement("div");k.className="theme-family-header",k.id=`theme-family-${a}`;const N=e.createElement("span");N.className="theme-family-name",N.textContent=i.name,k.appendChild(N),d.appendChild(k);const B=e.createElement("div");B.className="theme-family-items",l.forEach(p=>{const g=e.createElement("button");g.type="button",g.className="dropdown-item theme-item",g.setAttribute("data-theme-id",p.id),g.setAttribute("data-appearance",p.appearance),g.setAttribute("role","menuitemradio"),g.setAttribute("aria-label",`${i.name} ${p.name} (${p.appearance}). ${p.description}`),g.setAttribute("tabindex","-1");const _=p.id===L;g.setAttribute("aria-checked",String(_)),_&&g.classList.add("is-active");const y=e.createElement("img");if(y.className="theme-icon",p.icon){const A=f.location.origin,C=u?`${A}${u}/${p.icon}`:`${A}/${p.icon}`;if(y.src=C,y.alt=`${i.name} ${p.name}`,p.iconFallback){const W=u?`${A}${u}/${p.iconFallback}`:`${A}/${p.iconFallback}`;y.onerror=()=>{y.onerror=null,y.src=W}}}y.width=24,y.height=24,y.loading="lazy",g.appendChild(y);const F=e.createElement("div");F.className="theme-copy";const U=e.createElement("span");U.className="theme-title",U.textContent=`${i.name} \xB7 ${p.name}`,F.appendChild(U);const M=e.createElement("span");M.className="theme-description",M.textContent=p.description,F.appendChild(M),g.appendChild(F);const H=e.createElement("span");H.className="theme-check";const E=e.createElementNS("http://www.w3.org/2000/svg","svg");E.setAttribute("width","16"),E.setAttribute("height","16"),E.setAttribute("viewBox","0 0 24 24"),E.setAttribute("fill","none"),E.setAttribute("stroke","currentColor"),E.setAttribute("stroke-width","3"),E.setAttribute("stroke-linecap","round"),E.setAttribute("stroke-linejoin","round");const z=e.createElementNS("http://www.w3.org/2000/svg","polyline");z.setAttribute("points","20 6 9 17 4 12"),E.appendChild(z),H.appendChild(E),g.appendChild(H),g.addEventListener("click",A=>{if(A.preventDefault(),f.localStorage.setItem(D,p.id),$({restoreFocus:!0}),s){s.value=p.id;const C=new Event("change",{bubbles:!0});s.dispatchEvent(C)}else S(e,p.id).catch(C=>{console.error(`Failed to apply theme ${p.id}:`,C)})}),o.push(g),B.appendChild(g)}),d.appendChild(B),t.appendChild(d)});const b=a=>{m&&m.setAttribute("aria-expanded",String(a))},w=a=>{if(a<0||a>=o.length)return;const l=o[a];o.forEach(i=>{i.setAttribute("tabindex","-1")}),l.setAttribute("tabindex","0"),l.focus(),r=a},$=(a={})=>{const{restoreFocus:l=!0}=a;c&&c.classList.remove("is-active"),b(!1),o.forEach(i=>{i.setAttribute("tabindex","-1")}),r=-1,l&&m&&m.focus()},P=(a=!1)=>{if(!c)return;const l=c.classList.toggle("is-active");b(l),l?a&&o.length>0&&w(0):(r=-1,o.forEach(i=>{if(i&&typeof i.setAttribute=="function"){i.setAttribute("tabindex","-1");const d=i.classList&&typeof i.classList.contains=="function"?i.classList.contains("is-active"):!1;i.setAttribute("aria-checked",String(d))}}))};return m&&m.addEventListener("click",a=>{a.preventDefault(),P()},{signal:n.signal}),e.addEventListener("click",a=>{c&&!c.contains(a.target)&&$({restoreFocus:!1})},{signal:n.signal}),e.addEventListener("keydown",a=>{a.key==="Escape"&&c&&c.classList.contains("is-active")&&$({restoreFocus:!0})},{signal:n.signal}),m&&m.addEventListener("keydown",a=>{if(!c)return;const l=a.key;if(l==="Enter"||l===" "){a.preventDefault();const i=c.classList.contains("is-active");P(!i)}else if(l==="ArrowDown")if(a.preventDefault(),!c.classList.contains("is-active"))c.classList.add("is-active"),b(!0),w(0);else if(r<0)w(0);else{const i=r<o.length-1?r+1:0;w(i)}else if(l==="ArrowUp")if(a.preventDefault(),!c.classList.contains("is-active"))c.classList.add("is-active"),b(!0),w(o.length-1);else{const i=r<0?o.length-1:r,d=i>0?i-1:o.length-1;w(d)}},{signal:n.signal}),o.forEach((a,l)=>{a.addEventListener("keydown",i=>{const d=i.key;if(d==="ArrowDown"){i.preventDefault();const k=l<o.length-1?l+1:0;w(k)}else if(d==="ArrowUp"){i.preventDefault();const k=l>0?l-1:o.length-1;w(k)}else d==="Escape"?(i.preventDefault(),$()):d==="Enter"||d===" "?(i.preventDefault(),a.click()):d==="Home"?(i.preventDefault(),w(0)):d==="End"&&(i.preventDefault(),w(o.length-1))},{signal:n.signal})}),b(!1),c&&c.classList.remove("is-active"),{cleanup:()=>{n.abort()}}}export function enhanceAccessibility(e){e.querySelectorAll(".highlight > pre").forEach(n=>{n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.hasAttribute("role")||n.setAttribute("role","region"),n.hasAttribute("aria-label")||n.setAttribute("aria-label","Code block")})}typeof document<"u"&&typeof window<"u"&&document.addEventListener("DOMContentLoaded",()=>{initTheme(document,window).then(()=>{const{cleanup:e}=wireFlavorSelector(document,window);enhanceAccessibility(document);const f=()=>{e(),window.removeEventListener("pagehide",f)};window.addEventListener("pagehide",f)}).catch(e=>{console.error("Theme switcher initialization failed:",e)})});
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BulmaTurboThemes
4
- VERSION = "0.8.1"
4
+ VERSION = "0.9.0"
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bulma-turbo-themes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Turbo Coder
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-11-16 00:00:00.000000000 Z
11
+ date: 2025-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -44,24 +44,33 @@ files:
44
44
  - _data/i18n.yml
45
45
  - _layouts/default.html
46
46
  - assets/css/custom.css
47
+ - assets/css/themes/base.css
47
48
  - assets/css/themes/bulma-dark.css
48
49
  - assets/css/themes/bulma-light.css
49
50
  - assets/css/themes/catppuccin-frappe.css
50
51
  - assets/css/themes/catppuccin-latte.css
51
52
  - assets/css/themes/catppuccin-macchiato.css
52
53
  - assets/css/themes/catppuccin-mocha.css
54
+ - assets/css/themes/critical.css
53
55
  - assets/css/themes/dracula.css
54
56
  - assets/css/themes/github-dark.css
55
57
  - assets/css/themes/github-light.css
56
- - assets/css/themes/global.css
57
58
  - assets/img/bulma-logo-dark.png
59
+ - assets/img/bulma-logo-dark.webp
58
60
  - assets/img/bulma-logo.png
61
+ - assets/img/bulma-logo.webp
59
62
  - assets/img/catppuccin-logo-latte.png
63
+ - assets/img/catppuccin-logo-latte.webp
60
64
  - assets/img/catppuccin-logo-macchiato.png
65
+ - assets/img/catppuccin-logo-macchiato.webp
61
66
  - assets/img/dracula-logo.png
67
+ - assets/img/dracula-logo.webp
62
68
  - assets/img/github-logo-dark.png
69
+ - assets/img/github-logo-dark.webp
63
70
  - assets/img/github-logo-light.png
71
+ - assets/img/github-logo-light.webp
64
72
  - assets/js/theme-selector.js
73
+ - assets/js/theme-selector.min.js
65
74
  - lib/bulma-turbo-themes.rb
66
75
  - lib/bulma-turbo-themes/version.rb
67
76
  homepage: https://github.com/TurboCoder13/bulma-turbo-themes
@@ -1,460 +0,0 @@
1
- /* SPDX-License-Identifier: MIT */
2
- html {
3
- font-family: var(
4
- --theme-font-sans,
5
- system-ui,
6
- -apple-system,
7
- Segoe UI,
8
- Roboto,
9
- Helvetica,
10
- Arial,
11
- sans-serif
12
- );
13
- }
14
- body,
15
- .content {
16
- font-family: var(
17
- --theme-font-sans,
18
- system-ui,
19
- -apple-system,
20
- Segoe UI,
21
- Roboto,
22
- Helvetica,
23
- Arial,
24
- sans-serif
25
- );
26
- }
27
- .title,
28
- .content h1,
29
- .content h2,
30
- .content h3,
31
- .content h4,
32
- .content h5,
33
- .content h6 {
34
- font-family: var(
35
- --theme-font-serif,
36
- var(--theme-font-sans, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif)
37
- );
38
- }
39
- code,
40
- kbd,
41
- pre,
42
- samp {
43
- font-family: var(
44
- --theme-font-mono,
45
- ui-monospace,
46
- SFMono-Regular,
47
- Menlo,
48
- Consolas,
49
- 'Liberation Mono',
50
- 'Courier New',
51
- monospace
52
- );
53
- }
54
- html,
55
- body {
56
- color: var(--theme-text, inherit);
57
- }
58
- .content p {
59
- color: var(--theme-text, inherit);
60
- }
61
- .title.is-1,
62
- h1 {
63
- color: var(--theme-h1, var(--theme-text, inherit));
64
- }
65
- .title.is-2,
66
- h2 {
67
- color: var(--theme-h2, var(--theme-text, inherit));
68
- }
69
- .title.is-3,
70
- h3 {
71
- color: var(--theme-h3, var(--theme-text, inherit));
72
- }
73
- .title.is-4,
74
- h4 {
75
- color: var(--theme-h4, var(--theme-text, inherit));
76
- }
77
- .title.is-5,
78
- h5 {
79
- color: var(--theme-h5, var(--theme-text, inherit));
80
- }
81
- .title.is-6,
82
- h6 {
83
- color: var(--theme-h6, var(--theme-text, inherit));
84
- }
85
- .content h1 {
86
- color: var(--theme-h1, var(--theme-text, inherit));
87
- }
88
- .content h2 {
89
- color: var(--theme-h2, var(--theme-text, inherit));
90
- }
91
- .content h3 {
92
- color: var(--theme-h3, var(--theme-text, inherit));
93
- }
94
- .content h4 {
95
- color: var(--theme-h4, var(--theme-text, inherit));
96
- }
97
- .content h5 {
98
- color: var(--theme-h5, var(--theme-text, inherit));
99
- }
100
- .content h6 {
101
- color: var(--theme-h6, var(--theme-text, inherit));
102
- }
103
- .label,
104
- label {
105
- color: var(--theme-label-color, var(--theme-text, inherit));
106
- }
107
- .content a {
108
- color: var(--theme-link, var(--bulma-link));
109
- }
110
- .content a:hover {
111
- color: var(--theme-link-hover, var(--theme-link));
112
- }
113
- .content blockquote {
114
- border-left: 4px solid var(--theme-blockquote-border, currentColor);
115
- color: var(--theme-blockquote-fg, inherit);
116
- background: var(--theme-blockquote-bg, transparent);
117
- font-style: italic;
118
- }
119
- .content hr,
120
- hr {
121
- height: 0;
122
- border: 0;
123
- border-top: 2px solid
124
- var(
125
- --theme-hr-color,
126
- var(--theme-h1, var(--theme-table-border, var(--bulma-border, currentColor)))
127
- );
128
- background: none;
129
- }
130
- input[type='checkbox'],
131
- input[type='radio'],
132
- progress,
133
- input[type='range'] {
134
- accent-color: var(--theme-link, var(--bulma-link));
135
- }
136
- .input:invalid,
137
- .textarea:invalid,
138
- select:invalid,
139
- input:invalid {
140
- border-color: var(--bulma-danger);
141
- box-shadow: none;
142
- }
143
- .input:valid,
144
- .textarea:valid,
145
- select:valid,
146
- input:valid {
147
- border-color: var(--bulma-success);
148
- box-shadow: none;
149
- }
150
- .input:focus,
151
- .textarea:focus,
152
- select:focus,
153
- input:focus {
154
- border-color: var(--bulma-link);
155
- box-shadow: 0 0 0 0.125em color-mix(in srgb, var(--bulma-link), transparent 80%);
156
- outline: none;
157
- }
158
- .input:-moz-ui-invalid,
159
- input:-moz-ui-invalid,
160
- select:-moz-ui-invalid {
161
- border-color: var(--bulma-danger);
162
- box-shadow: none;
163
- }
164
- ::placeholder {
165
- color: var(--theme-text-muted, currentColor);
166
- opacity: 1;
167
- }
168
- input:-webkit-autofill {
169
- -webkit-text-fill-color: var(--theme-text, inherit);
170
- box-shadow: 0 0 0 1000px var(--theme-surface-1, transparent) inset !important;
171
- filter: none;
172
- }
173
- input[type='file']::file-selector-button {
174
- background: color-mix(in srgb, var(--theme-link, var(--bulma-link)) 10%, transparent);
175
- border: 1px solid var(--theme-link, var(--bulma-link));
176
- color: var(--theme-text, inherit);
177
- padding: 0.35rem 0.6rem;
178
- border-radius: 0.4rem;
179
- }
180
- input[type='file']::file-selector-button:hover {
181
- background: color-mix(in srgb, var(--theme-link, var(--bulma-link)) 18%, transparent);
182
- }
183
- #theme-flavor-select {
184
- padding-left: 2rem;
185
- }
186
- #theme-flavor-icon {
187
- display: none;
188
- }
189
- #theme-flavor-select option[data-icon] {
190
- background-repeat: no-repeat;
191
- background-size: 1rem 1rem;
192
- background-position: 0.5rem center;
193
- padding-left: 1.75rem;
194
- }
195
- #theme-flavor-select:hover {
196
- border-color: var(--bulma-link);
197
- box-shadow: 0 0 0 0.125em color-mix(in srgb, var(--bulma-link), transparent 80%);
198
- }
199
- .dropdown.is-theme .theme-flavor-trigger {
200
- display: grid;
201
- place-items: center;
202
- gap: 0;
203
- padding: 0;
204
- background: transparent;
205
- transition:
206
- background-color 0.14s ease-out,
207
- box-shadow 0.14s ease-out;
208
- width: 40px;
209
- height: 40px;
210
- line-height: 0;
211
- box-sizing: border-box;
212
- }
213
- .dropdown.is-theme .theme-flavor-trigger .icon {
214
- width: 100%;
215
- height: 100%;
216
- display: grid;
217
- place-items: center;
218
- margin: 0 !important;
219
- line-height: 0;
220
- }
221
- .dropdown.is-theme .theme-flavor-trigger .icon:first-child {
222
- margin: 0 !important;
223
- }
224
- .dropdown.is-theme .theme-flavor-trigger #theme-flavor-trigger-label {
225
- display: none;
226
- }
227
- .dropdown.is-theme .theme-flavor-trigger .icon img,
228
- .dropdown.is-theme .theme-flavor-trigger .icon span {
229
- width: 28px;
230
- height: 28px;
231
- border-radius: 50%;
232
- display: block;
233
- margin: 0;
234
- }
235
- .dropdown.is-theme .theme-flavor-trigger .icon img {
236
- object-fit: cover;
237
- box-shadow: none;
238
- transform: translateZ(0);
239
- }
240
- .dropdown.is-theme .theme-flavor-trigger .icon span {
241
- display: flex;
242
- align-items: center;
243
- justify-content: center;
244
- font-size: 12px;
245
- font-weight: bold;
246
- }
247
- #theme-flavor-dd .dropdown-content {
248
- max-height: 18rem;
249
- overflow: auto;
250
- padding: 0.25rem;
251
- width: auto;
252
- }
253
- .dropdown.is-theme .dropdown-menu {
254
- padding: 0.25rem;
255
- min-width: auto;
256
- opacity: 0;
257
- transform: translateY(-6px);
258
- transition:
259
- opacity 0.14s ease-out,
260
- transform 0.14s ease-out;
261
- }
262
- .dropdown.is-theme.is-active .dropdown-menu {
263
- opacity: 1;
264
- transform: translateY(0);
265
- }
266
- .dropdown.is-theme .dropdown-content {
267
- background-color: var(--theme-surface-0, inherit);
268
- border-radius: 1rem;
269
- box-shadow: 0 6px 18px color-mix(in srgb, var(--theme-text, #000) 10%, transparent);
270
- }
271
- #theme-flavor-dd .dropdown-item {
272
- display: inline-flex;
273
- align-items: center;
274
- justify-content: center;
275
- gap: 0.5rem;
276
- border-radius: 9999px;
277
- padding: 0.25rem;
278
- width: 40px;
279
- height: 40px;
280
- position: relative;
281
- background: transparent;
282
- transition:
283
- background-color 0.12s ease,
284
- box-shadow 0.12s ease;
285
- }
286
- #theme-flavor-dd .dropdown-item:hover {
287
- background-color: color-mix(
288
- in srgb,
289
- var(--theme-surface-0, transparent) 92%,
290
- var(--theme-link, var(--bulma-link)) 8%
291
- );
292
- border-color: var(--bulma-link);
293
- box-shadow: 0 0 0 0.125em color-mix(in srgb, var(--bulma-link), transparent 80%);
294
- }
295
- #theme-flavor-dd .dropdown-item img,
296
- #theme-flavor-dd .dropdown-item span {
297
- width: 28px;
298
- height: 28px;
299
- border-radius: 50%;
300
- display: block;
301
- }
302
- #theme-flavor-dd .dropdown-item img {
303
- display: block;
304
- }
305
- #theme-flavor-dd .dropdown-item span {
306
- display: flex;
307
- align-items: center;
308
- justify-content: center;
309
- font-size: 12px;
310
- font-weight: bold;
311
- }
312
- #theme-flavor-dd .dropdown-item.is-active img {
313
- box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-link, var(--bulma-link)) 60%, transparent);
314
- }
315
- #theme-flavor-dd .dropdown-item.is-active {
316
- background-color: color-mix(
317
- in srgb,
318
- var(--theme-link, var(--bulma-link)) 10%,
319
- var(--theme-surface-0, transparent)
320
- );
321
- }
322
- .navbar .navbar-item:hover,
323
- .navbar .navbar-link:hover {
324
- text-decoration: underline;
325
- text-decoration-color: var(--theme-link, var(--bulma-link));
326
- text-underline-offset: 4px;
327
- color: var(--theme-link, var(--bulma-link));
328
- background-color: var(--theme-surface-1, transparent);
329
- }
330
- .navbar .navbar-brand > .navbar-item:hover {
331
- text-decoration: none;
332
- }
333
- .navbar .navbar-item.is-active,
334
- .navbar .navbar-link.is-active {
335
- position: relative;
336
- color: var(--theme-link, var(--bulma-link));
337
- background: color-mix(in srgb, var(--theme-link, var(--bulma-link)) 8%, transparent);
338
- border-bottom: 3px solid var(--theme-link, var(--bulma-link));
339
- border-radius: 0.5rem 0.5rem 0 0;
340
- box-shadow: 0 4px 14px color-mix(in srgb, var(--theme-link, var(--bulma-link)) 22%, transparent);
341
- }
342
- .content code {
343
- color: var(--theme-code-fg, inherit);
344
- background: var(--theme-code-bg, transparent);
345
- padding: 0.2em 0.35em;
346
- border-radius: 0.25rem;
347
- }
348
- .content pre,
349
- pre,
350
- .highlight pre,
351
- pre.highlight {
352
- color: var(--theme-pre-fg, inherit);
353
- background: var(--theme-pre-bg, transparent);
354
- padding: 1rem;
355
- border-radius: 0.5rem;
356
- overflow: auto;
357
- border: 2px solid var(--theme-pre-border, transparent);
358
- }
359
- .content pre code,
360
- pre code,
361
- .highlight pre code,
362
- pre.highlight code {
363
- color: var(--theme-pre-fg, inherit);
364
- background: transparent;
365
- }
366
- ::selection {
367
- color: var(--theme-selection-fg, inherit);
368
- background: var(--theme-selection-bg, transparent);
369
- }
370
- .navbar,
371
- .hero,
372
- .box,
373
- .card,
374
- .dropdown-content,
375
- .modal-card,
376
- .menu,
377
- .message {
378
- background-color: var(--theme-surface-0, inherit);
379
- color: var(--theme-text, inherit);
380
- }
381
- .navbar {
382
- border-bottom: 1px solid var(--theme-table-border, var(--bulma-border, currentColor));
383
- }
384
- .navbar a.navbar-item,
385
- .navbar .navbar-link {
386
- color: var(--theme-text, inherit);
387
- }
388
- .navbar .navbar-brand > .navbar-item.is-active {
389
- box-shadow: none;
390
- background: none;
391
- color: inherit;
392
- }
393
- .card .card-content,
394
- .modal-card-body,
395
- .panel,
396
- .table-container {
397
- background-color: var(--theme-surface-1, inherit);
398
- }
399
- .dropdown-content .dropdown-item.is-active,
400
- .table.is-striped tbody tr:nth-child(even) {
401
- background-color: var(--theme-table-stripe, var(--theme-surface-2, inherit));
402
- }
403
- .box,
404
- .card,
405
- .dropdown-content,
406
- .menu,
407
- .message,
408
- .panel,
409
- .table,
410
- .table td,
411
- .table th,
412
- .modal-card {
413
- border-color: var(--theme-table-border, var(--bulma-border, currentColor));
414
- }
415
- .table thead th {
416
- background-color: var(--theme-table-thead-bg, var(--theme-surface-2, inherit));
417
- }
418
- .input:not(.is-success):not(.is-danger),
419
- .textarea:not(.is-success):not(.is-danger),
420
- .select:not(.is-success):not(.is-danger) select,
421
- .button.is-light {
422
- background-color: var(--theme-surface-1, inherit);
423
- color: var(--theme-text, inherit);
424
- border-color: var(--theme-table-border, var(--bulma-border, currentColor));
425
- }
426
- .input:not(.is-success):not(.is-danger):focus,
427
- .textarea:not(.is-success):not(.is-danger):focus,
428
- .select:not(.is-success):not(.is-danger) select:focus {
429
- border-color: var(--bulma-link);
430
- box-shadow: 0 0 0 0.125em color-mix(in srgb, var(--bulma-link), transparent 80%);
431
- }
432
-
433
- /* Accessibility contrast fixes (Axe) */
434
- [data-flavor='catppuccin-latte'] .navbar-item,
435
- [data-flavor='catppuccin-latte'] .has-text-centered > p,
436
- [data-flavor='catppuccin-latte'] a.navbar-item,
437
- [data-flavor='catppuccin-latte'] .title,
438
- [data-flavor='catppuccin-latte'] h1,
439
- [data-flavor='catppuccin-latte'] h2,
440
- [data-flavor='catppuccin-latte'] h3,
441
- [data-flavor='catppuccin-latte'] h4 {
442
- color: #1e293b; /* strong slate for >=4.5:1 on light bg */
443
- }
444
-
445
- [data-flavor='catppuccin-latte'] .button.is-text,
446
- [data-flavor='catppuccin-latte'] .button.is-ghost,
447
- [data-flavor='catppuccin-latte'] .navbar-item.is-active {
448
- color: #0b66d6; /* deeper blue for >=4.5:1 on light bg */
449
- }
450
-
451
- [data-flavor='github-dark'] strong,
452
- [data-flavor='github-dark'] th,
453
- [data-flavor='github-dark'] .has-text-centered > p {
454
- color: #c9d1d9; /* github-dark foreground */
455
- }
456
-
457
- [data-flavor='github-dark'] .button.is-text,
458
- [data-flavor='github-dark'] .button.is-ghost {
459
- color: #58a6ff; /* accessible link blue on dark bg */
460
- }