#Transition Duration
These are utility classes that specify the duration of transitions.
Class | Styles |
---|---|
u-duration-75 |
|
u-duration-100 |
|
u-duration-200 |
|
u-duration-300 |
|
u-duration-500 |
|
u-duration-700 |
|
u-duration-1000 |
|
These are utility classes that specify the duration of transitions.
Class | Styles |
---|---|
u-duration-75 |
|
u-duration-100 |
|
u-duration-200 |
|
u-duration-300 |
|
u-duration-500 |
|
u-duration-700 |
|
u-duration-1000 |
|
Below is a demo of all utility classes that set a transition duration. The syntax follows the form of u-duration-[75|100|200|300|500|700|1000]
.
<div class="u-duration-75..."></div>
<div class="u-duration-100 ..."></div>
<div class="u-duration-200 ..."></div>
<div class="u-duration-300 ..."></div>
<div class="u-duration-500 ..."></div>
<div class="u-duration-700 ..."></div>
<div class="u-duration-1000 ..."></div>
⚠ Note that the viewport variants are disabled in the default build of Cirrus. To enable, you must enable it yourself in
_configs.scss
and create a custom build or enable it in the config in your Sass project.//_configs.scss $config: ( viewports: ( flags.$TRANSITION-DURATION: 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 u-duration-100
to be applied to some element for lg
and above, then I would use the u-duration-100-lg
class.
<div class="u-duration-100-lg">
<!-- ... -->
</div>
For more information, visit the Viewports documentation.
The classes specified above are the default utility classes for different filters. You can add, change, or remove classes within the _config.scss
file of Cirrus.
// _config.scss
$config: (
extend: (
transitions: (
durations: (
1500: 1500ms,
)
)
)
) !default;
This would generate the following classes.
.u-duration-1500 {
transition-duration: 1500ms !important;
}
Learn more about how to extend Cirrus to support your use cases in the Configuration documentation.