Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (39 sloc) 1.34 KB
/* ------------------------------------ *\
TOOLS - BREAKPOINT
\* ------------------------------------ */
////
/// @group Tools: Breakpoints
/// @author Salem Ghoweri
/// @author Mike Mai
////
/// This returns the breakpoint value (with px) from $bolt-breakpoints map
/// @param {string} $name - The name of the breakpoint (from within $bolt-breakpoints)
/// @return {string} The breakpoint value (with px)
/// @example scss
/// .element {
/// @media screen and (max-width: #{bolt-breakpoint(xsmall)}) {
/// font-size: 24px;
/// }
/// }
@function bolt-breakpoint($name) {
@return map-get($bolt-breakpoints, $name);
}
// alias for bolt-breakpoint
@function bolt-bp($name) {
@return bolt-breakpoint($name);
}
/// This provides a wrapper mixin for performing bolt media queries with mq() which allows for the use of:
/// $from (inclusive min-width boundary), $until (exclusive max-width boundary), $and (additional custom directives), $media-type (media type: screen, print, etc)
/// @link https://github.com/sass-mq/sass-mq Sass MQ on GitHub
/// @param $args... - Bolt Media Query args ([breakpoint-name], $from, $until, $and, $media-type)
/// @example scss - Bolt's mq() wrapper
/// .element {
/// @include bolt-mq(($until: small){
/// flex-direction: column;
/// }
/// }
@mixin bolt-mq($args...) {
@include mq($args...) {
@content;
}
}
You can’t perform that action at this time.