Compass Columns
Provides a mixin for the CSS3 Multi-column layout module. See CSS3 spec: Multi-colum layout module.
This file can be imported using:
@import "compass/css3/columns"
Examples
- Columns
- css3 mixin for css columns
Imports
Mixins
view sourcecolumns($width-and-count)
=columns($width-and-count) +experimental(columns, $width-and-count, -moz, -webkit, -o, -ms, not -khtml, official)
@mixin columns($width-and-count) {
@include experimental(columns, $width-and-count, -moz, -webkit, -o, -ms, not -khtml, official); }
Specify the shorthand columns property.
Example:
@include columns(20em 2)
column-count($count)
=column-count($count) +experimental(column-count, $count, -moz, -webkit, -o, -ms, not -khtml, official)
@mixin column-count($count) {
@include experimental(column-count, $count, -moz, -webkit, -o, -ms, not -khtml, official); }
Specify the number of columns
column-gap($width)
=column-gap($width) +experimental(column-gap, $width, -moz, -webkit, -o, -ms, not -khtml, official)
@mixin column-gap($width) {
@include experimental(column-gap, $width, -moz, -webkit, -o, -ms, not -khtml, official); }
Specify the gap between columns e.g. 20px
column-width($width)
=column-width($width) +experimental(column-width, $width, -moz, -webkit, -o, -ms, not -khtml, official)
@mixin column-width($width) {
@include experimental(column-width, $width, -moz, -webkit, -o, -ms, not -khtml, official); }
Specify the width of columns e.g. 100px
column-rule-width($width)
=column-rule-width($width) +experimental(rule-width, $width, -moz, -webkit, -o, -ms, not -khtml, official)
@mixin column-rule-width($width) {
@include experimental(rule-width, $width, -moz, -webkit, -o, -ms, not -khtml, official); }
Specify the width of the rule between columns e.g. 1px
column-rule-style($style)
=column-rule-style($style) +experimental(rule-style, unquote($style), -moz, -webkit, -o, -ms, not -khtml, official)
@mixin column-rule-style($style) {
@include experimental(rule-style, unquote($style), -moz, -webkit, -o, -ms, not -khtml, official); }
Specify the style of the rule between columns e.g. dotted.
This works like border-style.
column-rule-color($color)
=column-rule-color($color) +experimental(rule-color, $color, -moz, -webkit, -o, -ms, not -khtml, official)
@mixin column-rule-color($color) {
@include experimental(rule-color, $color, -moz, -webkit, -o, -ms, not -khtml, official); }
Specify the color of the rule between columns e.g. blue.
This works like border-color.
column-rule($width, $style, $color)
=column-rule($width, $style: false, $color: false) $full: -compass-space-list(compact($width, $style, $color)) +experimental(column-rule, $full, -moz, -webkit, -o, -ms, not -khtml, official)
@mixin column-rule($width, $style: false, $color: false) {
$full: -compass-space-list(compact($width, $style, $color));
@include experimental(column-rule, $full, -moz, -webkit, -o, -ms, not -khtml, official); }
Mixin encompassing all column rule properties For example:
@include column-rule(1px, solid, #c00)
Or the values can be space separated:
@include column-rule(1px solid #c00)