-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
NavLink.module.css
98 lines (79 loc) · 1.8 KB
/
NavLink.module.css
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.root {
--nl-bg: var(--mantine-primary-color-light);
--nl-hover: var(--mantine-primary-color-light-hover);
--nl-color: var(--mantine-primary-color-light-color);
display: flex;
align-items: center;
width: 100%;
padding: 8px var(--mantine-spacing-sm);
user-select: none;
@mixin hover {
@mixin where-light {
background-color: var(--mantine-color-gray-0);
}
@mixin where-dark {
background-color: var(--mantine-color-dark-6);
}
}
&:where([data-disabled]) {
opacity: 0.4;
pointer-events: none;
}
&:where([data-active], [aria-current='page']) {
background-color: var(--nl-bg);
color: var(--nl-color);
@mixin hover {
background-color: var(--nl-hover);
}
.description {
--description-opacity: 0.9;
--description-color: var(--nl-color);
}
}
}
.section {
display: flex;
align-items: center;
justify-content: center;
transition: transform 150ms ease;
& > svg {
display: block;
}
&:where([data-position='left']) {
margin-inline-end: var(--mantine-spacing-sm);
}
&:where([data-position='right']) {
margin-inline-start: var(--mantine-spacing-sm);
}
&:where([data-rotate]) {
transform: rotate(90deg);
}
}
.label {
font-size: var(--mantine-font-size-sm);
}
.body {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
&:where([data-no-wrap]) {
white-space: nowrap;
}
}
.description {
display: block;
font-size: var(--mantine-font-size-xs);
opacity: var(--description-opacity, 1);
color: var(--description-color, var(--mantine-color-dimmed));
overflow: hidden;
text-overflow: ellipsis;
:where([data-no-wrap]) & {
white-space: nowrap;
}
}
.children {
padding-inline-start: var(--nl-offset, var(--mantine-spacing-lg));
}
.chevron {
transform: rotate(-90deg);
}