Closed netsi1964 closed 8 years ago
It sure is:
There are no other restrictions on what form an ID can take; in particular, IDs can consist of just digits, start with a digit, start with an underscore, consist of just punctuation, etc.
https://www.w3.org/TR/html5/dom.html#the-id-attribute
CSS won't allow you to target an id beginning with a number, which may be what you're thinking of.
Ok @simonsmith I see, the ID is an exception to the general attribute naming convension in HTML :-) The thing that using numeric only IDs makes it impossible to target it through a hash selector IMHO should also make one consider twice to do that :-) Thanks for replying.
Yeah, using id selectors in SUIT is a no-no so this should cause any issues.
One could also use an attribute selector:
[id='1234'] {
/* does work */
}
Or just change the HTML :)
Thanks for your question though
Love your work, but in https://github.com/suitcss/suit/blob/master/doc/STYLE.md you have an element with a numeric only id. That's not valid HTML, is it?
'<article class="Post" id="1234">'