Is anyone actually using css namespaces?

They cover completely different use cases.

CSS namespaces are for applying CSS to XML documents that mix elements from different XML namespaces. e.g. so you can target <foo:p> and <bar:p> without confusion.

SMACSS covers techniques for writing robust CSS that doesn’t interfere with other parts of the page. e.g. so that .title in your address book HTML doesn’t get muddled with .title in your list of publications HTML.


Further details from the spec:

Note: In HTML, the xmlns attribute has absolutely no effect. It is basically a talisman. It is allowed merely to make migration to and from XHTML mildly easier. When parsed by an HTML parser, the attribute ends up in no namespace, not the “http://www.w3.org/2000/xmlns/” namespace like namespace declaration attributes in XML do.

Leave a Comment

tech