#Min Width
Classes to set the minimum width of an element.
| Class | Styles |
|---|---|
min-w-0 | |
min-w-xs | |
min-w-sm | |
min-w-md | |
min-w-lg | |
min-w-xl | |
min-w-10p | |
min-w-20p | |
min-w-30p | |
min-w-40p | |
min-w-50p | |
min-w-60p | |
min-w-70p | |
min-w-80p | |
min-w-90p | |
min-w-100p | |
min-w-screen | |
Classes to set the minimum width of an element.
| Class | Styles |
|---|---|
min-w-0 | |
min-w-xs | |
min-w-sm | |
min-w-md | |
min-w-lg | |
min-w-xl | |
min-w-10p | |
min-w-20p | |
min-w-30p | |
min-w-40p | |
min-w-50p | |
min-w-60p | |
min-w-70p | |
min-w-80p | |
min-w-90p | |
min-w-100p | |
min-w-screen | |
Using these classes it quite simple to control the minimum width an element should have. You can either use a percentage based class or use a class to span the whole screen using the min-w-[size] syntax.
<div class="p-4 bg-indigo-100 u-round-xs text-white font-bold u-text-center u-flex" style="">
<div class="min-w-50p p-2 bg-indigo-500 u-round-xs">min-w-50p</div>
</div>⚠ Note that the viewport variants are disabled in the default build of Cirrus. To enable, you must enable it yourself in
_configs.scssand create a custom build or enable it in the config in your Sass project.//_configs.scss $config: ( viewports: ( flags.$MIN-WIDTH: true, ) ) !default;
To use the viewport variant of a given class, you just need to suffix each class with a viewport selector. For example, if I only want min-w-0 to be applied to some element for lg and above, then I would use the min-w-0-lg class.
<div class="min-w-0-lg">
<!-- ... -->
</div>For more information, visit the Viewports documentation.
The classes specified above are the default utility classes for setting minimum widths. You can add, change, or remove classes within the _config.scss file of Cirrus.
// _config.scss
$config: (
extend: (
min-widths: (
'min': 'min-content',
'max': 'max-content',
)
)
) !default;This would generate the following additonal classes.
.min-w-min {
min-width: min-content !important;
}
.min-w-max {
min-width: max-content !important;
}Learn more about how to extend Cirrus to support your use cases in the Configuration documentation.