[mediaqueries] Improve definition of evaluating media features in boolean context
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
If I understand it correctly, the following is equivalent to the feature evaluates to false for any value that is the number 0, a <dimension> with the value 0, the keyword none, or a value explicitly defined by that media feature to evaluate as false in a boolean context, otherwise it evaluates to true.
If the feature would be true for any value other than the number
0, a<dimension>with the value0, the keywordnone, or a value explicitly defined by that media feature to evaluate as false in a boolean context, the media feature evaluates to true. Otherwise, it evaluates to false.
https://drafts.csswg.org/mediaqueries-5/#mq-boolean-context
I find the current wording a bit hard to read, especially to grasp the last condition, which requires to join these two parts with content in between:
- If the feature would be true for any value other than
- a value explicitly defined by that media feature to evaluate as false in a boolean context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the Media Queries Level 5 boolean context section at the linked specification URL and compare the current wording with the concern described here. Done means the definition is easier to read while preserving the stated cases for false and true evaluation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100