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 parsing support for supports
conditions
#530
add parsing support for supports
conditions
#530
Conversation
supports
conditions
@romainmenke are you thinking we should release with this warning for |
I am hoping it is temporary. The state in this pull request is something that can be released if needed. I plan to continue work towards full support for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's split the addition of c8 into its own PR.
Code here LGTM.
Thank you for the review 🙇 |
see : #529
supports
conditionsFully implementing supports conditions will require a fairly large refactor and the codebase is already very complex.
I would like to first do a few refactors.
This is one of them.
I've added
c8
to ensure that test coverage remains high throughout this process.Initially the parsing algorithm was a simple split:
media
conditionWith
layer
andsupports
something more flexible is needed.I've changed the parsing algorithm to a loop that keeps track of what has been encountered and errors on any unexpected sequences.
Any
supports
conditions will give errors:This is a behavior change.
Before this PR
supports
conditions would be treated as if they weremedia
conditions, which is also incorrect.Both behaviors are "broken" but after this change CSS authors will receive more meaningful feedback.