web-illinois / toolkit

This library provides styles and web components for creating branded UIUC websites.
18 stars 7 forks source link

Name structure problem #212

Closed dlstrong closed 2 years ago

dlstrong commented 3 years ago

https://github.com/web-illinois/toolkit/wiki/Data-attributes - It looks like the name standard here shifted from il-word to word-il. How hard is it to change that back to match the rest of the standard so that people don't have to remember out of their head "oh yeah wait this one thing is name-broken"?

bryanjonker-illinois commented 3 years ago

"data-*" is a fixed thing, so we can't really do that. The good news is the "data-il" is going to be fixed -- we shouldn't have anything else be X-il.

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*

mattsharkey commented 3 years ago

All our custom stuff should be prefixed with il-. But the HTML specs say that custom attributes on existing tags have to be prefixed with data-. In those cases, our custom attributes use both prefixes, which is how you end up with data-il-