This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14058 - Apparently some people are reading this to mean that it's wrong to refer to section elements in CSS selectors: http://www.stubbornella.org/content/2011/09/06/style-headings-using-html5-sections/ — please clarify to make it obvious that the discouragemen
Summary: Apparently some people are reading this to mean that it's wrong to refer to s...
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-07 13:01 UTC by contributor
Modified: 2011-10-19 22:46 UTC (History)
6 users (show)

See Also:


Attachments

Description contributor 2011-09-07 13:01:48 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html
Multipage: http://www.whatwg.org/C#use-div-for-wrappers
Complete: http://www.whatwg.org/c#use-div-for-wrappers

Comment:
Apparently some people are reading this to mean that it's wrong to refer to
section elements in CSS selectors:
http://www.stubbornella.org/content/2011/09/06/style-headings-using-html5-sect
ions/ — please clarify to make it obvious that the discouragement is limited
to when a <section> element is used only for styling purposes, for example by
adding “only” after “needed”.

Posted from: 2a02:4e8:1:1:218:8bff:feba:5a34 by Smylers@stripey.com
User agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0
Comment 1 Nicole Sullivan 2011-09-07 20:15:55 UTC
As I quoted in my article, the spec is very clear:

"The section element is not a generic container element. When an element is needed for styling purposes or as a convenience for scripting, authors are encouraged to use the div element instead. "

Which I read to mean that section elements should not be added simply to achieve a particular style. They should only be used when semantically relevant. This is why I asserted in the article that we need to structure our CSS in a way that doesn't force sections to be misused, like in the anti-pattern I shared:

https://github.com/cboone/hypsometric-css/blob/master/html5/html5-defaults.css#L426

IMO, the spec is pretty clear. I wouldn't change the wording.
Comment 2 Ian 'Hixie' Hickson 2011-10-19 22:44:56 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: I've tried to make minimal changes to address the apparent confusion. I added an explicit example, too. Hopefully that's enough.
Comment 3 contributor 2011-10-19 22:46:52 UTC
Checked in as WHATWG revision r6704.
Check-in comment: Tweak some text and add an example to try to clarify some confusion.
http://html5.org/tools/web-apps-tracker?from=6703&to=6704