Skip to content

Conversation

@ramiy
Copy link
Contributor

@ramiy ramiy commented Nov 24, 2025

Description

Firefox 146 added support for @custom-media at-rule, enabling developers to use custom media variables inside @media at-rules.

I already updated BCD, and created a web feature on web platform. This PR adds an article to MDN explaining how and when to use Custom Media Queries.

Additional details

Over a year ago I tried to add this article but it was denied as no browser implemented this feature.

Now, with Firefox implementing it, we can add an article, explaining how to use this feature.

@ramiy ramiy requested review from a team as code owners November 24, 2025 07:52
@ramiy ramiy requested review from chrisdavidmills and dipikabh and removed request for a team November 24, 2025 07:52
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:Firefox Content in the Mozilla/Firefox subtree size/m [PR only] 51-500 LoC changed labels Nov 24, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 24, 2025

Preview URLs (9 pages)
Flaws (9)

Note! 7 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/CSS/Reference/At-rules/@custom-media
Title: @custom-media
Flaw count: 7

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/extension-name
    • /en-US/docs/Web/CSS/CSS_values_and_units/Value_definition_syntax#brackets is a redirect
    • Can't resolve /en-US/docs/Web/CSS/media-query-list
    • /en-US/docs/Web/CSS/CSS_values_and_units/Value_definition_syntax#single_bar is a redirect
    • /en-US/docs/Web/CSS/CSS_values_and_units/Value_definition_syntax#single_bar is a redirect
    • and 2 more flaws omitted

URL: /en-US/docs/Web/CSS/Reference/At-rules/@media
Title: @media
Flaw count: 2

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/media-query-list
    • Can't resolve /en-US/docs/Web/CSS/rule-list
External URLs (2)

URL: /en-US/docs/Mozilla/Firefox/Experimental_features
Title: Experimental features in Firefox


URL: /en-US/docs/Mozilla/Firefox/Releases/146
Title: Firefox 146 release notes for developers (Beta)

(comment last updated: 2025-12-02 16:35:43)

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

Hi there @ramiy! Some really nice work here, thank you! I've got a bunch of comments, but nothing too serious — this is definitely going in the right direction.

ramiy and others added 14 commits November 26, 2025 02:12
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
@ramiy
Copy link
Contributor Author

ramiy commented Dec 1, 2025

@chrisdavidmills I have a question about the following flaws:

image

They are not part of my content. They are caused by:

## Formal syntax

{{csssyntax}}

which generates:

image

Nevertheless, I create an article for rule-list, but the {{csssyntax}} macro is still displayed as a broken link.

It links to:

  • /en-US/docs/Web/CSS/rule-list

Instead of:

  • /en-US/docs/Web/CSS/Reference/Values/rule-list

I tried to look for a way to redirect to the links, but I found only the docs explaining how to move pages, which didn't work.

@sideshowbarker sideshowbarker removed their request for review December 1, 2025 12:58
@chrisdavidmills
Copy link
Contributor

I have a question about the following flaws:

@ramiy I wouldn't worry about this. This is something we really need to fix/improve in the platform.

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

@ramiy much better, and so very nearly there. Just a handful of minor comments on the new additions.

@dipikabh
Copy link
Contributor

dipikabh commented Dec 2, 2025

Thank you @ramiy for taking on this work! 🏆
Thanks @chrisdavidmills for helping out with the review 🙌

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

Awesome work, @ramiy! I think this is ready to merge now.

@chrisdavidmills chrisdavidmills merged commit 3ee2355 into mdn:main Dec 2, 2025
8 checks passed
@ramiy ramiy deleted the custom-media branch December 2, 2025 18:15
@yisibl
Copy link

yisibl commented Dec 8, 2025

This requires adding a live demo to the documentation.
#42201 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs Content:Firefox Content in the Mozilla/Firefox subtree Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants