Skip to content
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

add "part" attribute to treescope_root #38

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

mhuebert
Copy link
Contributor

@mhuebert mhuebert commented Sep 12, 2024

Adding a "part" attribute to the root element would allow users of Treescope to target content in the shadow DOM with CSS rules, eg.

treescope-container::part(treescope_root) {
  font-family: Inconsolata;
}

(context: we use Treescope in our documentation website, and would like consistent style/formatting)

This allows external CSS rules to target the content of treescope shadow node
Copy link
Collaborator

@danieldjohnson danieldjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

The stability of the treescope DOM structure isn't guaranteed across releases, so there's a chance this may break eventually, but it seems like a reasonable solution for now at least.

@copybara-service copybara-service bot merged commit 3d5c361 into google-deepmind:main Sep 13, 2024
4 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.

2 participants