Skip to content

Commit 733dfc7

Browse files
committed
fix: force light color-scheme on pretalx-schedule to fix dark modal backgrounds
1 parent edca606 commit 733dfc7

2 files changed

Lines changed: 1 addition & 24 deletions

File tree

src/components/ProgramaPage.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const menuT = menuTexts[lang as keyof typeof menuTexts]
1818
event-url="https://pretalx.com/pycones-2026/"
1919
locale={t.locale}
2020
format="grid"
21-
style="--pretalx-clr-primary: #03004b"></pretalx-schedule>
21+
style="--pretalx-clr-primary: #03004b; color-scheme: light"></pretalx-schedule>
2222

2323
<noscript>
2424
<div class="pretalx-widget">

src/pages/[lang]/programa.astro

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,4 @@ const t = programaTexts[(lang || 'es') as keyof typeof programaTexts]
1616
<ProgramaPage lang={lang || 'es'} />
1717
</div>
1818
<script is:inline src="https://pretalx.com/pycones-2026/widgets/schedule.js"></script>
19-
<script is:inline>
20-
function injectPretalxDialogStyles() {
21-
const schedule = document.querySelector('pretalx-schedule')
22-
if (!schedule?.shadowRoot) return
23-
if (schedule.shadowRoot.querySelector('#pycones-dialog-fix')) return
24-
const style = document.createElement('style')
25-
style.id = 'pycones-dialog-fix'
26-
style.textContent = `
27-
#filter-bottom-sheet-dialog,
28-
#filter-bottom-sheet-dialog .dialog-inner {
29-
background: #fff !important;
30-
color: #0d0f10 !important;
31-
}
32-
`
33-
schedule.shadowRoot.appendChild(style)
34-
}
35-
customElements.whenDefined('pretalx-schedule').then(injectPretalxDialogStyles)
36-
new MutationObserver(injectPretalxDialogStyles).observe(document.body, {
37-
childList: true,
38-
subtree: true,
39-
})
40-
document.addEventListener('astro:page-load', injectPretalxDialogStyles)
41-
</script>
4219
</Layout>

0 commit comments

Comments
 (0)