Add grow and shrink aliases (#5733)

This adds `grow-*` and `shrink-*` utilities as aliases for `flex-grow-*` and `flex-shrink-*` since those names are unnecessarily verbose. We will stop documenting the long form ones and consider them deprecated.

```diff
- <div class="flex-grow-0 flex-shrink">
+ <div class="grow-0 shrink">
```
This commit is contained in:
Adam Wathan 2021-10-09 09:48:12 -04:00 • committed by GitHub
parent 6d04c2dcc7
commit d2b53cd3af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 6 deletions

View file

@ -645,8 +645,14 @@ export let corePlugins = {
maxWidth: createUtilityPlugin('maxWidth', [['max-w', ['maxWidth']]]),
flex: createUtilityPlugin('flex'),
flexShrink: createUtilityPlugin('flexShrink', [['flex-shrink', ['flex-shrink']]]),
flexGrow: createUtilityPlugin('flexGrow', [['flex-grow', ['flex-grow']]]),
flexShrink: createUtilityPlugin('flexShrink', [
['flex-shrink', ['flex-shrink']], // Deprecated
['shrink', ['flex-shrink']],
]),
flexGrow: createUtilityPlugin('flexGrow', [
['flex-grow', ['flex-grow']], // Deprecated
['grow', ['flex-grow']],
]),
flexBasis: createUtilityPlugin('flexBasis', [['basis', ['flex-basis']]]),
tableLayout: ({ addUtilities }) => {