segment
View source@mixin segment() { ... }
Use to separate components on the page.
Modifiers
--greymodifier to change the background color
This mixin takes no parameters.
Example
.segment {
@include segment();
}
@mixin segment() { ... }
Use to separate components on the page.
--grey modifier to change the background colorThis mixin takes no parameters.
.segment {
@include segment();
}
@mixin container() { ... }
Create a container element to wrap segments
--slim removes the gutters--narrow smaller width--half half of the max widthThis mixin takes no parameters.
@mixin icon-before($uri) { ... }
Use in an icon to add it to the before selector
$uri
The icon uri to add
@mixin clearfix() { ... }
A simple clearfix helper
This mixin takes no parameters.
@mixin respond-to($screen-width, $method: 'min') { ... }
Set up a media query passing a value to use for min width
$screen-width
A value for the media query
$method
'min' or 'max'
.header {
@include respond-to($min-1290) {
}
}
@mixin best-fit-padding($imageWidth, $imageHeight) { ... }
Providing an image width and height, provides the correct aspect ratio via padding-bottom % This should be used with an element of a height of 0, so that the height is determined by the padding-bottom rather than the element's height property
$imageWidth
The width of the image
$imageHeight
The height of the image
@mixin hardware-acceleration() { ... }
Hack to force GPU rendering (most in the community argue this should be used quite sparingly!!)
This mixin takes no parameters.
@mixin z-layer() { ... }
A mixin to help clean up z-index madness. Options are: below, default, middle, top, and modal [/doc]
This mixin takes no parameters.
@mixin divider() { ... }
Standard divider used between sections
This mixin takes no parameters.
@mixin component-width() { ... }
Sets max width and centers component
This mixin takes no parameters.
@mixin author-image($mobile, $orientation: 'vertical') { ... }
Style the author's image
$mobile
No description available.
$orientation
'vertical' or 'horizontal'
@mixin author-creds($mobile) { ... }
Style the author's credentials
$mobile
No description available.
@mixin author-name($mobile) { ... }
Style the author's name
$mobile
No description available.
@mixin author-title($mobile) { ... }
Style an author's Title
$mobile
No description available.
@mixin see-more-link() { ... }
Used for the see more links at the bottom of components
This mixin takes no parameters.
.survival_guide__button-container {
@include see-more-link;
}
@mixin css-arrow-central() { ... }
Css arrow, currently only used in date picker
This mixin takes no parameters.
@mixin placeholder() { ... }
Placeholder
Outputs vendor-prefixed placeholders for styling. Must be nested in a rule-set.
This mixin takes no parameters.
Usage
input { @include placeholder { color: #999; } }
@mixin form-control($type: "text") { ... }
Includes a form control
$type
The input type of the control; accepts "text" or "select"
textarea,
input[type="text"] {
@include form-control;
}
select {
@include form-control("select");
}
@mixin fade-edge($side, $offset: 0, $width: 3rem) { ... }
Apply to a :before or :after psuedo element to create a soft fade on an
edge. Typically used to hide overflow and therefore best used with
overflow: hidden; and white-space: nowrap;.
$side
left or right
$offset
Amount of offset
$width
Width of the fade
.text {
color: #333;
font-size: 1em;
overflow: hidden;
white-space: nowrap;
width: 400px;
&:after {
@include fade-edge("right");
}
}
@function percent($target, $context) { ... }
Convert a pixel value to a percentage value
$target
Pixel value of element width
$context
Pixel value of element's container width
Percentage value
String@function em($pixel, $base: 16px) { ... }
Convert a pixel value to an em value
For a relational value, the input is calculated based on a parent value. The default parent is 16px. The parent can be changed by passing an optional second value.
$pixel
Pixel value to convert
$base
Base pixel value
em value
String@function strip-units($number) { ... }
Removes units from a number string
$number
The string to remove units from