Skip to content

Conversation

@ramiy
Copy link
Contributor

@ramiy ramiy commented Nov 12, 2025

I added the CSS @custom-media at-rule in #3325 . But since no browser implemented this feature, we didn't added compat_features param.

Now, Firefox 147 became the first browser to support this feature https://bugzilla.mozilla.org/show_bug.cgi?id=1744292

I updated the BCD project to reflect this change mdn/browser-compat-data#28438

This PR updates the custom-media-queries web feature setting the compat_features param.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Nov 12, 2025
@ramiy ramiy changed the title Update Custom Media Queries Update Custom Media Queries - Add BCD Nov 12, 2025
@ramiy ramiy changed the title Update Custom Media Queries - Add BCD Custom Media Queries - Add BCD Nov 13, 2025
# - css.at-rules.custom-media
# - api.CSSCustomMediaRule
# - api.CSSCustomMediaRule.name
# - api.CSSCustomMediaRule.query
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you need to do a bit of explaining here. What happened with the other keys? 😅

Copy link
Contributor Author

@ramiy ramiy Nov 13, 2025

Choose a reason for hiding this comment

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

Ok, I added only css.at-rules.custom-media to BCD, the other keys don't exist - no browser supports them.

See BCD v7.1.21 changelog: https://github.com/mdn/browser-compat-data/releases/tag/v7.1.21

You can also check the code: https://github.com/mdn/browser-compat-data/tree/v7.1.21/api

Currently, the CSSCustomMediaRule doesn't exist. Only the CSS @custom-media at-rule is supported.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I understood that the key css.at-rules.custom-media was added to BCD mdn/browser-compat-data#28438. But in this PR, you removed the comment for the other keys without explanation.

I went ahead and dug into this myself. I turned on the preference shown in the data and the CSSCustomMediaRule interface is exposed (there's also code for it in the diff from the Firefox bug you linked in BCD). So two things need to happen here:

  1. Against BCD, file an issue noting the missing keys or submit a PR to add the data for the missing API yourself.
  2. In this PR, reinstate the comment for the api.CSSCustomMediaRule key and its descendants.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ramiy ramiy requested a review from ddbeck November 13, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants