-
Notifications
You must be signed in to change notification settings - Fork 128
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
Use the prop!
macro for all style properties
#128
Conversation
Codecov Report
@@ Coverage Diff @@
## main #128 +/- ##
========================================
- Coverage 3.20% 3.18% -0.02%
========================================
Files 54 54
Lines 9684 9764 +80
========================================
+ Hits 310 311 +1
- Misses 9374 9453 +79
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
} | ||
} | ||
#[derive(Debug, Clone)] | ||
pub struct Style { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if it's better to move StyleMap fields here. e.g.
pub struct Style {
pub(crate) map: HashMap<StylePropRef, StyleMapValue<Rc<dyn Any>>>,
pub(crate) selectors: HashMap<StyleSelector, StyleMap>,
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's quite a bit of stuff that can be refactored with this PR. I feel like the PR is sufficiently large already though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we can merge this first and work on stuff in another PR.
don't know why this has conflicts after merging #127 |
GitHub's modifying the commits when you merge, so it didn't skip the commit for #127. |
This replaces the builtin style field properties with properties defined by the
proc!
macro. This makes them work with thehover
method and animations (for some types).This is based on top of #127.