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

Scope CSS to the preview #1

Closed
sonnyp opened this issue Jan 30, 2022 · 1 comment · Fixed by #18
Closed

Scope CSS to the preview #1

sonnyp opened this issue Jan 30, 2022 · 1 comment · Fixed by #18
Milestone

Comments

@sonnyp
Copy link
Contributor

sonnyp commented Jan 30, 2022

The CSS currently applies to the whole window so something like label { color: blue; } will leak outside the preview and into the application controls.

As pointed out in 2e02792 a solution would simply be to prefix all selectors with an id so that everything is scoped to the preview.

With a proper css ast-like parser and serializer it should be straightforward

cool explorer for css ast solutions https://astexplorer.net/

Screenshot from 2022-01-30 17-25-02

@sonnyp
Copy link
Contributor Author

sonnyp commented Jan 30, 2022

https://docs.gtk.org/gtk4/css-overview.html

we might not need a parser

@sonnyp sonnyp added this to the 1.0 milestone Feb 2, 2022
@sonnyp sonnyp closed this as completed in #18 Feb 3, 2022
theCapypara pushed a commit that referenced this issue Mar 3, 2024
Run eslint on python.js and fix formatting
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 a pull request may close this issue.

1 participant