Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add list element feature [Fixes #772] #1720

Merged
merged 9 commits into from
Oct 2, 2018
1 change: 1 addition & 0 deletions sass/components/_all.sass
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@import "card.sass"
@import "dropdown.sass"
@import "level.sass"
@import "list.sass"
@import "media.sass"
@import "menu.sass"
@import "message.sass"
Expand Down
26 changes: 26 additions & 0 deletions sass/components/list.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$list-background-color: $white !default
$list-radius: $radius !default

$list-item-border: 1px solid $border !default
$list-item-color: $text !default
$list-item-active-background-color: $link !default
$list-item-active-color: $link-invert !default
$list-item-hover-background-color: $background !default

.list
background-color: $list-background-color
box-shadow: $card-shadow
Copy link
Owner

Choose a reason for hiding this comment

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

Don’t reference a variable from another file. Create a new one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

xD

border-radius: $list-radius
&.is-hoverable > .list-item:hover:not(.is-active)
background-color: $list-item-hover-background-color
cursor: pointer

.list-item
color: $list-item-color
display: block
padding: 0.5em 1em
&.is-active
background-color: $list-item-active-background-color
color: $list-item-active-color
&:not(:last-child)
border-bottom: $list-item-border