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

Escape the built selector for scoping CSS #256

Merged
merged 2 commits into from
Aug 26, 2020
Merged

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Aug 23, 2020

When container option and slideContainer option have customized containers with specific id and class, Marpit will try to build selectors that are containing specified name as is. It may break the selector for scoping styles if contained invalid names in ID, class name(s), and the tag name defined by Custom Elements. (e.g. class has the name starting with number)

That leads an incorrect rendering for every Marpit slides. Thus, we've added cssesc package and escape invalid strings as selector at postcss/pseudo_selector/replace plugin.

@yhatt yhatt merged commit 6f169f1 into master Aug 26, 2020
@yhatt yhatt deleted the escape-scoped-css-selector branch August 26, 2020 05:47
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.

1 participant