Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

User-Agent Stylesheet

  • 2 trả lời
  • 0 gặp vấn đề này
  • 166 lượt xem
  • Trả lời mới nhất được viết bởi Paul

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.

Giải pháp được chọn

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.

Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (2)

Giải pháp được chọn

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.

Thanks for the quick response.

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