-
Notifications
You must be signed in to change notification settings - Fork 199
Adds numeric, string, position, and url CSS types #2111
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
Changes from all commits
ee8ea61
406d572
a3f8e63
c3e386a
8008a67
0b2cc53
d5cc560
0a94d9f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| name: angle | ||
| description: The `angle` CSS type represents a portion of a circle, expressed in degrees (`deg`), gradians (`grad`), radians (`rad`), or turns (`turn`). | ||
| spec: https://drafts.csswg.org/css-values-4/#angles | ||
| group: types | ||
| compat_features: | ||
| - css.types.angle | ||
| - css.types.angle-percentage | ||
| - css.types.angle.deg | ||
| - css.types.angle.grad | ||
| - css.types.angle.rad | ||
| - css.types.angle.turn | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Generated from: angle.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2015-07-29 | ||
| baseline_high_date: 2018-01-29 | ||
| support: | ||
| chrome: "2" | ||
| chrome_android: "18" | ||
| edge: "12" | ||
| firefox: "13" | ||
| firefox_android: "14" | ||
| safari: "4" | ||
| safari_ios: "3.2" | ||
| compat_features: | ||
| # baseline: high | ||
| # baseline_low_date: 2015-07-29 | ||
| # baseline_high_date: 2018-01-29 | ||
| # support: | ||
| # chrome: "2" | ||
| # chrome_android: "18" | ||
| # edge: "12" | ||
| # firefox: "3.6" | ||
| # firefox_android: "4" | ||
| # safari: "4" | ||
| # safari_ios: "3.2" | ||
| - css.types.angle | ||
| - css.types.angle-percentage | ||
| - css.types.angle.deg | ||
| - css.types.angle.grad | ||
| - css.types.angle.rad | ||
|
|
||
| # ⬇️ Same status as overall feature ⬇️ | ||
| # baseline: high | ||
| # baseline_low_date: 2015-07-29 | ||
| # baseline_high_date: 2018-01-29 | ||
| # support: | ||
| # chrome: "2" | ||
| # chrome_android: "18" | ||
| # edge: "12" | ||
| # firefox: "13" | ||
| # firefox_android: "14" | ||
| # safari: "4" | ||
| # safari_ios: "3.2" | ||
| - css.types.angle.turn |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| name: calc-size | ||
| description: The `calc-size()` CSS function computes mathematical expressions that include keyword values such as `calc-size(fit-content, size / 2)`. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know a lot about this one, but I think it makes sense as a stand alone feature, being a pretty distinct later addition to
I suspect we also need a "Not to be confused with the |
||
| spec: https://drafts.csswg.org/css-values-5/#calc-size | ||
| group: types | ||
| compat_features: | ||
| - css.types.calc-size | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Generated from: calc-size.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: false | ||
| support: | ||
| chrome: "129" | ||
| chrome_android: "129" | ||
| edge: "129" | ||
| compat_features: | ||
| - css.types.calc-size |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,12 @@ | ||
| name: calc() | ||
| description: The `calc()` CSS function computes mathematical expressions such a `calc(100%/3 - 1em)`. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an exception that proves the rule, by the way. 😅 |
||
| spec: https://drafts.csswg.org/css-values-3/#calc-notation | ||
| group: css | ||
| group: types | ||
| caniuse: calc | ||
| status: | ||
| compute_from: css.types.calc | ||
| compat_features: | ||
| - css.types.calc | ||
| - css.types.calc.gradient_color_stops | ||
| - css.types.calc.nested | ||
| - css.types.calc.number_values | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| name: frequency | ||
| description: The `frequency` CSS type represents a frequency value, expressed in hertz (`Hz`), or kilohertz (`kHz`). | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MDN says, "It is not currently used in any CSS properties." Is that true? If so, I think we should drop this feature and push to remove them from BCD. |
||
| spec: https://drafts.csswg.org/css-values-4/#frequency | ||
| group: types | ||
| compat_features: | ||
| - css.types.frequency | ||
| - css.types.frequency-percentage | ||
| - css.types.frequency.hz | ||
| - css.types.frequency.khz | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Generated from: frequency.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: false | ||
| support: {} | ||
| compat_features: | ||
| - css.types.frequency | ||
| - css.types.frequency-percentage | ||
| - css.types.frequency.hz | ||
| - css.types.frequency.khz |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| name: length | ||
| description: The `length` CSS type represents a distance value. Distance values can be expressed in font-relative units such as ems (`em`), viewport-relative units such as viewport width (`vw`), or absolute units such as pixels (`px`). | ||
| spec: https://drafts.csswg.org/css-values-4/#lengths | ||
| group: types | ||
| compat_features: | ||
| - css.types.length | ||
| - css.types.length-percentage | ||
|
Comment on lines
+6
to
+7
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should put these with the |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Generated from: length.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2015-07-29 | ||
| baseline_high_date: 2018-01-29 | ||
| support: | ||
| chrome: "1" | ||
| chrome_android: "18" | ||
| edge: "12" | ||
| firefox: "1" | ||
| firefox_android: "4" | ||
| safari: "1" | ||
| safari_ios: "1" | ||
| compat_features: | ||
| - css.types.length | ||
| - css.types.length-percentage |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| name: Numeric types (CSS) | ||
| description: The `integer`, `number`, and `percentage` CSS types represent quantities, indexes, or positions depending on the CSS property to which they are assigned. The `dimension` CSS type represents a value of a specific unit, such as pixels or ems. The `dimension` subtypes define which units are valid for that type. | ||
| spec: https://drafts.csswg.org/css-values-4/#numeric-types | ||
| group: types | ||
| compat_features: | ||
| - css.types.dimension | ||
| - css.types.integer | ||
| - css.types.number | ||
| - css.types.number.scientific_notation | ||
| - css.types.percentage | ||
|
Comment on lines
+6
to
+10
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, I'm struggling to think of these as a feature of CSS. Can we put them somewhere ancient and plausible? Perhaps…
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Generated from: numeric-types.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2017-03-27 | ||
| baseline_high_date: 2019-09-27 | ||
| support: | ||
| chrome: "43" | ||
| chrome_android: "43" | ||
| edge: "12" | ||
| firefox: "29" | ||
| firefox_android: "29" | ||
| safari: "10.1" | ||
| safari_ios: "10.3" | ||
| compat_features: | ||
| # baseline: high | ||
| # baseline_low_date: 2015-07-29 | ||
| # baseline_high_date: 2018-01-29 | ||
| # support: | ||
| # chrome: "1" | ||
| # chrome_android: "18" | ||
| # edge: "12" | ||
| # firefox: "1" | ||
| # firefox_android: "4" | ||
| # safari: "1" | ||
| # safari_ios: "1" | ||
| - css.types.dimension | ||
| - css.types.integer | ||
| - css.types.number | ||
| - css.types.percentage | ||
|
|
||
| # ⬇️ Same status as overall feature ⬇️ | ||
| # baseline: high | ||
| # baseline_low_date: 2017-03-27 | ||
| # baseline_high_date: 2019-09-27 | ||
| # support: | ||
| # chrome: "43" | ||
| # chrome_android: "43" | ||
| # edge: "12" | ||
| # firefox: "29" | ||
| # firefox_android: "29" | ||
| # safari: "10.1" | ||
| # safari_ios: "10.3" | ||
| - css.types.number.scientific_notation |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| name: position (CSS type) | ||
| description: The `position` CSS type represents the position of a non-element object, such as a background or transform origin, within a positioning area. | ||
| spec: https://drafts.csswg.org/css-values-4/#position | ||
| group: types | ||
| compat_features: | ||
| - css.types.position | ||
| - css.types.position.four_value_syntax | ||
| - css.types.position.keyword_value_syntax | ||
|
Comment on lines
+6
to
+8
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe move these to where background-position ends up? |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Generated from: position-type.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2015-07-29 | ||
| baseline_high_date: 2018-01-29 | ||
| support: | ||
| chrome: "25" | ||
| chrome_android: "25" | ||
| edge: "12" | ||
| firefox: "13" | ||
| firefox_android: "14" | ||
| safari: "7" | ||
| safari_ios: "7" | ||
| compat_features: | ||
| # baseline: high | ||
| # baseline_low_date: 2015-07-29 | ||
| # baseline_high_date: 2018-01-29 | ||
| # support: | ||
| # chrome: "1" | ||
| # chrome_android: "18" | ||
| # edge: "12" | ||
| # firefox: "1" | ||
| # firefox_android: "4" | ||
| # safari: "1" | ||
| # safari_ios: "1" | ||
| - css.types.position | ||
| - css.types.position.keyword_value_syntax | ||
|
|
||
| # ⬇️ Same status as overall feature ⬇️ | ||
| # baseline: high | ||
| # baseline_low_date: 2015-07-29 | ||
| # baseline_high_date: 2018-01-29 | ||
| # support: | ||
| # chrome: "25" | ||
| # chrome_android: "25" | ||
| # edge: "12" | ||
| # firefox: "13" | ||
| # firefox_android: "14" | ||
| # safari: "7" | ||
| # safari_ios: "7" | ||
| - css.types.position.four_value_syntax |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| name: string (CSS type) | ||
| description: The `string` CSS type represents a sequence of characters. | ||
| spec: https://drafts.csswg.org/css-values-4/#string-value | ||
| group: types | ||
| compat_features: | ||
| - css.types.string | ||
| - css.types.string.unicode_escaped_characters | ||
|
Comment on lines
+6
to
+7
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Generated from: string-type.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2015-07-29 | ||
| baseline_high_date: 2018-01-29 | ||
| support: | ||
| chrome: "1" | ||
| chrome_android: "18" | ||
| edge: "12" | ||
| firefox: "1" | ||
| firefox_android: "4" | ||
| safari: "1" | ||
| safari_ios: "1" | ||
| compat_features: | ||
| - css.types.string | ||
| - css.types.string.unicode_escaped_characters |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| name: time (CSS type) | ||
| description: The `time` CSS type represents a duration, expressed in seconds (`s`) or milliseconds (`ms`). | ||
| spec: https://drafts.csswg.org/css-values-4/#time-value | ||
| group: types | ||
| compat_features: | ||
| - css.types.time | ||
| - css.types.time-percentage | ||
|
Comment on lines
+6
to
+7
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Generated from: time-type.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2015-07-29 | ||
| baseline_high_date: 2018-01-29 | ||
| support: | ||
| chrome: "1" | ||
| chrome_android: "18" | ||
| edge: "12" | ||
| firefox: "4" | ||
| firefox_android: "4" | ||
| safari: "3.1" | ||
| safari_ios: "2" | ||
| compat_features: | ||
| - css.types.time | ||
| - css.types.time-percentage |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| name: url (CSS type) | ||
| description: The `url` CSS type represents an external resource. | ||
| spec: https://drafts.csswg.org/css-values-4/#urls | ||
| group: types | ||
| compat_features: | ||
| - css.types.url | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Generated from: url-type.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2015-07-29 | ||
| baseline_high_date: 2018-01-29 | ||
| support: | ||
| chrome: "1" | ||
| chrome_android: "18" | ||
| edge: "12" | ||
| firefox: "1" | ||
| firefox_android: "4" | ||
| safari: "1" | ||
| safari_ios: "1" | ||
| compat_features: | ||
| - css.types.url |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Features that define CSS types. | ||
| name: Types | ||
| parent: css |
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.
My hunch here is that these belong with
linear-gradient()(being the younger of it andtransform).