@taiga-ui/styles 5.22.0 → 5.23.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.
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Floating
|
|
5
|
+
* @selector [tuiFloatingContainer]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* Container for creating sticky footers
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <footer tuiFloatingContainer>
|
|
12
|
+
* <button
|
|
13
|
+
type="button"
|
|
14
|
+
tuiButton
|
|
15
|
+
>
|
|
16
|
+
Close
|
|
17
|
+
</button>
|
|
18
|
+
* </footer>
|
|
19
|
+
*
|
|
20
|
+
* @see-also
|
|
21
|
+
* Block, SheetDialog
|
|
22
|
+
*/
|
|
23
|
+
[tuiFloatingContainer]:where(*&) {
|
|
24
|
+
.transition(inset-block-end);
|
|
25
|
+
|
|
26
|
+
position: sticky;
|
|
27
|
+
z-index: 1;
|
|
28
|
+
display: grid;
|
|
29
|
+
inset-block-end: ~'max(0px, calc(100 * var(--tui-viewport-svh) - var(--tui-viewport-height) - var(--tui-viewport-y)))';
|
|
30
|
+
inset-block-end: ~'max(0px, calc(100svh - var(--tui-viewport-height) - var(--tui-viewport-y)))';
|
|
31
|
+
margin-block-start: 1rem;
|
|
32
|
+
padding-block-end: ~'max(1rem, env(safe-area-inset-bottom))';
|
|
33
|
+
text-align: center;
|
|
34
|
+
font: var(--tui-typography-ui-s);
|
|
35
|
+
color: var(--tui-text-secondary);
|
|
36
|
+
|
|
37
|
+
&.tui-enter,
|
|
38
|
+
&.tui-leave {
|
|
39
|
+
animation-name: tuiSlide;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
> * {
|
|
43
|
+
grid-area: 2 / 1;
|
|
44
|
+
|
|
45
|
+
&:first-child {
|
|
46
|
+
grid-row: 1;
|
|
47
|
+
margin-block-end: 0.5rem;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// grid stretches direct children only; stretch wrapped content too
|
|
52
|
+
> tui-expand > .t-wrapper > *,
|
|
53
|
+
> tui-elastic-container > .t-wrapper > * {
|
|
54
|
+
inline-size: 100%;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&::before {
|
|
58
|
+
.fullsize(absolute, inset);
|
|
59
|
+
.transition(background);
|
|
60
|
+
|
|
61
|
+
content: '';
|
|
62
|
+
position: absolute;
|
|
63
|
+
z-index: -1;
|
|
64
|
+
inset-inline-start: -1rem;
|
|
65
|
+
inset-inline-end: -1rem;
|
|
66
|
+
background: var(--t-background, var(--tui-background-elevation-1));
|
|
67
|
+
mask-image: linear-gradient(180deg, transparent, black 2.5rem);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
tui-sheet-dialog [tuiFloatingContainer]:where(*&) {
|
|
72
|
+
margin-block-end: ~'calc(-1* max(1.5rem, env(safe-area-inset-bottom)))';
|
|
73
|
+
}
|