Skip to content

Fix: cybertopia themes render correctly in shadow DOM #4277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 7, 2025

Conversation

hbgl
Copy link
Contributor

@hbgl hbgl commented Jun 7, 2025

Changes

The cybertopia themes used the :root selector to define CSS variables for theming. The :root selector does not work when inside a shadow DOM. To fix the issue I changed the selector :root to :root, :host to make it work in both light and shadow DOM.

Checklist

  • Markup tests, because the change only related to theming
  • Updated the changelog at CHANGES.md

Copy link

github-actions bot commented Jun 7, 2025

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

7 files changed

Total change +9 B

View Changes
file base pr diff
es/core.min.js 8.19 KB 8.19 KB -3 B
es/highlight.min.js 8.19 KB 8.19 KB -3 B
highlight.min.js 8.23 KB 8.23 KB -3 B
styles/cybertopia-cherry.min.css 548 B 552 B +4 B
styles/cybertopia-dimmer.min.css 565 B 570 B +5 B
styles/cybertopia-icecap.min.css 551 B 556 B +5 B
styles/cybertopia-saturated.min.css 567 B 571 B +4 B

@joshgoebel joshgoebel merged commit 4a1baca into highlightjs:main Jun 7, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants