@taiga-ui/styles 5.21.0 → 5.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/form.less +124 -0
- package/components/header.less +146 -0
- package/components/list.less +145 -0
- package/components/meter.less +67 -0
- package/mixins/liquid-glass.less +78 -0
- package/package.json +1 -1
- package/utils.less +1 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils';
|
|
2
|
+
|
|
3
|
+
// https://bugs.webkit.org/show_bug.cgi?id=311249
|
|
4
|
+
@keyframes safariIsAJoke {
|
|
5
|
+
to {
|
|
6
|
+
opacity: 0.999;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[tuiForm]:where(*&) {
|
|
11
|
+
&[tuiForm] {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
align-items: stretch;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&[data-size='s'] {
|
|
18
|
+
gap: 0.75rem;
|
|
19
|
+
font: var(--tui-typography-body-s);
|
|
20
|
+
|
|
21
|
+
tui-error,
|
|
22
|
+
tui-elastic-container {
|
|
23
|
+
margin-block-start: -0.75rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
legend {
|
|
27
|
+
font: var(--tui-typography-ui-m);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&[data-size='m'] {
|
|
32
|
+
gap: 1rem;
|
|
33
|
+
font: var(--tui-typography-body-s);
|
|
34
|
+
|
|
35
|
+
tui-error,
|
|
36
|
+
tui-elastic-container {
|
|
37
|
+
margin-block-start: -1rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
legend {
|
|
41
|
+
font: var(--tui-typography-ui-l);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&[data-size='l'] {
|
|
46
|
+
gap: 1.25rem;
|
|
47
|
+
font: var(--tui-typography-body-m);
|
|
48
|
+
|
|
49
|
+
tui-error,
|
|
50
|
+
tui-elastic-container {
|
|
51
|
+
margin-block-start: -1.25rem;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
legend {
|
|
55
|
+
font: var(--tui-typography-ui-l);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
fieldset {
|
|
60
|
+
display: grid;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
gap: inherit;
|
|
63
|
+
grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
|
|
64
|
+
border: none;
|
|
65
|
+
padding: 0;
|
|
66
|
+
margin: 0;
|
|
67
|
+
animation: safariIsAJoke 0.001s;
|
|
68
|
+
|
|
69
|
+
legend:defined {
|
|
70
|
+
position: relative;
|
|
71
|
+
inline-size: 100%;
|
|
72
|
+
padding: 0.5rem 0 0.75rem;
|
|
73
|
+
font-weight: bold;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
> fieldset:first-child > legend {
|
|
78
|
+
inset-block-start: -0.25rem;
|
|
79
|
+
padding: 0 0 0.5rem;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
> header {
|
|
83
|
+
padding-block-end: 0.25rem;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
> footer {
|
|
87
|
+
display: flex;
|
|
88
|
+
gap: 0.75rem;
|
|
89
|
+
margin-block-start: 0.25rem;
|
|
90
|
+
|
|
91
|
+
tui-dialog & {
|
|
92
|
+
justify-content: flex-end;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
> button,
|
|
97
|
+
> a {
|
|
98
|
+
align-self: flex-start;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
tui-elastic-container {
|
|
102
|
+
display: flex;
|
|
103
|
+
|
|
104
|
+
> * > .tui-enter,
|
|
105
|
+
> * > .tui-leave {
|
|
106
|
+
animation-name: tuiFade;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&:not(:has(> * > *:not(.tui-leave))) {
|
|
110
|
+
block-size: 0 !important;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
[tuiLabel]:not([data-orientation='vertical']) {
|
|
115
|
+
font: inherit;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&[data-size='s'],
|
|
119
|
+
&[data-size='m'] {
|
|
120
|
+
[tuiLabel]:not([data-orientation='vertical']) [tuiTooltip] {
|
|
121
|
+
block-size: 1.25rem;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils';
|
|
2
|
+
|
|
3
|
+
*:where([tuiHeader]&) {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: flex-start;
|
|
7
|
+
box-sizing: content-box;
|
|
8
|
+
color: var(--tui-text-primary);
|
|
9
|
+
margin: 0;
|
|
10
|
+
gap: 0.5rem 1rem;
|
|
11
|
+
text-align: start;
|
|
12
|
+
overflow-wrap: break-word;
|
|
13
|
+
|
|
14
|
+
p:where(:not([tuiSubtitle], [tuiCaption])) {
|
|
15
|
+
margin: 0.25rem 0 0;
|
|
16
|
+
font: var(--tui-typography-body-m);
|
|
17
|
+
|
|
18
|
+
&:empty {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
[tuiTitle] {
|
|
24
|
+
max-inline-size: fit-content;
|
|
25
|
+
flex: 1 0 60%;
|
|
26
|
+
margin: 0;
|
|
27
|
+
margin-inline-end: auto;
|
|
28
|
+
font: inherit;
|
|
29
|
+
font-weight: bold;
|
|
30
|
+
|
|
31
|
+
&:empty {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[tuiAccessories] {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 0.75rem;
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
|
|
42
|
+
&:has([tuiLink]) {
|
|
43
|
+
align-items: baseline;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&::before {
|
|
47
|
+
content: '';
|
|
48
|
+
visibility: hidden;
|
|
49
|
+
margin-inline-end: -0.75rem;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
[tuiSubtitle] {
|
|
54
|
+
color: var(--tui-text-secondary);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
[tuiCaption] {
|
|
58
|
+
font: var(--tui-typography-body-s);
|
|
59
|
+
color: var(--tui-text-secondary);
|
|
60
|
+
font-weight: 500;
|
|
61
|
+
text-transform: uppercase;
|
|
62
|
+
margin: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
+ [tuiDescription] {
|
|
66
|
+
margin-block-start: 0.5rem;
|
|
67
|
+
color: var(--tui-text-primary);
|
|
68
|
+
font: var(--tui-typography-body-m);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:where([data-size='h1']) {
|
|
72
|
+
font: var(--tui-typography-heading-h1);
|
|
73
|
+
|
|
74
|
+
+ [tuiDescription] {
|
|
75
|
+
margin-block-start: 0.75rem;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&:where([data-size='h2']) {
|
|
80
|
+
font: var(--tui-typography-heading-h2);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:where([data-size='h3']) {
|
|
84
|
+
font: var(--tui-typography-heading-h3);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&:where([data-size='h4']) {
|
|
88
|
+
font: var(--tui-typography-heading-h4);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:where([data-size='h5']) {
|
|
92
|
+
font: var(--tui-typography-heading-h5);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&:where([data-size='h6']) {
|
|
96
|
+
font: var(--tui-typography-heading-h6);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&:where([data-size='body-l']) {
|
|
100
|
+
font: var(--tui-typography-body-l);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&:where([data-size='body-m']) {
|
|
104
|
+
font: var(--tui-typography-ui-l);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:where([data-size='body-s']) {
|
|
108
|
+
font: var(--tui-typography-ui-m);
|
|
109
|
+
|
|
110
|
+
[tuiTitle] {
|
|
111
|
+
gap: 0.125rem;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
+ [tuiDescription] {
|
|
115
|
+
margin-block-start: 0.125rem;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&:where([data-size='body-m']),
|
|
120
|
+
&:where([data-size='body-s']) {
|
|
121
|
+
[tuiSubtitle],
|
|
122
|
+
[tuiAccessories] [tuiLink] {
|
|
123
|
+
font: var(--tui-typography-body-s);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&:where([data-size='h1']),
|
|
128
|
+
&:where([data-size='h2']),
|
|
129
|
+
&:where([data-size='h3']) {
|
|
130
|
+
[tuiSubtitle],
|
|
131
|
+
[tuiAccessories] [tuiLink],
|
|
132
|
+
+ [tuiDescription] {
|
|
133
|
+
font: var(--tui-typography-body-l);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&:where([data-size='h4']),
|
|
138
|
+
&:where([data-size='h5']),
|
|
139
|
+
&:where([data-size='h6']),
|
|
140
|
+
&:where([data-size='body-l']) {
|
|
141
|
+
[tuiSubtitle],
|
|
142
|
+
[tuiAccessories] [tuiLink] {
|
|
143
|
+
font: var(--tui-typography-body-m);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
:where([tuiList]:is(ul, ol)&) {
|
|
2
|
+
list-style: none;
|
|
3
|
+
padding: 0.25rem 0;
|
|
4
|
+
margin-block: 0;
|
|
5
|
+
counter-reset: item;
|
|
6
|
+
margin-inline-start: 1.625rem;
|
|
7
|
+
|
|
8
|
+
[tuiList] {
|
|
9
|
+
padding: 0;
|
|
10
|
+
margin-inline-start: 2.5rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
& > li {
|
|
14
|
+
counter-increment: item;
|
|
15
|
+
margin: 0.5rem 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
& > li::before {
|
|
19
|
+
content: counters(item, '.') '.';
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
float: left;
|
|
22
|
+
unicode-bidi: plaintext;
|
|
23
|
+
font-variant-numeric: tabular-nums;
|
|
24
|
+
margin-block: 0;
|
|
25
|
+
margin-inline: -1.5rem 0.5625rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[dir='rtl'] & > li::before,
|
|
29
|
+
&[dir='rtl'] > li::before {
|
|
30
|
+
float: right;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:is(ul) > li::before {
|
|
34
|
+
color: transparent;
|
|
35
|
+
background: radial-gradient(
|
|
36
|
+
circle 0.1875rem,
|
|
37
|
+
var(--tui-list-marker, var(--tui-status-info)) 100%,
|
|
38
|
+
transparent 101%
|
|
39
|
+
);
|
|
40
|
+
inline-size: 0.75rem;
|
|
41
|
+
margin-inline-end: 0.75rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:is(ol) > li::before {
|
|
45
|
+
position: relative;
|
|
46
|
+
inset-inline-end: 0.75rem;
|
|
47
|
+
justify-content: flex-end;
|
|
48
|
+
inline-size: 0;
|
|
49
|
+
margin-inline: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:where([data-size='l']) {
|
|
53
|
+
font: var(--tui-typography-body-l);
|
|
54
|
+
|
|
55
|
+
&:is(ul) > li::before {
|
|
56
|
+
inline-size: 0.875rem;
|
|
57
|
+
margin-block: 0;
|
|
58
|
+
margin-inline: -1.4375rem 0.5625rem;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:where([data-size='m']) {
|
|
63
|
+
font: var(--tui-typography-body-m);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:where([data-size='s']) {
|
|
67
|
+
font: var(--tui-typography-ui-s);
|
|
68
|
+
|
|
69
|
+
& > li {
|
|
70
|
+
margin: 0.625rem 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:where(dl[tuiList]&) {
|
|
76
|
+
display: grid;
|
|
77
|
+
grid-template-columns: minmax(20%, auto) auto;
|
|
78
|
+
font: var(--tui-typography-body-s);
|
|
79
|
+
margin: 0;
|
|
80
|
+
|
|
81
|
+
&:where([data-size='s']) {
|
|
82
|
+
dd,
|
|
83
|
+
dt {
|
|
84
|
+
padding: 0.25rem;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&:where([data-size='m']) {
|
|
89
|
+
dd,
|
|
90
|
+
dt {
|
|
91
|
+
padding: 0.625rem 0.375rem;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&:where([data-size='l']) {
|
|
96
|
+
font: var(--tui-typography-body-m);
|
|
97
|
+
|
|
98
|
+
dd,
|
|
99
|
+
dt {
|
|
100
|
+
padding: 1rem 0.5rem;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
dt,
|
|
105
|
+
dd {
|
|
106
|
+
margin: 0;
|
|
107
|
+
font: inherit;
|
|
108
|
+
|
|
109
|
+
&:not(:last-of-type) {
|
|
110
|
+
box-shadow: 0 1px var(--tui-border-normal);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
dt {
|
|
115
|
+
color: var(--tui-text-secondary);
|
|
116
|
+
padding-inline-start: 0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
dd {
|
|
120
|
+
padding-inline-end: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&:where([compact]) {
|
|
124
|
+
dt,
|
|
125
|
+
dd {
|
|
126
|
+
padding-block-end: 0;
|
|
127
|
+
box-shadow: none;
|
|
128
|
+
clip-path: inset(0);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
dt {
|
|
132
|
+
white-space: nowrap;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
dt::after {
|
|
136
|
+
content: '';
|
|
137
|
+
display: inline-block;
|
|
138
|
+
block-size: 1px;
|
|
139
|
+
margin-inline-start: 0.25rem;
|
|
140
|
+
transform: scaleX(var(--tui-inline));
|
|
141
|
+
border-image: repeating-linear-gradient(90deg, var(--tui-text-tertiary) 0 0.0625rem, transparent 0 0.125rem)
|
|
142
|
+
fill 0 / calc(100% - 1px) 0 0/0 100vw 0 0 repeat;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@import '../utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Meter
|
|
5
|
+
* @selector meter[tuiMeter]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* A native styled meter element. In modern browsers uses attr, otherwise
|
|
9
|
+
* you need to define same attributes as --t- prefixed CSS variables
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <meter tuiMeter value="0.5"></meter>
|
|
13
|
+
*
|
|
14
|
+
* @see-also
|
|
15
|
+
* ProgressBar
|
|
16
|
+
*/
|
|
17
|
+
[tuiMeter]:where(*&) {
|
|
18
|
+
--t-min: attr(min type(<number>), 0);
|
|
19
|
+
--t-max: attr(max type(<number>), 1);
|
|
20
|
+
--t-low: attr(low type(<number>), var(--t-min));
|
|
21
|
+
--t-high: attr(high type(<number>), var(--t-max));
|
|
22
|
+
--t-optimum: attr(optimum type(<number>), calc(var(--t-max) - var(--t-min) / 2));
|
|
23
|
+
--t-value: attr(value type(<number>), 0);
|
|
24
|
+
--t-a: calc((var(--t-low) - var(--t-min)) / (var(--t-max) - var(--t-min)));
|
|
25
|
+
--t-b: calc((var(--t-high) - var(--t-min)) / (var(--t-max) - var(--t-min)));
|
|
26
|
+
--t-c: calc((var(--t-optimum) - var(--t-min)) / (var(--t-max) - var(--t-min)));
|
|
27
|
+
--t-1: min(var(--t-a), var(--t-b), var(--t-c));
|
|
28
|
+
--t-2: min(max(var(--t-a), var(--t-b)), max(var(--t-b), var(--t-c)), max(var(--t-a), var(--t-c)));
|
|
29
|
+
--t-3: max(var(--t-a), var(--t-b), var(--t-c));
|
|
30
|
+
--t-dir: ~'clamp(-1, (var(--t-high) - var(--t-optimum)) * 9999, 1)';
|
|
31
|
+
--t-center: calc((var(--t-1) + var(--t-3)) / 2);
|
|
32
|
+
--t-delta: calc((var(--t-3) - var(--t-1)));
|
|
33
|
+
--t-start: calc((var(--t-center) - (var(--t-delta) * var(--t-dir) / 2)));
|
|
34
|
+
--t-end: calc((var(--t-center) + (var(--t-delta) * var(--t-dir) / 2)));
|
|
35
|
+
--t-good: calc(100% * (((var(--t-start)) - 0.5) * var(--t-dir) + 0.5));
|
|
36
|
+
--t-mid: calc(100% * (((var(--t-2)) - 0.5) * var(--t-dir) + 0.5));
|
|
37
|
+
--t-bad: calc(100% * (((var(--t-end)) - 0.5) * var(--t-dir) + 0.5));
|
|
38
|
+
|
|
39
|
+
position: relative;
|
|
40
|
+
margin: 0;
|
|
41
|
+
block-size: 1rem;
|
|
42
|
+
inline-size: 100%;
|
|
43
|
+
border-radius: 1rem;
|
|
44
|
+
background: linear-gradient(
|
|
45
|
+
calc(90deg * var(--t-dir)),
|
|
46
|
+
var(--tui-status-positive) var(--t-good),
|
|
47
|
+
var(--tui-status-warning) var(--t-mid),
|
|
48
|
+
var(--tui-status-negative) var(--t-bad)
|
|
49
|
+
);
|
|
50
|
+
transform: scaleX(var(--tui-inline));
|
|
51
|
+
mask-clip: no-clip;
|
|
52
|
+
mask-image: radial-gradient(
|
|
53
|
+
circle at calc(0.5rem + (100% - 1rem) * (var(--t-value) - var(--t-min)) / (var(--t-max) - var(--t-min))) 0.5rem,
|
|
54
|
+
black calc(0.5rem - 0.5px),
|
|
55
|
+
transparent 0.5rem,
|
|
56
|
+
transparent 0.75rem,
|
|
57
|
+
black calc(0.75rem + 0.5px)
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
&::-webkit-meter-inner-element {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&::-moz-meter-bar {
|
|
65
|
+
background: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// iOS liquid glass, shared by AppBar, TabBar and SearchBar.
|
|
2
|
+
// Apply `.liquid-glass-vars()` at the glass scope root and `.liquid-glass-dark()`
|
|
3
|
+
// in the component's dark theme selector: the surface and the bevel read the
|
|
4
|
+
// values through inherited private properties, so the pieces can sit on any
|
|
5
|
+
// element or pseudo element below the root
|
|
6
|
+
|
|
7
|
+
@tui-glass-bevel-light: linear-gradient(
|
|
8
|
+
319deg,
|
|
9
|
+
#fff 4%,
|
|
10
|
+
#fff 19%,
|
|
11
|
+
rgba(255, 255, 255, 0.12) 40%,
|
|
12
|
+
rgba(255, 255, 255, 0.02) 45%,
|
|
13
|
+
rgba(255, 255, 255, 0) 48%,
|
|
14
|
+
rgba(255, 255, 255, 0) 50%,
|
|
15
|
+
rgba(255, 255, 255, 0) 52%,
|
|
16
|
+
rgba(255, 255, 255, 0.02) 55%,
|
|
17
|
+
rgba(255, 255, 255, 0.12) 60%,
|
|
18
|
+
#fff 80%,
|
|
19
|
+
#fff 96%
|
|
20
|
+
);
|
|
21
|
+
@tui-glass-bevel-dark: linear-gradient(
|
|
22
|
+
319deg,
|
|
23
|
+
rgba(255, 255, 255, 0.2),
|
|
24
|
+
rgba(255, 255, 255, 0.12) 19%,
|
|
25
|
+
rgba(255, 255, 255, 0.04) 40%,
|
|
26
|
+
rgba(255, 255, 255, 0.02) 45%,
|
|
27
|
+
rgba(255, 255, 255, 0) 48%,
|
|
28
|
+
rgba(255, 255, 255, 0) 50%,
|
|
29
|
+
rgba(255, 255, 255, 0) 52%,
|
|
30
|
+
rgba(255, 255, 255, 0.02) 55%,
|
|
31
|
+
rgba(255, 255, 255, 0.04) 60%,
|
|
32
|
+
rgba(255, 255, 255, 0.12) 80%,
|
|
33
|
+
rgba(255, 255, 255, 0.2) 96%
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
.liquid-glass-vars() {
|
|
37
|
+
--t-glass-background: rgba(255, 255, 255, 0.7);
|
|
38
|
+
--t-glass-glow: var(--tui-background-base);
|
|
39
|
+
--t-glass-filter: blur(0.25rem) saturate(6) brightness(1.05);
|
|
40
|
+
--t-glass-bevel: @tui-glass-bevel-light;
|
|
41
|
+
--t-glass-bevel-filter: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.liquid-glass-dark() {
|
|
45
|
+
--t-glass-background: rgba(88, 88, 88, 0.31);
|
|
46
|
+
--t-glass-glow: rgba(31, 31, 31, 0.8);
|
|
47
|
+
--t-glass-filter: blur(0.25rem) saturate(4);
|
|
48
|
+
--t-glass-bevel: @tui-glass-bevel-dark;
|
|
49
|
+
--t-glass-bevel-filter: brightness(0.6);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Frosted translucent surface with an inner glow
|
|
53
|
+
.liquid-glass(@shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.09)) {
|
|
54
|
+
backdrop-filter: var(--t-glass-filter);
|
|
55
|
+
background-color: var(--t-glass-background);
|
|
56
|
+
box-shadow:
|
|
57
|
+
@shadow,
|
|
58
|
+
inset 0 0 0.75rem var(--t-glass-glow);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// The bevel of the glass: a gradient clipped to a 1px ring by subtracting the
|
|
62
|
+
// content box from the border box. Put it on a pseudo element of a positioned,
|
|
63
|
+
// rounded container
|
|
64
|
+
.liquid-glass-bevel() {
|
|
65
|
+
content: '';
|
|
66
|
+
position: absolute;
|
|
67
|
+
inset: 0;
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
border-radius: inherit;
|
|
70
|
+
pointer-events: none;
|
|
71
|
+
padding: 1px;
|
|
72
|
+
background: var(--t-glass-bevel);
|
|
73
|
+
filter: var(--t-glass-bevel-filter);
|
|
74
|
+
mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
|
|
75
|
+
mask-origin: content-box, border-box;
|
|
76
|
+
mask-clip: content-box, border-box;
|
|
77
|
+
mask-composite: exclude;
|
|
78
|
+
}
|
package/package.json
CHANGED
package/utils.less
CHANGED