| 1 |
@import "../utilities/mixins" |
| 2 |
|
| 3 |
$dropdown-menu-min-width: 12rem !default |
| 4 |
|
| 5 |
$dropdown-content-background-color: $scheme-main !default |
| 6 |
$dropdown-content-arrow: $link !default |
| 7 |
$dropdown-content-offset: 4px !default |
| 8 |
$dropdown-content-padding-bottom: 0.5rem !default |
| 9 |
$dropdown-content-padding-top: 0.5rem !default |
| 10 |
$dropdown-content-radius: $radius !default |
| 11 |
$dropdown-content-shadow: $shadow !default |
| 12 |
$dropdown-content-z: 20 !default |
| 13 |
|
| 14 |
$dropdown-item-color: $text !default |
| 15 |
$dropdown-item-hover-color: $scheme-invert !default |
| 16 |
$dropdown-item-hover-background-color: $background !default |
| 17 |
$dropdown-item-active-color: $link-invert !default |
| 18 |
$dropdown-item-active-background-color: $link !default |
| 19 |
|
| 20 |
$dropdown-divider-background-color: $border-light !default |
| 21 |
|
| 22 |
.dropdown |
| 23 |
display: inline-flex |
| 24 |
position: relative |
| 25 |
vertical-align: top |
| 26 |
&.is-active, |
| 27 |
&.is-hoverable:hover |
| 28 |
.dropdown-menu |
| 29 |
display: block |
| 30 |
&.is-right |
| 31 |
.dropdown-menu |
| 32 |
left: auto |
| 33 |
right: 0 |
| 34 |
&.is-up |
| 35 |
.dropdown-menu |
| 36 |
bottom: 100% |
| 37 |
padding-bottom: $dropdown-content-offset |
| 38 |
padding-top: initial |
| 39 |
top: auto |
| 40 |
|
| 41 |
.dropdown-menu |
| 42 |
display: none |
| 43 |
+ltr-position(0, false) |
| 44 |
min-width: $dropdown-menu-min-width |
| 45 |
padding-top: $dropdown-content-offset |
| 46 |
position: absolute |
| 47 |
top: 100% |
| 48 |
z-index: $dropdown-content-z |
| 49 |
|
| 50 |
.dropdown-content |
| 51 |
background-color: $dropdown-content-background-color |
| 52 |
border-radius: $dropdown-content-radius |
| 53 |
box-shadow: $dropdown-content-shadow |
| 54 |
padding-bottom: $dropdown-content-padding-bottom |
| 55 |
padding-top: $dropdown-content-padding-top |
| 56 |
|
| 57 |
.dropdown-item |
| 58 |
color: $dropdown-item-color |
| 59 |
display: block |
| 60 |
font-size: 0.875rem |
| 61 |
line-height: 1.5 |
| 62 |
padding: 0.375rem 1rem |
| 63 |
position: relative |
| 64 |
|
| 65 |
a.dropdown-item, |
| 66 |
button.dropdown-item |
| 67 |
+ltr-property("padding", 3rem) |
| 68 |
text-align: inherit |
| 69 |
white-space: nowrap |
| 70 |
width: 100% |
| 71 |
&:hover |
| 72 |
background-color: $dropdown-item-hover-background-color |
| 73 |
color: $dropdown-item-hover-color |
| 74 |
&.is-active |
| 75 |
background-color: $dropdown-item-active-background-color |
| 76 |
color: $dropdown-item-active-color |
| 77 |
|
| 78 |
.dropdown-divider |
| 79 |
background-color: $dropdown-divider-background-color |
| 80 |
border: none |
| 81 |
display: block |
| 82 |
height: 1px |
| 83 |
margin: 0.5rem 0 |