Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a hover style selector #127

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Add a hover style selector #127

merged 1 commit into from
Oct 31, 2023

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Oct 30, 2023

This adds a hover style selector to the Style type. It can be used like:

style(|s| s.hover(|s| s.scroll_bar_color(Color::ROYAL_BLUE)));

Currently it only works with the properties defined by the prop! macro.

@jrmoulton
Copy link
Collaborator

jrmoulton commented Oct 30, 2023

This is the API I want for all hover/modifier styles. This would make it really easy to make a single style that can be applied to a view that would be fully responsive. Responsiveness using some predefined colors/styles would become beautifully trivial.

@dzhou121 dzhou121 marked this pull request as ready for review October 31, 2023 14:33
@dzhou121 dzhou121 merged commit e0015a2 into lapce:main Oct 31, 2023
6 checks passed
@Zoxc Zoxc deleted the hover-selector branch October 31, 2023 14:49
jrmoulton pushed a commit to jrmoulton/floem that referenced this pull request Nov 6, 2023
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.

3 participants