Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

User-Agent Stylesheet

  • 2 回覆
  • 0 有這個問題
  • 25 次檢視
  • 最近回覆由 Paul

more options

In May 2025 all browsers should have removed the default styling for the h1 element when it is nested in a sectioning element (article, aside, nav, section). I went into Firefox Dev Editions user-agent style sheet and noticed that the styling for nested h1 elements is still the same. I'm wondering why that is the case, since I was under the impression that all the major browsers had completed make the necessary adjustments at the end of May 2025.

In May 2025 all browsers should have removed the default styling for the h1 element when it is nested in a sectioning element (article, aside, nav, section). I went into Firefox Dev Editions user-agent style sheet and noticed that the styling for nested h1 elements is still the same. I'm wondering why that is the case, since I was under the impression that all the major browsers had completed make the necessary adjustments at the end of May 2025.

被選擇的解決方法

Hi Paul, the MDN article says this was rolled out to all users in Firefox 140:

https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements => Browser Compatibility section

During the rollout, the change was controlled by a temporary preference. Can you check your about:config to confirm:

layout.css.h1-in-section-ua-styles.enabled => false

If you check the source of Firefox 140 and Firefox 141 beta, you'll notice the nesting is gated by the value of that preference at:

A change has already been checked in to Nightly to delete the temporary preference and that rules section in Firefox 142: https://bugzilla.mozilla.org/show_bug.cgi?id=1976196

Since you are acquainted with this change, if you notice any problems with the implementation, please file a new bug.

從原來的回覆中察看解決方案 👍 0

所有回覆 (2)

more options

選擇的解決方法

Hi Paul, the MDN article says this was rolled out to all users in Firefox 140:

https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements => Browser Compatibility section

During the rollout, the change was controlled by a temporary preference. Can you check your about:config to confirm:

layout.css.h1-in-section-ua-styles.enabled => false

If you check the source of Firefox 140 and Firefox 141 beta, you'll notice the nesting is gated by the value of that preference at:

A change has already been checked in to Nightly to delete the temporary preference and that rules section in Firefox 142: https://bugzilla.mozilla.org/show_bug.cgi?id=1976196

Since you are acquainted with this change, if you notice any problems with the implementation, please file a new bug.

有幫助嗎?

more options

Thanks for the quick response.

I checked the setting and you are right it is turned off.

有幫助嗎?

問個問題

如果您還沒有帳號,您必須先登入帳號 來回覆文章。還沒有帳號的話,只能發問新問題