css-raku / CSS-Properties-raku

CSS property-list manipulation library
Artistic License 2.0
1 stars 1 forks source link

inheritance is subtler than current implementation #5

Closed dwarring closed 4 years ago

dwarring commented 4 years ago

for example 'font-size: 1.5em' shouldn't inherit as this would then imply a further 1.5em expansion of the font-size. This method needs to be made smarter, if it's to be retained.

For now, I've just added the inherited() method and parent() attributes with the aim of allowing agents to build their own simple rendering trees and handle inheritance themselves.

dwarring commented 4 years ago

probably better in the general case. Anything that's processing a DOM probably needs to do its own inheritance, using the newly introduced parent() and inherited() methods.