sass-site/source/assets/css/components/_lists.scss.erb

122 lines
2.1 KiB
Plaintext
Raw Normal View History

2013-10-11 22:06:20 +02:00
@mixin reset-list {
2013-10-09 12:30:53 +02:00
margin: 0;
padding: 0;
list-style: none;
2013-02-11 00:04:29 +01:00
}
2013-02-09 04:10:33 +01:00
2013-10-11 22:06:20 +02:00
@mixin horizontal-list($resolution: false) {
@if $resolution == false { @extend %reset-list; }
@else { @extend %reset-list-#{$resolution}; }
2013-02-09 04:10:33 +01:00
2013-02-11 00:04:29 +01:00
li {
display: inline-block;
2013-10-09 12:30:53 +02:00
margin: {
right: -2px;
2013-10-12 20:25:16 +02:00
left: 2em;
2013-10-09 12:30:53 +02:00
}
2013-02-11 00:04:29 +01:00
2013-10-09 12:30:53 +02:00
&:first-child { margin-left: 0; }
2013-02-09 04:10:33 +01:00
}
2013-02-11 00:04:29 +01:00
}
2013-10-11 22:06:20 +02:00
%reset-list { @include reset-list; }
%horizontal-list { @include horizontal-list; }
<% data.layout.resolutions.each do |resolution| %>
@include breakpoint($<%= resolution.target %>) {
%reset-list-<%= resolution.target %> { @include reset-list; }
%horizontal-list-<%= resolution.target %> {
@include horizontal-list(<%= resolution.target %>);
}
}
<% end %>
2013-10-12 20:25:16 +02:00
%list-columns {
2013-10-09 12:30:53 +02:00
@extend %reset-list;
margin: 0 auto;
2013-10-12 17:51:13 +02:00
@include breakpoint($tablet-large) {
@extend %clear-fix-tablet-large;
margin: 0 #{-$gutter-width};
2013-10-09 12:30:53 +02:00
2013-10-12 20:25:16 +02:00
> li {
2013-10-09 12:30:53 +02:00
float: left;
padding: {
right: $gutter-width;
left: $gutter-width;
}
2013-02-11 00:04:29 +01:00
}
2013-02-09 04:10:33 +01:00
}
}
2013-10-12 20:25:16 +02:00
.list-columns {
@extend %list-columns;
2013-10-16 09:14:29 +02:00
h3 { text-align: center; }
2013-10-12 20:25:16 +02:00
@include breakpoint($tablet-large) {
2013-10-12 23:39:55 +02:00
> li {
2013-10-12 20:25:16 +02:00
width: 50%;
&:nth-child(odd) { clear: both; }
}
}
}
.list-tiled {
@extend %list-columns;
@include breakpoint($tablet-large) {
2013-10-12 23:39:55 +02:00
> li {
2013-10-12 20:25:16 +02:00
width: 100 / 3 * 1%;
&:nth-child(3n+4) { clear: both; }
}
}
}
2013-10-13 01:26:11 +02:00
ol {
&.list-columns,
&.list-feature {
list-style: decimal {
position: inside;
}
2013-10-12 23:39:55 +02:00
2013-10-13 01:26:11 +02:00
ul,
ol { list-style-position: outside; }
span.info {
@include font-size-small;
}
2013-10-13 01:26:11 +02:00
}
2013-10-12 23:39:55 +02:00
}
2013-10-09 12:30:53 +02:00
%description-list {
2013-10-13 01:26:11 +02:00
max-width: none;
@include breakpoint($mobile-large) {
dd { margin-left: 0; }
}
2013-02-09 04:10:33 +01:00
2013-10-11 22:06:20 +02:00
@include breakpoint($tablet-small) {
2013-10-09 12:30:53 +02:00
@extend %table-layout-tablet-small;
table-layout: fixed;
text-align: left;
2013-02-09 04:10:33 +01:00
2013-10-09 12:30:53 +02:00
dt,
dd { @extend %table-layout-cell-baseline-tablet-small; }
2013-02-09 04:10:33 +01:00
2013-10-09 12:30:53 +02:00
dt { padding-right: $gutter-width / 2; }
dd { padding-left: $gutter-width / 2; }
2013-02-11 00:04:29 +01:00
}
2013-10-11 22:06:20 +02:00
@include breakpoint($screen-small) {
2013-10-09 12:30:53 +02:00
dt { width: 100 / 3 * 1%; }
}
2013-02-09 04:10:33 +01:00
}
2013-10-11 22:06:20 +02:00
2013-10-12 23:39:55 +02:00
.list-feature {
@extend %reset-list;
@include font-size-large;
}