tr-design icon indicating copy to clipboard operation
tr-design copied to clipboard

Do we need namespacing?

Open darobin opened this issue 11 years ago • 7 comments

The classes used in these styles apply to many documents that also have their own styles. Adding new classes could easily clash. Should we introduce w3c- prefixes for ours?

darobin avatar Apr 09 '15 12:04 darobin

That prefix is likely to be already in use. class="w3c-cr" for example

svgeesus avatar Apr 17 '15 14:04 svgeesus

w3c-* is already used for classes in specs indeed. Although a quick search returns only a few — among those: http://www.w3.org/TR/2000/WD-xmlbase-20000607.html, http://www.w3.org/TR/2001/WD-xinclude-20010516/Overview.html, http://www.w3.org/TR/2014/NOTE-resource-priorities-20141023/Overview.html.

It's used almost only to indicate the type of spec and in the main h2:

<body class="w3c-note">
<h2 class="w3c-doctype" align="center">W3C Working Draft 07-June-2000</h2>

@Nantonos, what does cr stand for? Shouldn't it be tr?

tripu avatar Apr 27 '15 09:04 tripu

@Nantonos, what does cr stand for? Shouldn't it be tr?

CR == Candidate Recommendation, such as http://www.w3.org/TR/2014/CR-html5-20140731/.

astorije avatar Apr 27 '15 13:04 astorije

OK, so I thought at first, but I discarded that meaning because, why use CR as the prefix? I mean, aren't we talking about TR in general, ie all types and kinds of specs?

tripu avatar Apr 27 '15 14:04 tripu

Oh sorry, I misunderstood @Nantonos's comment… I see he was giving an example of such prefix already being used.

So we need a different prefix to be used as a namespace, yes? How about tr-, then? (It's short and generic, probably not used already.)

tripu avatar Apr 27 '15 14:04 tripu

A namespace would have prevented the accidental clash of the .content rule in the UD stylesheet with Bikeshed's use of .content on heading contents, so I'm in favor of this. tr- sounds fine.

tabatkins avatar Jun 11 '15 20:06 tabatkins

I think this is fine for things in the header, but wouldn't make sense for things like examples and notes. However, since we're not changing the header markup at this time, I'm going to leave this open until we do tackle markup.

fantasai avatar Oct 29 '15 08:10 fantasai