-
Notifications
You must be signed in to change notification settings - Fork 13.5k
/
split-pane.scss
71 lines (54 loc) · 1.61 KB
/
split-pane.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
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
@import "./split-pane.vars";
@import "../menu/menu.vars";
// Split Pane
// --------------------------------------------------
:host {
/**
* @prop --border: Border between panes
* @prop --side-min-width: Minimum width of the side pane. Does not apply when split pane is collapsed.
* @prop --side-max-width: Maximum width of the side pane. Does not apply when split pane is collapsed.
* @prop --side-width: Width of the side pane. Does not apply when split pane is collapsed.
*/
--side-width: 100%;
@include position(0, 0, 0, 0);
display: flex;
position: absolute;
flex-direction: row;
flex-wrap: nowrap;
contain: strict;
}
/**
* Do not pass CSS Variables down on larger
* screens as we want them to affect the outer
* `ion-menu` rather than the inner content
*/
::slotted(ion-menu.menu-pane-visible) {
flex: 0 1 auto;
width: var(--side-width);
min-width: var(--side-min-width);
max-width: var(--side-max-width);
}
:host(.split-pane-visible) ::slotted(.split-pane-side),
:host(.split-pane-visible) ::slotted(.split-pane-main) {
@include position(0, 0, 0, 0);
position: relative;
box-shadow: none;
z-index: 0;
}
:host(.split-pane-visible) ::slotted(.split-pane-main) {
flex: 1;
}
:host(.split-pane-visible) ::slotted(.split-pane-side:not(ion-menu)),
:host(.split-pane-visible) ::slotted(ion-menu.split-pane-side.menu-enabled) {
display: flex;
flex-shrink: 0;
}
::slotted(.split-pane-side:not(ion-menu)) {
display: none;
}
:host(.split-pane-visible) ::slotted(.split-pane-side) {
order: -1;
}
:host(.split-pane-visible) ::slotted(.split-pane-side[side=end]) {
order: 1;
}