1.6 KiB
| extends | title | description | features | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| _layouts.documentation | Line Height | Utilities for controlling the leading (line height) of an element. |
|
@include('_partials.work-in-progress')
@include('_partials.class-table', [
'rows' => [
[
'.leading-none',
'line-height: 1;',
'Set the line height of an element to 1.',
],
[
'.leading-tight',
'line-height: 1.25;',
'Set the line height of an element to 1.25.',
],
[
'.leading-normal',
'line-height: 1.5;',
'Set the line height of an element to 1.5.',
],
[
'.leading-loose',
'line-height: 2;',
'Set the line height of an element to 2.',
],
]
])
Customizing
Responsive, Hover, and Focus Variants
By default, no hover, focus, or group-hover variants are generated for leading utilities.
You can control which variants are generated for the leading utilities by modifying the leading property in the modules section of your Tailwind config file.
For example, this config will also generate hover and focus variants:
{
// ...
modules: {
// ...
leading: ['responsive', 'hover', 'focus'],
}
}
Disabling
If you aren't using the leading utilities in your project, you can disable them entirely by setting the leading property to false in the modules section of your config file:
{
// ...
modules: {
// ...
leading: false,
}
}