-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Stack] Add useFlexGap
prop
#36404
[Stack] Add useFlexGap
prop
#36404
Conversation
Netlify deploy preview
Bundle size report |
|
||
## Flexbox gap | ||
|
||
To use [flexbox `gap`](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) for the spacing implementation, set flag `useFlexGap` to true. |
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.
To use [flexbox `gap`](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) for the spacing implementation, set flag `useFlexGap` to true. | |
To use [flexbox `gap`](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) for the spacing implementation, set the prop `useFlexGap` to true. |
x all the other instances, I doubt we should ever use "flag" in this context.
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.
niice
<Stack> | ||
<Avatar>W</Avatar> | ||
</Stack> |
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.
Is this a typo?
<Stack> | |
<Avatar>W</Avatar> | |
</Stack> | |
<Avatar>W</Avatar> |
it looks wrong here too https://mui.com/joy-ui/react-stack/#white-space-nowrap in prod.
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 think so but let's fix it in another PR. It is not related to the useFlexGap
prop.
|
||
To use [flexbox `gap`](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) for the spacing implementation, set flag `useFlexGap` to true. | ||
|
||
It removes the [known limitation](#limitations) of the default implementation that uses CSS nested selector. However, CSS flexbox gap is not fully supported in some browsers. We recommend to check the [support percentage](https://caniuse.com/?search=flex%20gap) before using it. |
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.
It removes the [known limitation](#limitations) of the default implementation that uses CSS nested selector. However, CSS flexbox gap is not fully supported in some browsers. We recommend to check the [support percentage](https://caniuse.com/?search=flex%20gap) before using it. | |
It removes the [known limitation](#limitations) of the default implementation that uses CSS nested selector. However, CSS flexbox gap is not fully supported in some browsers. | |
We recommend checking the [support percentage](https://caniuse.com/?search=flex%20gap) before using it. |
x other instances
})); | ||
|
||
const message = `Truncation should be conditionally applicable on this long line of text | ||
as this is a much longer line than what the container can support. `; |
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.
as this is a much longer line than what the container can support. `; | |
as this is a much longer line than what the container can support.`; |
@@ -24,6 +24,14 @@ export interface StackBaseProps { | |||
* Add an element between each child. | |||
*/ | |||
divider?: React.ReactNode; | |||
/** | |||
* If `true`, the CSS flex `gap` is used instead of the pseudo selector approach. | |||
* To enable this flag globally, follow the theme's default props configuration. |
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.
* To enable this flag globally, follow the theme's default props configuration. | |
* To enable this prop globally, follow the theme's default props configuration. |
* If `true`, the CSS flex `gap` is used instead of the pseudo selector approach. | ||
* To enable this flag globally, follow the theme's default props configuration. | ||
* | ||
* ⚠️ Warning: CSS flex `gap` is not fully supported in some browsers, we recommend to check https://caniuse.com/?search=flex%20gap before using this flag. |
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.
* ⚠️ Warning: CSS flex `gap` is not fully supported in some browsers, we recommend to check https://caniuse.com/?search=flex%20gap before using this flag. | |
* ⚠️ Warning: CSS flex `gap` is not fully supported in some browsers, we recommend checking https://caniuse.com/?search=flex%20gap before using this flag. |
@hbjORbj Can you take a look at the description again? |
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.
Looks good👍👍
gap
in Stack #33754