Skip to content

Fix: Apply type defaults to nodes without class attribute#116

Merged
ffAudio merged 1 commit intoffAudio:mainfrom
isnotinvain:fix-types-without-class
Dec 7, 2025
Merged

Fix: Apply type defaults to nodes without class attribute#116
ffAudio merged 1 commit intoffAudio:mainfrom
isnotinvain:fix-types-without-class

Conversation

@isnotinvain
Copy link
Contributor

The Types section in stylesheets was only being checked inside the class iteration loop, meaning nodes without any class attribute would never receive type defaults. This adds the type lookup as a fallback after the class loop.

For example, if you have:

<Types>
        <View background-color="$x" />
</Types>

The background color doesn't apply to Views with no class attached to them. If you add any class they do get picked up.

The Types section in stylesheets was only being checked inside the
class iteration loop, meaning nodes without any class attribute would
never receive type defaults. This adds the type lookup as a fallback
after the class loop.
Copy link
Owner

@ffAudio ffAudio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to expand that lookup.
Thanks for finding that!

@ffAudio ffAudio merged commit 7faa1de into ffAudio:main Dec 7, 2025
4 checks passed
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