Skip to content

Conversation

@caugner
Copy link
Contributor

@caugner caugner commented Apr 25, 2025

Summary

Changes:

  • Removed type-or-unit subfeature: frequency.
  • Renamed fallback to declaration-value.
  • Renamed type-or-unit to type_function, adding subfeatures: <custom-ident>, <ident>, <image>, <length-percentage>, <resolution>, <string>, <transform-function>.
  • Wrapped all keywords in fences.
  • Added MDN urls, and spec urls.

Test results and supporting details

Related issues

Fixes #25618.

@github-actions github-actions bot added data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS size:l [PR only] 101-1000 LoC changed labels Apr 25, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Apr 25, 2025

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

@github-actions github-actions bot added the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Apr 28, 2025
@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot removed the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Apr 28, 2025
@caugner caugner force-pushed the 25618-update-css-attr-subfeatures branch from b7ac092 to d4ea9c4 Compare April 28, 2025 08:05
@caugner caugner requested a review from Elchi3 April 28, 2025 08:11
@caugner caugner requested review from ddbeck and queengooborg May 16, 2025 12:55
@caugner caugner removed request for Elchi3 and ddbeck June 2, 2025 16:20
@caugner caugner requested a review from hamishwillee June 13, 2025 15:39
@caugner
Copy link
Contributor Author

caugner commented Jun 13, 2025

@hamishwillee Would you mind taking a look at these changes? 🙏

@caugner caugner force-pushed the 25618-update-css-attr-subfeatures branch from 9c31c5d to eccf31e Compare July 8, 2025 12:54
caugner added 2 commits July 17, 2025 19:33
Changes:
- Removed `type-or-unit` subfeature: `frequency`.
- Renamed `fallback` to `fallback-value`.
- Renamed `type-or-unit` to `type_function`.
- Wrapped all keywords in fences.
- Added subfeatures: `custom-ident`, `ident`, `image`,
  `length-percentage`, `resolution`, `string`, `transform-function`.
@caugner caugner force-pushed the 25618-update-css-attr-subfeatures branch from eccf31e to 7060070 Compare July 17, 2025 17:33
Copy link
Contributor

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

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

@caugner Sorry, I missed this request for review - I rarely get asked for reviews here, so worth pinging me directly if I can be of use.

The information seems correct, but I've added some queries on process such as https://github.com/mdn/browser-compat-data/pull/26624/files#r2214505721 that essentially ask:

I'm going to approve but not merge.

@chrisdavidmills You reviewed the docs. Since @caugner is heading away for a few weeks, can you answer/confirm my questions here?

@github-actions github-actions bot removed the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Nov 7, 2025
@caugner caugner force-pushed the 25618-update-css-attr-subfeatures branch from 4a407dc to ac88b42 Compare November 7, 2025 15:41
@github-actions github-actions bot removed the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Nov 7, 2025
],
"support": {
"chrome": {
"version_added": false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

My interpretation of chromium/chromium@01b72da is that <ident> was not supported in Chrome 133.

],
"support": {
"chrome": {
"version_added": false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

My interpretation of chromium/chromium@01b72da is that <image> was not supported in Chrome 133.

],
"support": {
"chrome": {
"version_added": false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

My interpretation of chromium/chromium@01b72da is that <length-percentage> was not supported in Chrome 133.

Copy link
Contributor

Choose a reason for hiding this comment

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

If <length> is supported and <percentage> is supported, what does it mean for <length-percentage> to not be supported?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I understand this correctly, then <length-percentage> is a combination (not a union) of <length> and <percentage>.

It seems to be somewhat similar to https://github.com/search?q=repo%3Amdn%2Fbrowser-compat-data+%2Fmixed_type_parameters%2F&type=code.

Let's merge as is, and follow up separately if need be.

],
"support": {
"chrome": {
"version_added": false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

My interpretation of chromium/chromium@01b72da is that <resolution> was not supported in Chrome 133.

],
"support": {
"chrome": {
"version_added": false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

My interpretation of chromium/chromium@01b72da is that <transform-function> was not supported in Chrome 133.

@caugner caugner requested a review from ddbeck November 7, 2025 16:22
@caugner caugner marked this pull request as ready for review November 7, 2025 16:22
@caugner caugner requested a review from hamishwillee November 12, 2025 09:12
@caugner
Copy link
Contributor Author

caugner commented Nov 12, 2025

@hamishwillee Could you please take another last look? 🙏

"number": {
"__compat": {
"description": "&lt;number&gt;",
"description": "`<number>`",
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also add a separate number keyword.

e.g. attr(data-foo number)

See: https://chromiumdash.appspot.com/commit/def86f45b9de19ae59340f0e73cb0c50da78421e

Copy link
Contributor Author

Choose a reason for hiding this comment

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

}
},
"type-or-unit": {
"type_function": {
Copy link
Contributor

Choose a reason for hiding this comment

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

<attr-type> = type( <syntax> ) | raw-string | number | <attr-unit>

Should we add a separate <attr-unit> type?
e.g. attr(data-foo px)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can add that later if is there is evidence that support for different units were added at different types.

@yisibl
Copy link
Contributor

yisibl commented Nov 26, 2025

Added subfeatures: custom-ident, ident, image, length-percentage, resolution, string, transform-function.

To distinguish it from keywords in the attr attribute, I believe we should be more precise here and add <>.

<attr-type> = type( <syntax> ) | raw-string | number | <attr-unit>

e.g. <custom-ident>, <ident>, <image>, <length-percentage>, <resolution>, <string>, <transform-function>

@caugner caugner added the needs collector update This PR needs a corresponding update to openwebdocs/mdn-bcd-collector. label Dec 5, 2025
Copy link
Contributor

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

This looks plausible to me. One question in a line comment, but I'm happy to see this merge.

],
"support": {
"chrome": {
"version_added": false
Copy link
Contributor

Choose a reason for hiding this comment

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

If <length> is supported and <percentage> is supported, what does it mean for <length-percentage> to not be supported?

@caugner caugner merged commit 6353913 into main Dec 9, 2025
13 checks passed
@caugner caugner deleted the 25618-update-css-attr-subfeatures branch December 9, 2025 17:43
@github-project-automation github-project-automation bot moved this from Todo to Done in BCD meeting agenda Dec 9, 2025
@mdn-bot mdn-bot mentioned this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS meeting agenda Issues or pull requests in need of discussion in a project meeting. needs collector update This PR needs a corresponding update to openwebdocs/mdn-bcd-collector. size:l [PR only] 101-1000 LoC changed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

css.types.attr - Table content not up-to date with latest spec

4 participants