bulma/sass/components/dropdown.sass

75 lines
1.9 KiB
Sass
Raw Normal View History

2017-07-28 20:05:15 +00:00
$dropdown-content-background-color: $white !default
2017-07-20 19:01:55 +00:00
$dropdown-content-arrow: $link !default
$dropdown-content-offset: 4px !default
$dropdown-content-radius: $radius !default
$dropdown-content-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default
$dropdown-content-z: 20 !default
2017-07-28 20:05:15 +00:00
$dropdown-item-color: $grey-dark !default
$dropdown-item-hover-color: $black !default
$dropdown-item-hover-background-color: $background !default
2017-10-07 16:31:05 +00:00
$dropdown-item-active-color: $link-invert !default
$dropdown-item-active-background-color: $link !default
2017-07-20 19:01:55 +00:00
2017-07-28 20:05:15 +00:00
$dropdown-divider-background-color: $border !default
2017-07-20 19:01:55 +00:00
.dropdown
display: inline-flex
position: relative
vertical-align: top
&.is-active,
&.is-hoverable:hover
2017-07-21 09:44:49 +00:00
.dropdown-menu
2017-07-20 19:01:55 +00:00
display: block
2017-07-24 10:54:00 +00:00
&.is-right
.dropdown-menu
left: auto
right: 0
&.is-up
.dropdown-menu
bottom: 100%
padding-bottom: $dropdown-content-offset
2017-10-07 16:04:38 +00:00
padding-top: unset
top: auto
2017-07-20 19:01:55 +00:00
2017-07-21 09:44:49 +00:00
.dropdown-menu
2017-07-20 19:01:55 +00:00
display: none
left: 0
min-width: 12rem
padding-top: $dropdown-content-offset
position: absolute
top: 100%
z-index: $dropdown-content-z
.dropdown-content
2017-07-28 20:05:15 +00:00
background-color: $dropdown-content-background-color
2017-07-20 19:01:55 +00:00
border-radius: $dropdown-content-radius
box-shadow: $dropdown-content-shadow
padding-bottom: 0.5rem
padding-top: 0.5rem
.dropdown-item
2017-07-28 20:05:15 +00:00
color: $dropdown-item-color
2017-07-20 19:01:55 +00:00
display: block
font-size: 0.875rem
line-height: 1.5
padding: 0.375rem 1rem
position: relative
a.dropdown-item
padding-right: 3rem
white-space: nowrap
2017-07-24 10:34:43 +00:00
&:hover
2017-07-28 20:05:15 +00:00
background-color: $dropdown-item-hover-background-color
color: $dropdown-item-hover-color
2017-07-24 10:34:43 +00:00
&.is-active
2017-07-28 20:05:15 +00:00
background-color: $dropdown-item-active-background-color
color: $dropdown-item-active-color
2017-07-20 19:01:55 +00:00
.dropdown-divider
2017-07-28 20:05:15 +00:00
background-color: $dropdown-divider-background-color
2017-07-20 19:01:55 +00:00
border: none
display: block
height: 1px
margin: 0.5rem 0