-
Notifications
You must be signed in to change notification settings - Fork 60
/
toolbar.scss
194 lines (153 loc) · 3.53 KB
/
toolbar.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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
@import "./new-settings";
@import "./mixins";
$block: #{$fd-namespace}-toolbar;
$toolbar-height-compact: 2rem;
$toolbar-height-cozy: 2.75rem;
$toolbar-separator-height-compact: 1.5rem;
$toolbar-separator-height-cozy: 2rem;
$toolbar-spacing: 0.5rem;
$toolbar-padding: 0 0.5rem;
$title-toolbar-padding: 0 0.5rem 0 1rem;
$title-toolbar-height: 2.75rem;
@mixin activeStyles() {
&.#{$block}--active {
@content;
}
}
@mixin toolbarAuto() {
background-color: inherit;
}
@mixin toolbarSolid() {
background-color: var(--sapBackgroundColor);
}
@mixin toolbarTransparent() {
background-color: var(--sapToolbar_Background);
}
@mixin toolbarInfo() {
$active-color: var(--sapInfobar__TextColor);
background-color: var(--sapInfobar_NonInteractive_Background);
color: var(--sapList_TextColor);
@include activeStyles() {
background-color: var(--sapInfobar_Background);
color: $active-color;
@include fd-hover() {
background-color: var(--sapInfobar_Hover_Background);
}
@include fd-active() {
background-color: var(--sapInfobar_Active_Background);
}
}
}
@mixin toolbarStandard() {
border-bottom: solid 0.0625rem var(--sapGroup_TitleBorderColor);
}
@mixin titleToolbar() {
padding: $title-toolbar-padding;
height: $title-toolbar-height;
}
@mixin toolbarClear() {
border-bottom: none;
}
%spacerMargin {
margin-left: $toolbar-spacing;
@include fd-rtl() {
margin-left: 0;
margin-right: $toolbar-spacing;
}
}
@mixin toolbarSpacing() {
> * ~ *:not(.#{$block}__spacer) {
@extend %spacerMargin;
}
> .#{$block}__spacer + *:not(.#{$block}__spacer) {
margin-left: 0;
margin-right: 0;
}
}
.#{$block} {
@include fd-reset();
height: $toolbar-height-compact;
padding: $toolbar-padding;
display: flex;
align-items: center;
@include toolbarSpacing();
@include toolbarStandard();
&--title {
@include titleToolbar();
}
&--clear {
@include toolbarClear();
}
&--auto {
@include toolbarAuto();
}
&--solid {
@include toolbarSolid();
}
&--transparent {
@include toolbarTransparent();
}
&--info {
@include toolbarInfo();
}
&__spacer {
@include fd-reset();
height: 100%;
flex: 1 auto;
&--fixed {
flex: none;
display: inline-block;
}
}
&__separator {
@include fd-reset();
width: 0.0625rem;
height: $toolbar-separator-height-compact;
background-color: var(--sapToolbar_SeparatorColor);
}
&__overflow {
&.#{$fd-namespace}-popover {
.#{$block}__overflow__body {
@include fd-reset();
display: flex;
flex-direction: column;
max-width: 20rem;
padding: 0.1875rem 0.375rem;
> * {
display: block;
text-align: left;
width: auto;
margin: 0.1875rem 0;
@include fd-rtl() {
text-align: right;
}
}
> .#{$block}__separator {
height: 0.0625rem;
margin: 0.1875rem;
width: auto;
background-color: var(--sapToolbar_SeparatorColor);
}
.#{$block}__overflow__form-label,
.#{$block}__overflow__label {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
&--cozy {
height: $toolbar-height-cozy;
.#{$block}__separator {
height: $toolbar-separator-height-cozy;
}
.#{$block}__overflow {
&.#{$fd-namespace}-popover {
.#{$block}__overflow__body {
padding: 0.25rem 0.5rem;
}
}
}
}
}