3 ms·
There's nothing stopping you from defining those yourself for your own websites: grid { display: grid } will work in every modern browser.
by nicoburns 4mo ago
There's nothing stopping you from defining those yourself for your own websites:
grid { display: grid }
will work in every modern browser.
- littlestymaar 4mo agoFor that to work I would need to define a custom component from JavaScript, wouldn't I? (and I thought custom components had to contain an hyphen in there name, is that wrong?)
- FelipeCortez 4mo agotry it! data:text/html,<grid><p>A</p><p>B</p><p>C</p></grid><style>grid{display: grid}</style> afaik to create a CustomElement you need to use dashes, yes, but in this example `<grid>` is an HTMLUnknownElement, which renders just fine. some discussion here: https://stackoverflow.com/a/22545622/2393963 https://stackoverflow.com/a/22545622/2393963
- littlestymaar 4mo agoTIL thx!
- yencabulator 4mo agoYou're supposed to only use custom elements with a dash in the name. Otherwise the spec can add an element that means something new, and you've accidentally used that name.