Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/icons/dropdown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions components/_dropdowns.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
$dropdown-content-z-index: 1;

.wds-dropdown {
display: inline-block;
position: relative;

&.wds-is-active {
.wds-dropdown-content {
display: inline-block;
}

.wds-dropdown-toggle-chevron {
transform: rotate(180deg);
}
}
}

.wds-dropdown-toggle {
position: relative;
// dropdown content has shadow that should be hidden below the toggle
z-index: $dropdown-content-z-index + 1;
}

.wds-dropdown-content {
background-color: $color-white;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, .2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd feel better if we have have variable for black color ;)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's address it later when we decide what to do with $color-black which isn't black.

display: none;
position: absolute;
z-index: $dropdown-content-z-index;

&.wds-is-dark {
box-shadow: 0 0 20px 0 rgba(0, 0, 0, .3);
}

&.wds-is-right-aligned {
right: 0;
}
}
1 change: 1 addition & 0 deletions components/index.scss
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@import 'dropdowns';
@import 'global-footer';
2 changes: 1 addition & 1 deletion dist/svg/sprite-icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dist/svg/wds-icons-dropdown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.