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

[css-device-adapt][css-grid][css-shapes][css-speech] Add range notation #7685

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

cdoublev
Copy link
Collaborator

@cdoublev cdoublev commented Sep 4, 2022

Add range notation to some productions used to define a track list.

This change assumes that out of range values are invalid (they are in Chrome/Firefox). This is not explicitly defined in prose, as it is often the case in other specs that use range notation.

EDIT:

After searching for non-negative in all specs, I added a non-negative range notation for:

  • zoom, min-zoom, max-zoom, in CSS Device Adapt
  • <track-size>, <track-breadth>, <inflexible-breadth>, <fixed-breadth>, in CSS Grid 1-2
  • shape-margin in CSS Shapes
  • pause-before, pause-after, rest-before, rest-after, voice-rate, in CSS Speech

I ignored min-width and max-width (descriptors for @viewport) in CSS Device Adapt because there is a note about removing them.

@@ -1593,11 +1593,11 @@ Explicit Track Sizing: the 'grid-template-rows' and 'grid-template-columns' prop
<dfn>&lt;explicit-track-list></dfn> = [ <<line-names>>? <<track-size>> ]+ <<line-names>>?

<dfn>&lt;line-name-list></dfn> = [ <<line-names>> | <<name-repeat>> ]+
<dfn>&lt;track-size></dfn> = <<track-breadth>> | minmax( <<inflexible-breadth>> , <<track-breadth>> ) | fit-content( <<length-percentage>> )
<dfn>&lt;track-size></dfn> = <<track-breadth>> | minmax( <<inflexible-breadth>> , <<track-breadth>> ) | fit-content( <<length-percentage [0,∞]>> )
Copy link
Collaborator Author

@cdoublev cdoublev Sep 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about this one because the related paragraph in the spec does not even define a negative value as invalid.

@svgeesus
Copy link
Contributor

svgeesus commented Sep 4, 2022

This is about grid, not fonts :)

@w3cbot
Copy link

w3cbot commented Sep 4, 2022

svgeesus marked as non substantive for IPR from ash-nazg.

@svgeesus svgeesus added the css-grid-2 Subgrid; Current Work label Sep 4, 2022
@svgeesus svgeesus changed the title [css-fonts-4] Add range notation [css-grid-2] Add range notation Sep 4, 2022
@cdoublev
Copy link
Collaborator Author

cdoublev commented Sep 4, 2022

Doh! Do you want me to rename the commit? It is 100% fine with me if the commit is reworked separately.

@svgeesus
Copy link
Contributor

svgeesus commented Sep 4, 2022

Its fine, I just re-tagged the PR

@cdoublev cdoublev changed the title [css-grid-2] Add range notation [css-device-adapt][css-grid][css-shapes][css-speech] Add range notation Sep 6, 2022
<dfn>&lt;track-breadth></dfn> = <<length-percentage>> | <<flex>> | min-content | max-content | auto
<dfn>&lt;inflexible-breadth></dfn> = <<length-percentage>> | min-content | max-content | auto
<dfn>&lt;fixed-breadth></dfn> = <<length-percentage>>
<dfn>&lt;track-breadth></dfn> = <<length-percentage [0,∞]>> | <<flex [0,∞]>> | min-content | max-content | auto
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 is unitless because <flex> only accepts fr as unit, therefore it conforms to So long as it's clear, I think the range limitation is fine without units (#7400 (comment)).

@@ -568,7 +568,7 @@ The 'pause-before' and 'pause-after' properties</h3>

<pre class=propdef>
Name: pause-before, pause-after
Value: &lt;time&gt; | none | x-weak | weak | medium | strong | x-strong
Value: &lt;time [0s,∞]&gt; | none | x-weak | weak | medium | strong | x-strong
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0s is used instead of 0 for consistency with existing time range notations, but I think it is not required.

@tabatkins
Copy link
Member

Looks good, but in the time since you posted this we've removed the css-device-adapt spec, so now there's a merge conflict. Mind removing that from your PR? r+ to merge after that happens.

@fantasai fantasai merged commit 72d2cd9 into w3c:main Mar 3, 2023
@cdoublev cdoublev deleted the range-notation branch March 4, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-grid-2 Subgrid; Current Work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants