Remix.run Logo
epolanski 4 hours ago

I love web components, but the fact that there's plenty of shadow-dom piercing properties defeats their purpose of "author them once, reuse them in different applications".

One very common pitfall I encounter is the html's own base font size, since it impacts all the calculations in your webcomponents. Use a webcomponent with a font size of 12/14/16 and you get completely different behavior.

If they were truly isolated they would really scale, but they don't.

catapart 3 hours ago | parent | next [-]

Not to nag, but this seems like a design error? WC font settings should be inherited and relative, rather than any specific pixel size. Designs should be robust enough to support overflowing text, should the user increase scale/zoom/etc.

Admittedly, I might not be understanding your problem well enough, so sorry in advance if I've mischaracterized the issue.

jazzypants 3 hours ago | parent | prev [-]

Shouldn't you be using relative units like rem anyways?

epolanski 2 hours ago | parent [-]

Yes, which makes it very difficult to make stuff work okay cross application at changing of base font and user's zoom.