codecheck
222 строки · 4.9 Кб
1// core
2.p-menubar {
3display: flex;
4align-items: center;
5}
6
7.p-menubar ul {
8margin: 0;
9padding: 0;
10list-style: none;
11}
12
13.p-menubar .p-menuitem-link {
14cursor: pointer;
15display: flex;
16align-items: center;
17text-decoration: none;
18overflow: hidden;
19position: relative;
20}
21
22.p-menubar .p-menuitem-text {
23line-height: 1;
24}
25
26.p-menubar .p-menuitem {
27position: relative;
28}
29
30.p-menubar-root-list {
31display: flex;
32align-items: center;
33flex-wrap: wrap;
34}
35
36.p-menubar-root-list > li ul {
37display: none;
38z-index: 1;
39}
40
41.p-menubar-root-list > .p-menuitem-active > .p-submenu-list {
42display: block;
43}
44
45.p-menubar .p-submenu-list {
46display: none;
47position: absolute;
48z-index: 1;
49}
50
51.p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list {
52display: block;
53left: 100%;
54top: 0;
55}
56
57.p-menubar .p-submenu-list .p-menuitem .p-menuitem-content .p-menuitem-link .p-submenu-icon {
58margin-left: auto;
59}
60
61.p-menubar .p-menubar-end {
62margin-left: auto;
63align-self: center;
64}
65
66.p-menubar-button {
67display: none;
68cursor: pointer;
69align-items: center;
70justify-content: center;
71text-decoration: none;
72}
73
74.p-menubar.p-menubar-mobile {
75position: relative;
76}
77
78.p-menubar.p-menubar-mobile .p-menubar-button {
79display: flex;
80}
81
82.p-menubar.p-menubar-mobile .p-menubar-root-list {
83position: absolute;
84display: none;
85width: 100%;
86}
87
88.p-menubar.p-menubar-mobile .p-submenu-list {
89width: 100%;
90position: static;
91box-shadow: none;
92border: 0 none;
93}
94
95.p-menubar.p-menubar-mobile .p-menubar-root-list .p-menuitem {
96width: 100%;
97position: static;
98}
99
100.p-menubar.p-menubar-mobile-active .p-menubar-root-list {
101display: flex;
102flex-direction: column;
103top: 100%;
104left: 0;
105z-index: 1;
106}
107
108// theme
109.p-menubar {
110padding: $horizontalMenuPadding;
111background: $horizontalMenuBg;
112color: $horizontalMenuTextColor;
113border: $horizontalMenuBorder;
114border-radius: $borderRadius;
115
116.p-menubar-root-list {
117outline: 0 none;
118
119> .p-menuitem {
120@include horizontal-rootmenuitem();
121}
122}
123
124.p-menuitem {
125@include menuitem();
126}
127
128.p-submenu-list {
129padding: $verticalMenuPadding;
130background: $overlayMenuBg;
131border: $overlayMenuBorder;
132box-shadow: $overlayMenuShadow;
133min-width: $menuWidth;
134border-radius: $borderRadius;
135
136.p-menuitem-separator {
137border-top: $divider;
138margin: $menuSeparatorMargin;
139}
140
141.p-submenu-icon {
142font-size: $menuitemSubmenuIconFontSize;
143}
144}
145
146&.p-menubar-mobile {
147.p-menubar-button {
148width: $actionIconWidth;
149height: $actionIconHeight;
150color: $horizontalMenuRootMenuitemIconColor;
151border-radius: $actionIconBorderRadius;
152transition: $actionIconTransition;
153outline-color: transparent;
154
155&:hover {
156color: $horizontalMenuRootMenuitemIconHoverColor;
157background: $horizontalMenuRootMenuitemHoverBg;
158}
159
160&:focus {
161@include focused();
162}
163}
164
165.p-menubar-root-list {
166padding: $verticalMenuPadding;
167background: $overlayMenuBg;
168border: $overlayMenuBorder;
169box-shadow: $overlayMenuShadow;
170
171.p-menuitem-separator {
172border-top: $divider;
173margin: $menuSeparatorMargin;
174}
175
176.p-submenu-icon {
177font-size: $menuitemSubmenuIconFontSize;
178}
179
180.p-menuitem {
181.p-menuitem-content {
182.p-menuitem-link {
183.p-submenu-icon {
184margin-left: auto;
185transition: transform $transitionDuration;
186}
187}
188}
189
190
191&.p-menuitem-active {
192> .p-menuitem-content {
193> .p-menuitem-link {
194> .p-submenu-icon {
195transform: rotate(-180deg);
196}
197}
198}
199}
200}
201
202.p-submenu-list {
203.p-submenu-icon {
204transition: transform $transitionDuration;
205transform: rotate(90deg);
206}
207
208.p-menuitem-active {
209> .p-menuitem-content {
210> .p-menuitem-link {
211> .p-submenu-icon {
212transform: rotate(-90deg);
213}
214}
215}
216}
217}
218
219@include nested-submenu-indents(nth($menuitemPadding, 1), 2, 10);
220}
221}
222}