Skip to content

Commit c3a2aec

Browse files
author
Igor Rogatty
authored
Merge pull request #36 from Wikia/XW-1903-clean
XW-1903 | Add dropdown styles
2 parents 0f869ef + 715f52d commit c3a2aec

File tree

5 files changed

+42
-3
lines changed

5 files changed

+42
-3
lines changed

assets/icons/dropdown.svg

Lines changed: 1 addition & 1 deletion
Loading

components/_dropdowns.scss

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
$dropdown-content-z-index: 1;
2+
3+
.wds-dropdown {
4+
display: inline-block;
5+
position: relative;
6+
7+
&.wds-is-active {
8+
.wds-dropdown-content {
9+
display: inline-block;
10+
}
11+
12+
.wds-dropdown-toggle-chevron {
13+
transform: rotate(180deg);
14+
}
15+
}
16+
}
17+
18+
.wds-dropdown-toggle {
19+
position: relative;
20+
// dropdown content has shadow that should be hidden below the toggle
21+
z-index: $dropdown-content-z-index + 1;
22+
}
23+
24+
.wds-dropdown-content {
25+
background-color: $color-white;
26+
box-shadow: 0 0 10px 0 rgba(0, 0, 0, .2);
27+
display: none;
28+
position: absolute;
29+
z-index: $dropdown-content-z-index;
30+
31+
&.wds-is-dark {
32+
box-shadow: 0 0 20px 0 rgba(0, 0, 0, .3);
33+
}
34+
35+
&.wds-is-right-aligned {
36+
right: 0;
37+
}
38+
}

components/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
@import 'dropdowns';
12
@import 'global-footer';

dist/svg/sprite-icons.svg

Lines changed: 1 addition & 1 deletion
Loading

dist/svg/wds-icons-dropdown.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)