- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Thu, 2 May 2013 09:47:56 -0700
- To: François REMY <francois.remy.dev@outlook.com>
- Cc: Tom Wardrop <tom@tomwardrop.com>, "www-style@w3.org" <www-style@w3.org>
- Message-Id: <3805AC17-AB79-4CF7-9D36-7C8F55F0471E@gmail.com>
On Apr 29, 2013, at 8:52 AM, François REMY <francois.remy.dev@outlook.com> wrote: >> From brad.kemper@gmail.com: >> Styling is exactly what generated content is for. > > Please don't make such bold statements without making sure you're right on them. I'm surprised you think it is a controversial statement. I don't think it is bold at all. CSS exists in order to separate styling from content and semantic structure. For instance, CSS 2.1 states design principles that include "[CSS is] complementary to structured documents. Style sheets complement structured documents [...] providing stylistic information for the marked-up text." [1] Are you suggesting that the generated content section of CSS2.1 or the CSS3 generated content module are unstated exceptions to this principle? > I would invite you to read the CSS Generated Content [1]'s abstract, introduction and table of contents: A working draft, that hasn't advanced in ten years, full of features that have mostly not been implemented. OK. > the spec covers absolutely nothing outside what is some real generated content like quotes, li markers, chapter & section header and in-document references. It defines the features it wants to define: some stylistic enhancements to the content of the source document. That doesn't make it the definitive canon for all future ideas of other ways to generate content in CSS, or why an author would want to do so. > CSS Generated content was created with only this in mind. How do you figure? You're saying you know what was in the mind of of those who first created the idea of generated content, and that is all fully contained within this working draft? And that proves that generated content is not to ever be used for other types of styling? I'd say that's absurd. > However, people noticed it could also be used for more diverse styling by generating new content boxes à la XSLT and they were used a lot for this purpose. "People noticed"? So it was just an accident or side effect that ::before and ::after pseudo-elements with generated content, even when the content was an empty string, allowed for full styling as boxes, and people only noticed that later? And because authors liked this feature, and used it creatively to complement the structured document, that this is somehow a perversion of its original intent, and such use should be discouraged? When the 'content' property was designed and spec'ed, it could have contained a stipulation that empty string content was prohibited, and that there must be some glyphs or pictures in order to work. It did not have this restriction, and I have no reason to believe that was unintentional. > It's not because pseudo-elements were the revelator of this need that they are the best suited solution for the problem. I didn't actually say that they are the best solution to the problem (though so far, they sound a lot better than your alternatives), I merely contested your remarkable assertion that generated content is not for styling. >> I would love to have multiple ::before and ::after pseudos, as well as ::wrap, ::wrap-inner, etc. from jQuery. > > I think what really matters is not what you would like but why you would like it (ie: use cases). If your uses case really cover CONTENT generation, then I think we should have a closer look on them. However if your idea is to add styling modifications to the content by generating new BOXES, decorators are really the best option. I think you are getting too hung up on the word "content" and letting it drive a ideological argument against a convenient and familiar way to generate boxes in CSS, just because those boxes are not also generating text or pictures. If the module had be titled "generated stylable objects", you would probably have had no problem with people using it to create empty boxes, even if nothing else in the module changed. 1] http://www.w3.org/TR/CSS2/intro.html#design-principles
Received on Thursday, 2 May 2013 16:48:26 UTC