Skip to content

Conversation

@oznogon
Copy link
Contributor

@oznogon oznogon commented Dec 27, 2025

Add an optional inherit keyword to the [base] section of themes. When defined with one or more theme names in a comma-separated list, all style properties not defined in the theme are inherited from the specified parent themes.

All themes inherit from the default theme, which EE already requires.

Also adds an example inherited theme, default-bebas, which overrides fonts with the BebasNeue font already in the repository.

Add an optional inherit keyword to the [base] section of themes.
When defined with one or more theme names in a comma-separated list,
all style properties not defined in the theme are inherited from the
specified parent themes.

All themes inherit from the default theme, which EE already
requires.
@daid
Copy link
Owner

daid commented Dec 28, 2025

This is a very good idea!

I am wondering on the implementation. Wouldn't the code become a lot simpler if you merge at the getFlattenNodesByIds step?

@oznogon
Copy link
Contributor Author

oznogon commented Dec 28, 2025

I was trying to avoid traversing nested maps, especially at onDraw, but maybe in this case nested maps might not be an issue if I only do it when loading/processing the theme.

Flatten themes on load into a temporary nested map and refactor
base style inheritance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants