Skip to content

Commit

Permalink
Add loose list style
Browse files Browse the repository at this point in the history
  • Loading branch information
ediblecode committed May 12, 2017
1 parent e482beb commit 302eb3b
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions src/stylesheets/typography/_typography-lists.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
/// @group Typography
////

/// List placeholder
/// @since 0.1.0
%list {
font-feature-settings: 'kern', 'onum', 'liga';
margin-left: 2rem;
margin-left: rem($spacing-large);
padding: 0;
}

Expand All @@ -14,20 +15,19 @@ ol {
@extend %list;
}

/// Base list class. Can be used with various modifiers.
/// @see .list--unstyled
/// @see .list--loose
/// @since 0.1.0
.list {
@extend %list;

&--unstyled {
list-style: none;
margin-left: 0;
padding: 0;
}

// TODO: Do we need featured lists?
&--featured {
list-style: none outside;

li,
&__list-item {
.list__item {
position: relative;

&:before {
Expand All @@ -45,3 +45,23 @@ ol {
}
}
}

/// Unstyled list modifier - remove bullets, padding etc.
/// Used as a modifier for `.list`.
/// Often used for lists of links.
/// @requires .list
/// @since 0.1.0
.list--unstyled {
list-style: none;
margin-left: 0;
padding: 0;
}

/// Loose list style - with a gap between list items
/// @since 0.2.12
.list--loose {
li,
.list__item {
margin-bottom: rem($spacing-x-small);
}
}

0 comments on commit 302eb3b

Please sign in to comment.