-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Problem The flex section relies on the `SetCSSLengthCommand` command to update elements, both for reading and writing styles. In order for that to work in Tailwind projects, where elements don't have an inline style prop, `SetCSSLengthCommand` needs to read element styles from the "right" property, otherwise the command wouldn't work as intended. ## Fix Use the StyleInfo system from to read the element style info. Details - Refactored `SetCSSLengthCommand` to read elements styles through styleInfo - Created a bespoke prop, `CSSLengthProperty`, to track which props are addressed by `SetCSSLengthCommand`. This way it's easy to tell which props need to be supported by StyleInfo to have `SetCSSLengthCommand` working well - Extended StyleInfo to support `zIndex` (all other props in `CSSLengthProperty` were already supported by `StyleInfo` - Updated the style plugins to support the new StyleInfo props - update the signatures of `fixlengthCommand` and `getCSSNumberFromStyleInfo` to use narrower type for some of their arguments **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Play mode
- Loading branch information
Showing
7 changed files
with
50 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters