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 |
RyanZim
left a comment
There was a problem hiding this comment.
Let's split the addition of c8 into its own PR.
Code here LGTM.
|
Thank you for the review 🙇 |
see : #529
supportsconditionsFully 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
c8to ensure that test coverage remains high throughout this process.Initially the parsing algorithm was a simple split:
mediaconditionWith
layerandsupportssomething 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
supportsconditions will give errors:This is a behavior change.
Before this PR
supportsconditions would be treated as if they weremediaconditions, which is also incorrect.Both behaviors are "broken" but after this change CSS authors will receive more meaningful feedback.