What's new in CSS4
webmonkey.com
What's new in CSS4
1–10 of 33 posts
Re: What's new in CSS4
#2Re: What's new in CSS4
#3Re: What's new in CSS4
#4Re: What's new in CSS4
#5I don't need new selectors, I need a way to specify layouts. You know, to do the same things as tables did back in the days, but without all the ugliness.
Re: What's new in CSS4
#6Parent selector is cool but I've needed it at most 2-3% of the time when designing a site. As of now, it doesn't appear to support things I really need in almost all mid-large site layouts: variables, mixins/functions, operations, and namespaces. This means even 5 years from now, I'll need http://lesscss.org/ because browsers with CSS4 won't support variables. How does one go about suggesting to W3C that they should…
(which links to through to a www-style list discussion from October 24: http://lists.w3.org/Archives/Public/www-style/2011Oct/0699.h...)
Re: What's new in CSS4
#7Parent selector is cool but I've needed it at most 2-3% of the time when designing a site. As of now, it doesn't appear to support things I really need in almost all mid-large site layouts: variables, mixins/functions, operations, and namespaces. This means even 5 years from now, I'll need http://lesscss.org/ because browsers with CSS4 won't support variables. How does one go about suggesting to W3C that they should…
Re: What's new in CSS4
#8Does this accomplish anything above and beyond what XPath is capable of? I've always wondered why W3C has been pushing more than one standard for selecting elements in SGML and XML documents.
Nope. In terms of pure capabilities CSS selectors are still (mostly) a subset of XPath selectors (even XPath 1.0 I'd say)
> I've always wondered why W3C has been pushing more than one standard for selecting elements in SGML and XML documents.
I don't have an answer, but I see 4 reasons:
* NIH, the W3C is not really a big coherent group, and technically CSS selectors predate XPath (CSS level 1 became a CR in December 1996, XPath 1.0 did not reach this status before November 1999)
* CSS selectors are purpose-built for HTML and have efficient (and simple) shortcuts for a bunch of tasks: selecting on ids or classes has a 1-character overhead in CSS versus XPath having 5 for ids and classes... well you're looking at a good 50 characters in XPath 1 (w/o exslt) I'd say, there just isn't a convenient way to say "an element with this value in an attribute which is a space-separated list of names". Another one is XPath being built for parent/child relationships where CSS selectors default to ancestor/descendant relations, and makes it easier and shorter to broadly apply rules. The last one would be pseudo-classes and pseudo-elements, to handle these in XPath you'd have to add a bunch of functions to the core set (see point 4 for what I think of XPath functions)
* For rendering-speed reasons, CSS are processed back-to-front, I'm not sure how good/easy it would be to process XPath that way (not too hard I'd guess, but it definitely wasn't standardized based on this thinking)
* XPath is actually pretty complex, much more so than CSS selectors (even CSS3 or CSS4 selectors), I know I always a hard time with getting those fucking funcalls right, the syntax is fiddly and different XPath libraries tend to behave very differently on namespacing & al of funcalls. Also, the data-typing is complete shit.
I like XPath 1.0 (though I think XPath 2.0 went full retard in backporting XQuery stuff and integrating a bunch of garbage relevant only to XSLT 2.0), but while I regularly pine for some specific XPath features in CSS selectors (usually more flexible axis modifiers) I really wouldn't enjoy having to use XPath instead of CSS in my style sheets.
Re: What's new in CSS4
#9Parent selector is cool but I've needed it at most 2-3% of the time when designing a site. As of now, it doesn't appear to support things I really need in almost all mid-large site layouts: variables, mixins/functions, operations, and namespaces. This means even 5 years from now, I'll need http://lesscss.org/ because browsers with CSS4 won't support variables. How does one go about suggesting to W3C that they should…
Why slow down CSS with constructs that can be achieved by prior compilation and a few Makefiles?
Because unless you suggest adding source maps to CSS (even though they still are not in JS), a preprocessor generating CSS makes CSS far more annoying to debug or play around with than native constants support would (and even with source maps, the usability of devtools style inspectors and editors would be significantly inferior to native support)
Re: What's new in CSS4
#10Parent selector is cool but I've needed it at most 2-3% of the time when designing a site. As of now, it doesn't appear to support things I really need in almost all mid-large site layouts: variables, mixins/functions, operations, and namespaces. This means even 5 years from now, I'll need http://lesscss.org/ because browsers with CSS4 won't support variables. How does one go about suggesting to W3C that they should…
http://news.ycombinator.com/item?id=3162221 (which links to through to a www-style list discussion from October 24: http://lists.w3.org/Archives/Public/www-style/2011Oct/0699.h... )