Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

[bs-css] compiles flex to flex-shrink, flex-grow, flex-basis #14

Open
thangngoc89 opened this issue Jul 1, 2018 · 0 comments
Open

[bs-css] compiles flex to flex-shrink, flex-grow, flex-basis #14

thangngoc89 opened this issue Jul 1, 2018 · 0 comments

Comments

@thangngoc89
Copy link
Contributor

thangngoc89 commented Jul 1, 2018

Currently, bs-css only supports the simplest format of flex property: flex: 1 but there are more complex cases like:

flex: none                                            /* value 'none' case */
flex: <'flex-grow'>                                   /* One value syntax, variation 1 */
flex: <'flex-basis'>                                  /* One value syntax, variation 2 */
flex: <'flex-grow'> <'flex-basis'>                    /* Two values syntax, variation 1 */
flex: <'flex-grow'> <'flex-shrink'>                   /* Two values syntax, variation 2 */
flex: <'flex-grow'> <'flex-shrink'> <'flex-basis'>    /* Three values syntax */
flex: inherit

(from https://css-tricks.com/almanac/properties/f/flex/)

As per css best practice, it's recommended that you use flex shorthand property and avoid flex-shrink, flex-grow, flex-basis because flex will override all of them.

I hope that this ppx can automatically expand the flex property without compromising css's "best pratice" or use just unsafe if that's too much troubles.
What do you think?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant