forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_mixins.scss
42 lines (38 loc) · 1.06 KB
/
_mixins.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// Copyright IBM Corp. 2016, 2023
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//
@use '../../config' as *;
@use '../../spacing' as *;
@use '../../theme' as *;
@use '../../motion' as *;
/// Pseudo underline
/// @access public
/// @group pagination-nav
@mixin pseudo-underline() {
&:not(.#{$prefix}--pagination-nav__page--direction) {
&::after {
position: absolute;
display: block;
background-color: $border-interactive;
block-size: $spacing-02;
content: '';
inline-size: 0;
inset-block-end: 0;
inset-inline-start: 50%;
opacity: 0;
transition: width $duration-fast-02 motion(standard, productive);
@media screen and (prefers-reduced-motion: reduce) {
transition: none;
}
}
}
.#{$prefix}--pagination-nav__page--active + &::after,
&.#{$prefix}--pagination-nav__page--active::after {
inline-size: $spacing-05;
inset-inline-start: calc(50% - #{$spacing-05 * 0.5});
opacity: 1;
}
}