3 ms·
Unfortunately Shadow DOM inherits CSS properties such as color;font-family.
by ivanca 11y ago
Unfortunately Shadow DOM inherits CSS properties such as color;font-family.
- TeeWEE 11y agoWhere do you read that? I just checked the spec and coundt find this exception to the rule.
- ivanca 11y agoI 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.
- spankalee 11y agoYes, 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.