Skip to content

Conversation

CuddlyBunion341
Copy link
Owner

Add hot reloading of styles.
Extract inline styles of bevy ui elements into separate stylesheet using the bevy_flair crate.

@CuddlyBunion341 CuddlyBunion341 self-assigned this Jan 24, 2025

/* TODO: find out why this is not working when only using a single class */

.focused {
Copy link
Owner Author

Choose a reason for hiding this comment

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

I think that there is a bug in the bevy flair crate that is causing the style not to update when removing a class from the classlist.

The temporary fix is to just declare two classes. This is shitty, but it works.

parent.spawn((
chat_message_input_node(),
Node::default(),
Name::new("chat_message_input"),
Copy link
Owner Author

Choose a reason for hiding this comment

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

The Name components make the structure so much more digestable 🥳

@CuddlyBunion341 CuddlyBunion341 marked this pull request as ready for review January 24, 2025 18:33
@CuddlyBunion341 CuddlyBunion341 enabled auto-merge (squash) January 24, 2025 18:34
@CuddlyBunion341 CuddlyBunion341 merged commit adb28bd into main Jan 24, 2025
3 checks passed
@CuddlyBunion341 CuddlyBunion341 deleted the feature/add-bevy-flair branch January 24, 2025 18:35
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.

1 participant