List docs init

This commit is contained in:
Jeremy Thomas 2018-10-02 08:54:58 +01:00
parent e6e4a5a01a
commit a531ea2758
5 changed files with 256 additions and 588 deletions

View File

@ -10,8 +10,8 @@
* #1919 New `is-arrowless` class for navbar items * #1919 New `is-arrowless` class for navbar items
* #1764 New `.is-sr-only` helper * #1764 New `.is-sr-only` helper
* #2109 Add and use `$navbar-breakpoint` variable * #2109 Add and use `$navbar-breakpoint` variable
* New variables `$control-height`, `$control-line-height`, `$pagination-min-width`, `$input-height` * New variables `$control-height`, `$control-line-height`, `$pagination-min-width`, `$input-height`
* #1720 Add list element feature
### Improvements ### Improvements

View File

@ -73,7 +73,7 @@
.bd-link-figure .bd-link-figure
position: absolute position: absolute
right: calc(100% + 0.5em) right: calc(100% + 0.75em)
text-align: center text-align: center
top: 0 top: 0
min-width: 1.5em min-width: 1.5em

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,61 @@
---
title: List
layout: documentation
doc-tab: components
doc-subtab: list
breadcrumb:
- home
- documentation
- components
- components-list
meta:
colors: false
sizes: false
variables: true
---
{% capture list_example %}
<div class="list is-hoverable">
<a class="list-item">
Featured
</a>
<a class="list-item">
All Posts
</a>
<a class="list-item is-active">
Announcements
</a>
<a class="list-item">
Business
</a>
<a class="list-item">
Community
</a>
<a class="list-item">
Data
</a>
<a class="list-item">
Editor Tools
</a>
<a class="list-item">
Education
</a>
<a class="list-item">
Engineering
</a>
<a class="list-item">
Events
</a>
<a class="list-item">
Policy
</a>
</div>
{% endcapture %}
<div class="content">
<p>
The list component consists of several elements:
</p>
</div>
{% include elements/snippet.html content=list_example more=true %}

View File

@ -9,19 +9,31 @@ $list-item-active-color: $link-invert !default
$list-item-hover-background-color: $background !default $list-item-hover-background-color: $background !default
.list .list
@extend %block
background-color: $list-background-color background-color: $list-background-color
box-shadow: $list-shadow
border-radius: $list-radius border-radius: $list-radius
&.is-hoverable > .list-item:hover:not(.is-active) box-shadow: $list-shadow
background-color: $list-item-hover-background-color // &.is-hoverable > .list-item:hover:not(.is-active)
cursor: pointer // background-color: $list-item-hover-background-color
// cursor: pointer
.list-item .list-item
color: $list-item-color
display: block display: block
padding: 0.5em 1em padding: 0.5em 1em
&:not(a)
color: $list-item-color
&:first-child
border-top-left-radius: $list-radius
border-top-right-radius: $list-radius
&:last-child
border-top-left-radius: $list-radius
border-top-right-radius: $list-radius
&:not(:last-child)
border-bottom: $list-item-border
&.is-active &.is-active
background-color: $list-item-active-background-color background-color: $list-item-active-background-color
color: $list-item-active-color color: $list-item-active-color
&:not(:last-child)
border-bottom: $list-item-border a.list-item
background-color: $list-item-hover-background-color
cursor: pointer