Skip to content

Duplicative styles on children #76

@sawyerclick

Description

@sawyerclick

what's wrong
Child elements should not duplicate explicit styles.

There are several instances where inherited styles are explicitly stated. This baloons file size and makes it hard to quickly parse the inheritance chain.

The parent <p> tag's styling and the .f2h-text-0 styling:
Screen Shot 2023-01-17 at 1 38 31 PM

The elements:
Screen Shot 2023-01-17 at 1 34 19 PM

how to fix
Output only unique styles to each element. This could be done by finding the difference between an Object of the CSS properties. You would check child against parent, and we could possibly make this recursive from child to nth-parent.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions