This repository has been archived by the owner on Aug 26, 2022. It is now read-only.
/
submenu.scss
105 lines (89 loc) · 2.55 KB
/
submenu.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
.submenu {
display: none;
position: absolute;
z-index: 3;
top: 100%;
@include bidi-style(left, 0, right, auto);
width: 250px; // fallback, IE & Edge
padding: 15px;
border-top: 5px solid $grey-light;
box-shadow: 0 4px 4px rgba(0, 0, 0, .15);
background-color: #fff;
&.submenu-cols-2 {
width: (250px * 2);
}
.submenu-column {
box-sizing: border-box;
display: inline-block;
vertical-align: text-top;
@include bidi-style(padding-right, $grid-spacing, padding-left, 0);
width: 250px; // fallback, IE & Edge
}
@supports (width: -webkit-max-content) or (width: -moz-max-content) or (width: max-content) {
&,
&.submenu-cols-2 {
@include vendorize-value(width, max-content);
}
.submenu-column {
@include vendorize-value(width, max-content);
+ .submenu-column {
@include bidi-style(padding-left, ($grid-spacing * 2), padding-right, $grid-spacing);
}
}
}
.title {
@include set-heading-font-family;
@include set-font-size($h4-font-size);
}
#{$selector-icon} {
@include bidi-style(margin-left, 5px, margin-right, 0);
}
a {
display: block;
padding: 5px 0;
margin-bottom: 5px;
}
#nav-sec & {
border-top-color: #000;
@include bidi-style(left, auto, right, auto);
@include bidi-style(right, 0, left, auto);
}
.page-buttons & {
@include bidi-style(left, auto, right, auto);
@include bidi-style(right, 0, left, auto);
border-top: 5px solid $form-border-color;
}
}
.zone #main-header .submenu a {
color: $link-color !important; /* stylelint-disable-line declaration-no-important */
}
.submenu-close {
position: absolute;
top: 0;
right: 0;
}
/* not mobile first because this is an exeption for main-header only and it's
easier to strip off the style for the exeption than to add them only for
everything else */
@media #{$mq-mobile-and-down} {
#nav-sec,
.nav-main {
.submenu {
position: relative;
width: 100%;
padding: 0;
border-top: 0;
box-shadow: none;
a {
display: block;
}
.submenu-column,
&.submenu-cols-2 {
width: 100%;
+ .submenu-column {
@include bidi-style(padding-left, 0, padding-right, 0);
}
}
}
}
}