feat: Add flex styles to mergeStyles #2731
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Flex style props are not part of
mergeStyles
. This will cause breaking changes if we remove style props from a component when an application uses flex style props. For example,If we used a
flexDirection
style prop in v10, but move it to a Stencil in v11, theflexDirection="row"
will no longer work. This is becausemergeStyles
is covering all style props except for flex style props likeflexDirection
. TheflexDirection
prop will be prop drilled all the way down to theFlex
layout component which will now be applied under theflexDirection: 'column'
of the Stencil, changing the behavior of the style prop. It is not our intention to break style props in v11, so themergeStyles
should handle all style props so that passing style props this way always overrides.Release Category
Components
Checklist
ready for review
has been added to PRFor the Reviewer