diff --git a/docs/source/_partials/customized-config.blade.php b/docs/source/_partials/customized-config.blade.php index f69383f2a..881ed5dc8 100644 --- a/docs/source/_partials/customized-config.blade.php +++ b/docs/source/_partials/customized-config.blade.php @@ -10,6 +10,9 @@ if (starts_with($line, '-')) { return '
-   ' . e(trim(substr($line, 1))) . '
'; } + if (starts_with($line, '//')) { + return '
    ' . e(trim($line)) . '
'; + } return '
    ' . e(trim($line)) . '
'; })->implode("\n") !!}
}
diff --git a/docs/source/_partials/variants-and-disabling.blade.php b/docs/source/_partials/variants-and-disabling.blade.php new file mode 100644 index 000000000..38e30fba9 --- /dev/null +++ b/docs/source/_partials/variants-and-disabling.blade.php @@ -0,0 +1,45 @@ +@php + $whichVariants = "only $variants[0]"; + for ($i = 1; $i < count($variants); $i++) { + $whichVariants .= (($i == count($variants) - 1) ? ' and ' : ', ') . $variants[$i]; + } + + $currentVariants = '\'' . collect($variants)->implode('\', \'') . '\''; + + $extraVariants = collect([ + 'responsive', + 'hover', + 'focus', + 'group-hover', + ])->diff($variants) + ->take(3 - count($variants)) + ->implode(' and '); +@endphp + +

Responsive, Hover, and Focus Variants

+ +

By default, {{ $whichVariants }} variants are generated for {{ $utility['name'] }} utilities.

+ +

You can control which variants are generated for the {{ $utility['name'] }} utilities by modifying the {{ $utility['property'] }} property in the modules section of your Tailwind config file.

+ +

For example, this config will also generate {{ $extraVariants }} variants:

+ +@component('_partials.customized-config', ['key' => 'modules']) + // ... +- {{ $utility['property'] }}: [{{$currentVariants}}], ++ {{ $utility['property'] }}: ['responsive', 'hover', 'focus'], +@endcomponent + +@isset($extraMessage) +

{!! $extraMessage !!}

+@endif + +

Disabling

+ +

If you aren't using the {{ $utility['name'] }} utilities in your project, you can disable them entirely by setting the {{ $utility['property'] }} property to false in the modules section of your config file:

+ +@component('_partials.customized-config', ['key' => 'modules']) + // ... +- {{ $utility['property'] }}: [{{$currentVariants}}], ++ {{ $utility['property'] }}: false, +@endcomponent diff --git a/docs/source/docs/background-attachment.blade.md b/docs/source/docs/background-attachment.blade.md index 42ac796ae..60708655f 100644 --- a/docs/source/docs/background-attachment.blade.md +++ b/docs/source/docs/background-attachment.blade.md @@ -30,3 +30,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'background attachment', + 'property' => 'backgroundAttachment', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/background-color.blade.md b/docs/source/docs/background-color.blade.md index 9fdb51cbc..2ea73bdce 100644 --- a/docs/source/docs/background-color.blade.md +++ b/docs/source/docs/background-color.blade.md @@ -40,3 +40,16 @@ Hover utilities can also be combined with responsive utilities by adding the res ```html ``` + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'background color', + 'property' => 'backgroundColors', + ], + 'variants' => [ + 'responsive', + 'hover', + ], +]) diff --git a/docs/source/docs/background-position.blade.md b/docs/source/docs/background-position.blade.md index 5dd2ae2c5..5b171bc6d 100644 --- a/docs/source/docs/background-position.blade.md +++ b/docs/source/docs/background-position.blade.md @@ -60,3 +60,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'background position', + 'property' => 'backgroundPosition', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/background-repeat.blade.md b/docs/source/docs/background-repeat.blade.md index c1be99d15..ac7994e2a 100644 --- a/docs/source/docs/background-repeat.blade.md +++ b/docs/source/docs/background-repeat.blade.md @@ -34,4 +34,16 @@ features: 'Repeat the background image only vertically.', ], ] -]) \ No newline at end of file +]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'background repeat', + 'property' => 'backgroundRepeat', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/background-size.blade.md b/docs/source/docs/background-size.blade.md index 521ff8913..3f81cf40a 100644 --- a/docs/source/docs/background-size.blade.md +++ b/docs/source/docs/background-size.blade.md @@ -25,3 +25,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'background size', + 'property' => 'backgroundSize', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/border-color.blade.md b/docs/source/docs/border-color.blade.md index 4ab869df3..8bc4f16e1 100644 --- a/docs/source/docs/border-color.blade.md +++ b/docs/source/docs/border-color.blade.md @@ -40,3 +40,16 @@ Hover utilities can also be combined with responsive utilities by adding the res ```html ``` + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'border color', + 'property' => 'borderColors', + ], + 'variants' => [ + 'responsive', + 'hover', + ], +]) diff --git a/docs/source/docs/border-radius.blade.md b/docs/source/docs/border-radius.blade.md index 40a7730ec..4cd4fc28e 100644 --- a/docs/source/docs/border-radius.blade.md +++ b/docs/source/docs/border-radius.blade.md @@ -366,3 +366,13 @@ By default Tailwind provides five border radius size utilities. You can change, - 'full': '9999px', + 'large': '12px', @endcomponent + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'border radius', + 'property' => 'borderRadius', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/border-style.blade.md b/docs/source/docs/border-style.blade.md index a55a342b1..a37b2c5ef 100644 --- a/docs/source/docs/border-style.blade.md +++ b/docs/source/docs/border-style.blade.md @@ -35,3 +35,16 @@ features: ], ] ]) + + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'border style', + 'property' => 'borderStyle', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/border-width.blade.md b/docs/source/docs/border-width.blade.md index 19dca9611..df282009d 100644 --- a/docs/source/docs/border-width.blade.md +++ b/docs/source/docs/border-width.blade.md @@ -37,3 +37,15 @@ For example, `.border` would add a `1px` border to all sides of the element, whe
8 8px
+ +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'border width', + 'property' => 'borderWidths', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/cursor.blade.md b/docs/source/docs/cursor.blade.md index c11acc05c..44c0b9a58 100644 --- a/docs/source/docs/cursor.blade.md +++ b/docs/source/docs/cursor.blade.md @@ -30,3 +30,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'cursor', + 'property' => 'cursor', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/display.blade.md b/docs/source/docs/display.blade.md index bb816e2ef..9364e9358 100644 --- a/docs/source/docs/display.blade.md +++ b/docs/source/docs/display.blade.md @@ -60,3 +60,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'display', + 'property' => 'display', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/flexbox-align-content.blade.md b/docs/source/docs/flexbox-align-content.blade.md index 6f21206e0..0fae06f32 100644 --- a/docs/source/docs/flexbox-align-content.blade.md +++ b/docs/source/docs/flexbox-align-content.blade.md @@ -267,3 +267,16 @@ For more information about Tailwind's responsive design features, check out the @endslot @endcomponent + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'flexbox', + 'property' => 'flexbox', + ], + 'variants' => [ + 'responsive', + ], + 'extraMessage' => 'Note that modifying the flexbox property will affect what variants are generated for all flexbox modules, not just the align-content utilities.' +]) diff --git a/docs/source/docs/flexbox-align-items.blade.md b/docs/source/docs/flexbox-align-items.blade.md index 3428011ad..39f839c32 100644 --- a/docs/source/docs/flexbox-align-items.blade.md +++ b/docs/source/docs/flexbox-align-items.blade.md @@ -147,3 +147,16 @@ For more information about Tailwind's responsive design features, check out the @endslot @endcomponent + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'flexbox', + 'property' => 'flexbox', + ], + 'variants' => [ + 'responsive', + ], + 'extraMessage' => 'Note that modifying the flexbox property will affect what variants are generated for all flexbox modules, not just the align-items utilities.' +]) diff --git a/docs/source/docs/flexbox-align-self.blade.md b/docs/source/docs/flexbox-align-self.blade.md index 46441d121..bc59df587 100644 --- a/docs/source/docs/flexbox-align-self.blade.md +++ b/docs/source/docs/flexbox-align-self.blade.md @@ -149,3 +149,16 @@ For more information about Tailwind's responsive design features, check out the @endslot @endcomponent + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'flexbox', + 'property' => 'flexbox', + ], + 'variants' => [ + 'responsive', + ], + 'extraMessage' => 'Note that modifying the flexbox property will affect what variants are generated for all flexbox modules, not just the align-self utilities.' +]) diff --git a/docs/source/docs/flexbox-direction.blade.md b/docs/source/docs/flexbox-direction.blade.md index a449cfe0c..fb821f57e 100644 --- a/docs/source/docs/flexbox-direction.blade.md +++ b/docs/source/docs/flexbox-direction.blade.md @@ -130,3 +130,16 @@ For more information about Tailwind's responsive design features, check out the @endslot @endcomponent + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'flexbox', + 'property' => 'flexbox', + ], + 'variants' => [ + 'responsive', + ], + 'extraMessage' => 'Note that modifying the flexbox property will affect what variants are generated for all flexbox modules, not just the flex-direction utilities.' +]) diff --git a/docs/source/docs/flexbox-display.blade.md b/docs/source/docs/flexbox-display.blade.md index 543e52811..6b51e1759 100644 --- a/docs/source/docs/flexbox-display.blade.md +++ b/docs/source/docs/flexbox-display.blade.md @@ -96,3 +96,16 @@ For more information about Tailwind's responsive design features, check out the @endslot @endcomponent + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'flexbox', + 'property' => 'flexbox', + ], + 'variants' => [ + 'responsive', + ], + 'extraMessage' => 'Note that modifying the flexbox property will affect what variants are generated for all flexbox modules, not just the display utilities.' +]) diff --git a/docs/source/docs/flexbox-flex-grow-shrink.blade.md b/docs/source/docs/flexbox-flex-grow-shrink.blade.md index e30f8ad20..1fd6b33c4 100644 --- a/docs/source/docs/flexbox-flex-grow-shrink.blade.md +++ b/docs/source/docs/flexbox-flex-grow-shrink.blade.md @@ -368,3 +368,16 @@ For more information about Tailwind's responsive design features, check out the @endslot @endcomponent + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'flexbox', + 'property' => 'flexbox', + ], + 'variants' => [ + 'responsive', + ], + 'extraMessage' => 'Note that modifying the flexbox property will affect what variants are generated for all flexbox modules, not just the flex utilities.' +]) diff --git a/docs/source/docs/flexbox-justify-content.blade.md b/docs/source/docs/flexbox-justify-content.blade.md index 9483a2af0..0ca75df2d 100644 --- a/docs/source/docs/flexbox-justify-content.blade.md +++ b/docs/source/docs/flexbox-justify-content.blade.md @@ -147,3 +147,16 @@ For more information about Tailwind's responsive design features, check out the @endslot @endcomponent + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'flexbox', + 'property' => 'flexbox', + ], + 'variants' => [ + 'responsive', + ], + 'extraMessage' => 'Note that modifying the flexbox property will affect what variants are generated for all flexbox modules, not just the justify-content utilities.' +]) diff --git a/docs/source/docs/flexbox-wrapping.blade.md b/docs/source/docs/flexbox-wrapping.blade.md index d919eba88..05167a7ee 100644 --- a/docs/source/docs/flexbox-wrapping.blade.md +++ b/docs/source/docs/flexbox-wrapping.blade.md @@ -161,3 +161,16 @@ For more information about Tailwind's responsive design features, check out the @endslot @endcomponent + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'flexbox', + 'property' => 'flexbox', + ], + 'variants' => [ + 'responsive', + ], + 'extraMessage' => 'Note that modifying the flexbox property will affect what variants are generated for all flexbox modules, not just the flex-wrap utilities.' +]) diff --git a/docs/source/docs/floats.blade.md b/docs/source/docs/floats.blade.md index 87d0548e4..6ca9a94bb 100644 --- a/docs/source/docs/floats.blade.md +++ b/docs/source/docs/floats.blade.md @@ -35,3 +35,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'float', + 'property' => 'float', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/font-weight.blade.md b/docs/source/docs/font-weight.blade.md index 8e32b5c8a..a53afde6d 100644 --- a/docs/source/docs/font-weight.blade.md +++ b/docs/source/docs/font-weight.blade.md @@ -60,3 +60,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'font weight', + 'property' => 'fontWeights', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/fonts.blade.md b/docs/source/docs/fonts.blade.md index 78f2659fe..2c7d8fcd3 100644 --- a/docs/source/docs/fonts.blade.md +++ b/docs/source/docs/fonts.blade.md @@ -30,3 +30,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'font', + 'property' => 'fonts', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/forms.blade.md b/docs/source/docs/forms.blade.md index 7f1f822c8..e1f5e2245 100644 --- a/docs/source/docs/forms.blade.md +++ b/docs/source/docs/forms.blade.md @@ -37,3 +37,15 @@ Form controls are great candidates for component classes, but just for fun, here @endcomponent + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'form control appearance', + 'property' => 'appearance', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/height.blade.md b/docs/source/docs/height.blade.md index 26824f247..87534acfb 100644 --- a/docs/source/docs/height.blade.md +++ b/docs/source/docs/height.blade.md @@ -101,3 +101,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'height', + 'property' => 'height', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/letter-spacing.blade.md b/docs/source/docs/letter-spacing.blade.md index af5a523fa..218b6a097 100644 --- a/docs/source/docs/letter-spacing.blade.md +++ b/docs/source/docs/letter-spacing.blade.md @@ -30,3 +30,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'tracking', + 'property' => 'tracking', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/line-height.blade.md b/docs/source/docs/line-height.blade.md index 2f31a286d..fd2fc8d37 100644 --- a/docs/source/docs/line-height.blade.md +++ b/docs/source/docs/line-height.blade.md @@ -35,3 +35,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'leading', + 'property' => 'leading', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/lists.blade.md b/docs/source/docs/lists.blade.md index 86c374a5b..a79b17e91 100644 --- a/docs/source/docs/lists.blade.md +++ b/docs/source/docs/lists.blade.md @@ -20,3 +20,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'list', + 'property' => 'lists', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/max-height.blade.md b/docs/source/docs/max-height.blade.md index 8071a3142..6d1325dd2 100644 --- a/docs/source/docs/max-height.blade.md +++ b/docs/source/docs/max-height.blade.md @@ -26,3 +26,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'max-height', + 'property' => 'maxHeight', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/max-width.blade.md b/docs/source/docs/max-width.blade.md index 7b7b9d90b..dc1903486 100644 --- a/docs/source/docs/max-width.blade.md +++ b/docs/source/docs/max-width.blade.md @@ -66,3 +66,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'max-width', + 'property' => 'maxWidth', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/min-height.blade.md b/docs/source/docs/min-height.blade.md index add177599..6cfbbc4cf 100644 --- a/docs/source/docs/min-height.blade.md +++ b/docs/source/docs/min-height.blade.md @@ -31,3 +31,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'min-height', + 'property' => 'minHeight', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/min-width.blade.md b/docs/source/docs/min-width.blade.md index 86be64906..3eb1562e7 100644 --- a/docs/source/docs/min-width.blade.md +++ b/docs/source/docs/min-width.blade.md @@ -26,3 +26,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'min-width', + 'property' => 'minWidth', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/opacity.blade.md b/docs/source/docs/opacity.blade.md index b7793b466..8484b41f8 100644 --- a/docs/source/docs/opacity.blade.md +++ b/docs/source/docs/opacity.blade.md @@ -113,3 +113,13 @@ By default Tailwind provides five opacity utilities based on a simple numeric sc + '90': '.9', '100': '1', @endcomponent + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'opacity', + 'property' => 'opacity', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/overflow.blade.md b/docs/source/docs/overflow.blade.md index 1d92a5c7d..36f930bf8 100644 --- a/docs/source/docs/overflow.blade.md +++ b/docs/source/docs/overflow.blade.md @@ -219,3 +219,15 @@ For more information about Tailwind's responsive design features, check out the @endslot @endcomponent + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'overflow', + 'property' => 'overflow', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/pointer-events.blade.md b/docs/source/docs/pointer-events.blade.md index d6da015fe..a8ae844ff 100644 --- a/docs/source/docs/pointer-events.blade.md +++ b/docs/source/docs/pointer-events.blade.md @@ -25,3 +25,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'pointer event', + 'property' => 'pointerEvents', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/positioning.blade.md b/docs/source/docs/positioning.blade.md index 554434052..c1dc30eab 100644 --- a/docs/source/docs/positioning.blade.md +++ b/docs/source/docs/positioning.blade.md @@ -404,3 +404,15 @@ For more information about Tailwind's responsive design features, check out the @endslot @endcomponent + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'positioning', + 'property' => 'position', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/resize.blade.md b/docs/source/docs/resize.blade.md index 67efc21d6..a4c1f89ae 100644 --- a/docs/source/docs/resize.blade.md +++ b/docs/source/docs/resize.blade.md @@ -36,3 +36,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'resizing', + 'property' => 'resize', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/shadows.blade.md b/docs/source/docs/shadows.blade.md index 117598cd6..46de97295 100644 --- a/docs/source/docs/shadows.blade.md +++ b/docs/source/docs/shadows.blade.md @@ -135,3 +135,13 @@ If a `default` shadow is provided, it will be used for the non-suffixed `.shadow + '3': '0 8px 16px rgba(0,0,0,0.15)', 'none': 'none', @endcomponent + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'shadow', + 'property' => 'shadows', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/spacing.blade.md b/docs/source/docs/spacing.blade.md index 57029cad5..45bd7123e 100644 --- a/docs/source/docs/spacing.blade.md +++ b/docs/source/docs/spacing.blade.md @@ -45,3 +45,41 @@ For example, `.pt-2` would add `.5rem` of padding to the top of the element, `.m
auto auto (margins only)
+ +## Customizing + +### Responsive, Hover, and Focus Variants + +By default, only responsive variants are generated for margin, negative margin and padding utilities. + +You can control which variants are generated for the list utilities by modifying the `margin`, `negativeMargin` and `padding` property in the `modules` section of your Tailwind config file. + +For example, this config will _also_ generate hover and focus variants of the margin utilities, hover variants of the negative margin utilities, and focus variants of the padding utilities: + +```js +{ + // ... + modules: { + // ... + margin: ['responsive', 'hover', 'focus'], + negativeMargin: ['responsive', 'hover'], + padding: ['responsive', 'focus'], + } +} +``` + +### Disabling + +If you aren't using the margin, the negative margin, or padding utilities in your project, you can disable them entirely by setting the `margin`, `negativeMargin` and `padding` property to `false` in the `modules` section of your config file: + +```js +{ + // ... + modules: { + // ... + margin: false, + negativeMargin: false, + padding: false, + } +} +``` diff --git a/docs/source/docs/text-alignment.blade.md b/docs/source/docs/text-alignment.blade.md index 3307b06bb..afd8ec3e1 100644 --- a/docs/source/docs/text-alignment.blade.md +++ b/docs/source/docs/text-alignment.blade.md @@ -35,3 +35,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'text alignment', + 'property' => 'textAlign', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/text-color.blade.md b/docs/source/docs/text-color.blade.md index 255282216..0de8f055a 100644 --- a/docs/source/docs/text-color.blade.md +++ b/docs/source/docs/text-color.blade.md @@ -40,3 +40,16 @@ Hover utilities can also be combined with responsive utilities by adding the res ```html ``` + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'text color', + 'property' => 'textColors', + ], + 'variants' => [ + 'responsive', + 'hover', + ], +]) diff --git a/docs/source/docs/text-sizing.blade.md b/docs/source/docs/text-sizing.blade.md index 46649ce25..2ecc40e1f 100644 --- a/docs/source/docs/text-sizing.blade.md +++ b/docs/source/docs/text-sizing.blade.md @@ -60,3 +60,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'text sizing', + 'property' => 'textSizes', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/text-style.blade.md b/docs/source/docs/text-style.blade.md index ae4ffaf50..48ee7d503 100644 --- a/docs/source/docs/text-style.blade.md +++ b/docs/source/docs/text-style.blade.md @@ -84,3 +84,16 @@ Hover utilities can also be combined with responsive utilities by adding the res ```html Link ``` + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'text style', + 'property' => 'textStyle', + ], + 'variants' => [ + 'responsive', + 'hover', + ], +]) diff --git a/docs/source/docs/user-select.blade.md b/docs/source/docs/user-select.blade.md index e499039db..ef76d83b9 100644 --- a/docs/source/docs/user-select.blade.md +++ b/docs/source/docs/user-select.blade.md @@ -25,3 +25,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'user-select', + 'property' => 'userSelect', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/vertical-alignment.blade.md b/docs/source/docs/vertical-alignment.blade.md index 25af9d339..be85ec7c7 100644 --- a/docs/source/docs/vertical-alignment.blade.md +++ b/docs/source/docs/vertical-alignment.blade.md @@ -45,3 +45,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'vertical alignment', + 'property' => 'verticalAlign', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/visibility.blade.md b/docs/source/docs/visibility.blade.md index d7f89e28a..625a199af 100644 --- a/docs/source/docs/visibility.blade.md +++ b/docs/source/docs/visibility.blade.md @@ -42,7 +42,7 @@ Use `.invisible` to hide an element, but still maintain its space. ## Responsive -To apply an overflow utility only at a specific breakpoint, add a `{screen}:` prefix to the existing class name. For example, adding the class `md:overflow-scroll` to an element would apply the `overflow-scroll` utility at medium screen sizes and above. +To apply a visibility utility only at a specific breakpoint, add a `{screen}:` prefix to the existing class name. For example, adding the class `md:invisible` to an element would apply the `invisible` utility at medium screen sizes and above. For more information about Tailwind's responsive design features, check out the [Responsive Design](/docs/responsive-design) documentation. @@ -76,3 +76,15 @@ For more information about Tailwind's responsive design features, check out the
@endslot @endcomponent + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'visibility', + 'property' => 'visibility', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/whitespace-and-wrapping.blade.md b/docs/source/docs/whitespace-and-wrapping.blade.md index 32dc0dba9..409d23ed0 100644 --- a/docs/source/docs/whitespace-and-wrapping.blade.md +++ b/docs/source/docs/whitespace-and-wrapping.blade.md @@ -50,8 +50,20 @@ features: ], [ '.truncate', - "overflow: hidden;\ntext-overflow: ellipsis;\nwhite-space", + "overflow: hidden;\ntext-overflow: ellipsis;\nwhite-space: nowrap", 'Truncate overflowing text with an ellipsis () if needed.', ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'whitespace & wrapping', + 'property' => 'whitespace', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/width.blade.md b/docs/source/docs/width.blade.md index 23954527e..d5f690976 100644 --- a/docs/source/docs/width.blade.md +++ b/docs/source/docs/width.blade.md @@ -156,3 +156,15 @@ features: ], ] ]) + +## Customizing + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'width', + 'property' => 'width', + ], + 'variants' => [ + 'responsive', + ], +]) diff --git a/docs/source/docs/z-index.blade.md b/docs/source/docs/z-index.blade.md index af87a556f..3e4a7bee7 100644 --- a/docs/source/docs/z-index.blade.md +++ b/docs/source/docs/z-index.blade.md @@ -154,3 +154,13 @@ By default Tailwind provides six numeric `z-index` utilities and an `auto` utili + '100': 100, 'auto': 'auto', @endcomponent + +@include('_partials.variants-and-disabling', [ + 'utility' => [ + 'name' => 'z-index', + 'property' => 'zIndex', + ], + 'variants' => [ + 'responsive', + ], +])