Hacker News new | ask | show | jobs
by ivanca 3956 days ago
Unfortunately Shadow DOM inherits CSS properties such as color;font-family.
2 comments

Yes, certain properties cascade through the shadow boundary. That's completely intended, and easy to work around by using a shadow-scoped reset if you need to, but otherwise it's useful to be able to set the font or color for an entire tree-scope at once.
Where do you read that? I just checked the spec and coundt find this exception to the rule.
I didn't, it is how it works in latest Chrome.

In all fairness, that's how a blank browser works by default (e.g. Times News Roman is the inherited font-family if you don't specify one) so is very likely the intended behavior.