Usually when I create a custom element I wrap it in a section
or other appropriate HTML element and style that, but this leads the DOM looking like custom-element > section
.
My question is, is it wrong to remove the section
and simply treat custom-element
as the root element and style that?
For example I have a custom element called tabs
, right now when it's used the DOM ends up looking like tabs > div.tabs
but I'd prefer to remove the div.tabs
element if there's nothing wrong with that.
So my question is is it "wrong" to style my custom elements and treat them as any other HTML element, or should I continue to ignore my custom elements completely (even though it's hard to do so when you use >
and other selectors)?
section.custom-element-name
all over my code. The DOM looks tidier as well :) – Convolvulaceous