debug
mixins
debug-vertical-alignment
@mixin debug-vertical-alignment($color: $bompasteque2-debug) { ... }
Description
Debug vertical rhythm
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$color | — none | Color | $bompasteque2-debug |
Requires
Links
Author
Compass
typography
mixins
adjust-font-size-to
@mixin adjust-font-size-to($to, $map: null) { ... }
Description
Adjust a block to have a different font size and line height to maintain the rhythm.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$to | — none | Number | — none |
$map | — none | Map or Null | null |
Requires
- [function]
map-extend
- [function]
ms-key
- [variable]
modularscale
Author
Aziz Da
leader
@mixin leader($property: "margin", $map: null) { ... }
Description
Apply leading whitespace. The $property can be margin or padding.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$property | — none | String | "margin" |
$map | — none | Map or Null | null |
Requires
- [function]
map-extend
Used by
- [mixin]
padding-leader
- [mixin]
margin-leader
Author
Aziz Da
trailer
@mixin trailer($property: "margin", $map: null) { ... }
Description
Apply trailing whitespace. The $property can be margin or padding.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$property | — none | String | "margin" |
$map | — none | Map or Null | null |
Requires
- [function]
map-extend
Used by
- [mixin]
padding-trailer
- [mixin]
margin-trailer
Author
Aziz Da
rhythm
@mixin rhythm($map: null) { ... }
Description
Shorthand mixin to apply whitespace for top and bottom margins and padding.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | — none | Map or Null | null |
Used by
- [mixin]
rhythm-margin
- [mixin]
rhythm-padding
Author
Aziz Da
establish-baseline
@mixin establish-baseline() { ... }
Description
Establishes a font baseline for the given font-size. relative font sizing: true http://caniuse.com/#feat=rem
Parameters
None.
Requires
- [function]
convert-length
- [function]
const
- [function]
const
Links
Author
Compass
adjust-leading-to
@mixin adjust-leading-to($lines, $from: null) { ... }
Description
Adjust a block to have different line height to maintain the rhythm.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$lines | — none | Number | — none |
$from | — none | Null or Number | null |
Requires
Links
Author
Compass
padding-leader
@mixin padding-leader($map: null) { ... }
Description
Apply leading whitespace as padding.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | — none | Map or Null | null |
Requires
- [mixin]
leader
Links
Author
Compass
margin-leader
@mixin margin-leader($map: null) { ... }
Description
Apply leading whitespace as margin.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | — none | Map or Null | null |
Requires
- [mixin]
leader
Links
Author
Compass
padding-trailer
@mixin padding-trailer($map: null) { ... }
Description
Apply trailing whitespace as padding.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | — none | Map or Null | null |
Requires
- [mixin]
trailer
Links
Author
Compass
margin-trailer
@mixin margin-trailer($map: null) { ... }
Description
Apply trailing whitespace as margin.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | — none | Map or Null | null |
Requires
- [mixin]
trailer
Links
Author
Compass
rhythm-margin
@mixin rhythm-margin($map: null) { ... }
Description
Shorthand mixin to apply whitespace for top and bottom margins.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | — none | Map or Null | null |
Requires
- [mixin]
rhythm
- [function]
map-extend
Links
Author
Compass
rhythm-padding
@mixin rhythm-padding($map: null) { ... }
Description
Shorthand mixin to apply whitespace for top and bottom padding.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | — none | Map or Null | null |
Requires
- [mixin]
rhythm
- [function]
map-extend
Links
Author
Compass
[private] apply-side-rhythm-border
@mixin apply-side-rhythm-border($side, $lines: 1, $minus: $border-width-global, $style: $border-style-global, $color: $border-color-global, $from: null) { ... }
Description
Apply a border and whitespace to any side without destroying the vertical rhythm. The whitespace must be greater than the width of the border.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$side | — none | String | — none |
$lines | — none | Number | 1 |
$minus | — none | Number | $border-width-global |
$style | — none | String | $border-style-global |
$color | — none | Color | $border-color-global |
$from | — none | Null or Number | null |
Requires
- [function]
const
- [function]
convert-length
- [function]
rhythm
- [variable]
unit-global
Used by
- [mixin]
leading-border
- [mixin]
trailing-border
- [mixin]
horizontal-border
- [mixin]
horizontal-border
- [mixin]
rhythm-border
Links
Author
Compass
leading-border
@mixin leading-border($map: null) { ... }
Description
Apply a leading border.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | — none | Map or Null | null |
Requires
- [mixin]
apply-side-rhythm-border
- [function]
map-extend
- [variable]
border-width-global
- [variable]
border-style-global
- [variable]
border-color-global
Links
Author
Compass
trailing-border
@mixin trailing-border($map: null) { ... }
Description
Apply a trailing border.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | — none | Map or Null | null |
Requires
- [mixin]
apply-side-rhythm-border
- [function]
map-extend
- [variable]
border-width-global
- [variable]
border-style-global
- [variable]
border-color-global
Links
Author
Compass
horizontal-border
@mixin horizontal-border($map: null) { ... }
Description
Apply both leading and trailing borders.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | — none | Map or Null | null |
Requires
- [mixin]
apply-side-rhythm-border
- [mixin]
apply-side-rhythm-border
- [variable]
border-width-global
- [variable]
border-style-global
- [variable]
border-color-global
Links
Author
Compass
rhythm-border
@mixin rhythm-border($map: null) { ... }
Description
Apply borders and whitespace equally to all sides.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | — none | Map or Null | null |
Requires
- [mixin]
apply-side-rhythm-border
- [function]
map-extend
- [variable]
border-width-global
- [variable]
border-style-global
- [variable]
border-color-global
Links
Author
Compass
text-on-baseline
@mixin text-on-baseline($to, $adjust, $map: null) { ... }
Description
Move text downwards
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$to | — none | Number | — none |
$adjust | — none | String | — none |
$map | — none | Map or Null | null |
Requires
- [function]
map-extend
- [function]
ms-key
- [variable]
modularscale
Links
Author
Aziz Da
component-on-baseline
@mixin component-on-baseline($to, $adjust, $map: null) { ... }
Description
Block alignment on baseline
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$to | — none | Number | — none |
$adjust | — none | String | — none |
$map | — none | Map or Null | null |
Requires
- [function]
map-extend
- [function]
ms-key
- [variable]
modularscale
Links
Author
Aziz Da
above
@mixin above($to, $adjust, $lines: 0, $property: "padding", $from: null, $at: 1) { ... }
Description
Add leading whitespace to adjust to baseline
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$to | — none | Number | — none |
$adjust | — none | String | — none |
$lines | — none | Number | 0 |
$property | — none | String | "padding" |
$from | — none | Null or Number | null |
$at | — none | Number or String | 1 |
Requires
- [function]
const
- [function]
ms-get
- [function]
convert-length
- [function]
lines-for
- [function]
shift-for
- [function]
rhythm
- [variable]
fonteque2
- [variable]
fonteque2
- [variable]
fonteque2
Links
Author
Aziz Da
below
@mixin below($to, $adjust, $lines: 0, $property: "margin", $from: null, $at: 1) { ... }
Description
Add trailing whitespace to adjust to baseline
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$to | — none | Number | — none |
$adjust | — none | String | — none |
$lines | — none | Number | 0 |
$property | — none | String | "margin" |
$from | — none | Null or Number | null |
$at | — none | Number or String | 1 |
Requires
- [function]
const
- [function]
ms-get
- [function]
convert-length
- [function]
lines-for
- [function]
shift-for
- [function]
rem-fallback
- [function]
rhythm
- [function]
rhythm
- [function]
lines-for
- [function]
rhythm
- [variable]
fonteque2
- [variable]
fonteque2
- [variable]
unit-global
- [variable]
unit-global
- [variable]
fonteque2
Links
Author
Aziz Da
functions
rhythm
@function rhythm($lines: 1, $minus: 0px, $from: null) { ... }
Description
Calculate rhythm units.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$lines | — none | Number | 1 |
$minus | — none | Number | 0px |
$from | — none | Null or Number | null |
Returns
Number
—Rhythm
Example
rhythm(1) => 8px;
rhythm(4) => 32px;
Requires
- [function]
const
- [function]
const
- [function]
const
- [function]
convert-length
- [variable]
unit-global
Used by
- [mixin]
adjust-leading-to
- [mixin]
apply-side-rhythm-border
- [function]
shift-for
- [mixin]
above
- [mixin]
below
- [mixin]
below
- [mixin]
below
Links
Author
Compass
[private] lines-for
@function lines-for($from) { ... }
Description
Calculate the minimum multiple of rhythm units needed to contain the font-size.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$from | — none | Number | — none |
Returns
Number
—Lines
Example
lines-for(16px) => 4
lines-for(33px) => 6
Requires
Used by
Links
Author
Compass
[private] shift-for
@function shift-for($to, $adjust, $lines: 1, $from: null) { ... }
Description
Calculate shift value.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$to | — none | Number | — none |
$adjust | — none | Number | — none |
$lines | — none | Number | 1 |
$from | — none | Null or Number | null |
Returns
Number
—Shift value
Example
$fonteque2: ("body": ("family": "Open Sans", sans-serif, "size": 100px, "weight": 400, "style": normal, "cap-height": 0.72));
shift-for(16px, 0.72em, 4, null) => 0.64rem;
Requires
- [function]
rem-fallback
- [function]
rem-fallback
- [function]
const
- [function]
convert-length
- [function]
convert-length
- [function]
rhythm
- [variable]
unit-global
- [variable]
unit-global
- [variable]
unit-global
- [variable]
unit-global
Used by
Links
Author
Aziz Da
General
mixins
bompasteque2-add
@mixin bompasteque2-add($map: $bpt2-global) { ... }
Description
Check bompasteque2 variables
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | — none | Map | $bpt2-global |
Requires
- [function]
const
- [function]
convert-length
- [function]
convert-length
- [function]
map-extend
- [function]
map-extend
- [function]
convert-length
- [variable]
unit-global
- [variable]
unit-global
- [variable]
border-width-global
- [variable]
border-width-global
- [variable]
border-width-global
- [variable]
border-style-global
- [variable]
border-style-global
- [variable]
border-color-global
- [variable]
border-color-global
- [variable]
fonteque2
- [variable]
fonteque2
- [variable]
ms-base
- [variable]
ms-base
- [variable]
ms-ratio
- [variable]
ms-ratio
- [variable]
modularscale
- [variable]
modularscale
Author
Aziz Da
variables
[private] CONSTANT
$CONSTANT: ("BROWSER_DEFAULT_FONT_SIZE": 16px, "LINE_UNIT": 8px, "LINE_MULTI": 4) !global;
Description
Constants map
Type
Map
Map structure
Map key Name | Map key Description | Map key Type | Map key Value |
---|---|---|---|
"BROWSER_DEFAULT_FONT_SIZE" | Default font-size for all browsers | Number | 16px |
"LINE_UNIT" | The unit of vertical rhythm | Number | 8px |
"LINE_MULTI" | The multiplication factor used to define the distance between text baselines | Number | 4 |
Used by
- [function]
const
Links
Author
Hugo Giraudel
unit-global
$unit-global: "rem" !default;
Description
The length unit in which to output rhythm values. Supported values: px, rem. Percent units can't be used since they make calculating padding and margins impractical, and percentage borders are not valid or supported in css.
Type
String
Used by
- [function]
rhythm
- [mixin]
apply-side-rhythm-border
- [function]
shift-for
- [function]
shift-for
- [function]
shift-for
- [function]
shift-for
- [mixin]
below
- [mixin]
below
- [mixin]
bompasteque2-add
- [mixin]
bompasteque2-add
Links
Author
Compass
border-width-global
$border-width-global: 1px !default;
Description
Default values for rhythm borders width.
Type
Number
Used by
- [mixin]
leading-border
- [mixin]
trailing-border
- [mixin]
horizontal-border
- [mixin]
rhythm-border
- [mixin]
bompasteque2-add
- [mixin]
bompasteque2-add
- [mixin]
bompasteque2-add
Links
Author
Compass
border-style-global
$border-style-global: solid !default;
Description
Default values for rhythm borders style.
Type
String
Used by
- [mixin]
leading-border
- [mixin]
trailing-border
- [mixin]
horizontal-border
- [mixin]
rhythm-border
- [mixin]
bompasteque2-add
- [mixin]
bompasteque2-add
Links
Author
Compass
border-color-global
$border-color-global: #CCCCCC !default;
Description
Default values for rhythm borders color.
Type
Color
Used by
- [mixin]
leading-border
- [mixin]
trailing-border
- [mixin]
horizontal-border
- [mixin]
rhythm-border
- [mixin]
bompasteque2-add
- [mixin]
bompasteque2-add
Author
Aziz Da
fonteque2
$fonteque2: () !global;
Description
Fonts map
Type
Map
Used by
- [mixin]
above
- [mixin]
above
- [mixin]
above
- [mixin]
below
- [mixin]
below
- [mixin]
below
- [mixin]
bompasteque2-add
- [mixin]
bompasteque2-add
- [mixin]
fonteque2-get
- [mixin]
fonteque2-get
Author
Aziz Da
[private] ms-base
$ms-base: const("BROWSER_DEFAULT_FONT_SIZE");
Description
modularscale-sass base
Type
Number
Used by
- [mixin]
bompasteque2-add
- [mixin]
bompasteque2-add
Links
Author
modularscale-sass
[private] ms-ratio
$ms-ratio: $fourth;
Description
modularscale-sass ratio
Type
Number
Used by
- [mixin]
bompasteque2-add
- [mixin]
bompasteque2-add
Links
Author
modularscale-sass
[private] modularscale
$modularscale: ("base": $ms-base, "ratio": $ms-ratio) !global;
Description
modularscale-sass configuration
Type
Map
Used by
- [mixin]
adjust-font-size-to
- [mixin]
text-on-baseline
- [mixin]
component-on-baseline
- [mixin]
bompasteque2-add
- [mixin]
bompasteque2-add
Links
Author
modularscale-sass
bpt2-global
$bpt2-global: () !default;
Description
Global bompasteque2 configuration Map
Type
Map
Author
Aziz Da
bompasteque2-debug
$bompasteque2-debug: #FF0000 !default;
Description
bompasteque2 debug color
Type
Color
or Null
Author
Aziz Da
unit
mixins
rem
@mixin rem($css) { ... }
Description
Output a given style rule containing rem values along with an (optional) fallback rule for older browsers (with rem values converted to px).
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$css | map of css properties and values. | Map | — none |
Author
Aziz Da
functions
convert-length
@function convert-length($length, $to-unit, $from: null) { ... }
Description
Convert any CSS length
or percentage
value to any another.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$length | A css | Number | — none |
$to-unit | String matching a css unit keyword, e.g. 'em', '%', etc. | String | — none |
$from | When converting from relative units, the absolute length (in px) to which $length refers (e.g. for $lengths in em units, would normally be the font-size of the current element). | Null or Number | null |
Returns
Number
—Converted length
Example
convert-length(19px, "rem") => 1.1875rem;
Requires
- [function]
const
Used by
- [function]
rhythm
- [mixin]
establish-baseline
- [mixin]
apply-side-rhythm-border
- [function]
shift-for
- [function]
shift-for
- [mixin]
above
- [mixin]
below
- [mixin]
bompasteque2-add
- [mixin]
bompasteque2-add
- [mixin]
bompasteque2-add
- [function]
rem-fallback
- [function]
rem-fallback
Links
Author
Compass
[private] rem-fallback
@function rem-fallback($value) { ... }
Description
Get the px/rem versions of a value.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$value | — none | Number | — none |
Returns
Map
—See example below
Example
rem-fallback(19px) => (px: 19px, rem: 1.1875rem);
Requires
- [function]
convert-length
- [function]
convert-length
Used by
- [function]
shift-for
- [function]
shift-for
- [mixin]
below
- [function]
list-rem-fallback
Links
Author
Compass
[private] list-rem-fallback
@function list-rem-fallback($value) { ... }
Description
Get the px/rem versions of a list (or nested lists).
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$value | — none | List or Number | — none |
Returns
Map
—See example below
Example
$list: 19px, 21px;
list-rem-fallback($list) => (px: 19px, 21px, rem: 1.1875rem, 1.3125rem);
Requires
- [function]
rem-fallback
Links
Author
Compass
util
functions
[private] ms-key
@function ms-key($key: 1, $pattern: $modularscale) { ... }
Description
Returns if modularscale config map has key
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$key | — none | Number or String | 1 |
$pattern | — none | Map | $modularscale |
Returns
Null
or String
—modularscale-sass configuration map key
Example
$modularscale: ("base": 12px, "ratio": 1.333, "640px": ("base": 14px, "ratio": 1.414));
ms-key(1) => null;
$modularscale: ("base": 12px, "ratio": 1.333, "640px": ("base": 14px, "ratio": 1.414));
ms-key(2) => "640px";
Used by
- [mixin]
adjust-font-size-to
- [mixin]
text-on-baseline
- [mixin]
component-on-baseline
- [function]
ms-get
Author
Aziz Da
[private] ms-get
@function ms-get($key: 1, $pattern: $modularscale) { ... }
Description
Returns the correct pattern for modularscale
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$key | — none | Number or String | 1 |
$pattern | — none | Map | $modularscale |
Returns
Map
—modularscale-sass configuration map
Example
$modularscale: ("base": 12px, "ratio": 1.333, "640px": ("base": 14px, "ratio": 1.414));
ms-get(2) => ("base": 14px, "ratio": 1.414);
$modularscale: ("base": 12px, "ratio": 1.333, "640px": ("base": 14px, "ratio": 1.414));
ms-get(1) => ("base": 12px, "ratio": 1.333, "640px": ("base": 14px, "ratio": 1.414));
Requires
- [function]
ms-key
Used by
Author
Aziz Da
mixins
fonteque2-get
@mixin fonteque2-get($key: null, $map: null) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$key | — none | Null or String | null |
$map | — none | Map or Null | null |
Requires
Author
Aziz Da
vendor
functions
const
@function const($key) { ... }
Description
Constant getter
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$key | Key of constant to get | String | — none |
Returns
Const
Example
$CONSTANT: ("BROWSER_DEFAULT_FONT_SIZE": 16px);
const("BROWSER_DEFAULT_FONT_SIZE") => 16px;
Throws
Unknown constant
#{$key}
.
Requires
- [variable]
CONSTANT
Used by
- [mixin]
debug-vertical-alignment
- [mixin]
debug-vertical-alignment
- [function]
rhythm
- [function]
rhythm
- [function]
rhythm
- [function]
lines-for
- [function]
lines-for
- [mixin]
establish-baseline
- [mixin]
establish-baseline
- [mixin]
adjust-leading-to
- [mixin]
apply-side-rhythm-border
- [function]
shift-for
- [mixin]
above
- [mixin]
below
- [mixin]
bompasteque2-add
- [function]
convert-length
Links
Author
Hugo Giraudel
[private] map-extend
@function map-extend($map, $maps..., $deep) { ... }
Description
jQuery-style extend function About map-merge()
:
- only takes 2 arguments
- is not recursive
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | First map | Map | — none |
$maps | Other maps | Arglist | — none |
$deep | Recursive mode | Bool | — none |
Returns
Map
Example
$grid-configuration-default: ("columns": 12, "layouts": ("small": 800px, "medium": 1000px, "large": 1200px));
$grid-configuration-custom: ("layouts": ("large": 1300px, "huge": 1500px));
$grid-configuration-user: ("direction": "ltr", "columns": 16, "layouts": ("large": 1300px, "huge": 1500px));
$grid-configuration: map-extend($grid-configuration-default, $grid-configuration-custom, $grid-configuration-user, false);
=> ("columns": 16, "layouts": (("large": 1300px, "huge": 1500px)), "direction": "ltr")
$grid-configuration: map-extend($grid-configuration-default, $grid-configuration-custom, $grid-configuration-user, true);
=> ("columns": 16, "layouts": (("small": 800px, "medium": 1000px, "large": 1300px, "huge": 1500px)), "direction": "ltr");
Used by
- [mixin]
adjust-font-size-to
- [mixin]
leader
- [mixin]
trailer
- [mixin]
rhythm-margin
- [mixin]
rhythm-padding
- [mixin]
leading-border
- [mixin]
trailing-border
- [mixin]
rhythm-border
- [mixin]
text-on-baseline
- [mixin]
component-on-baseline
- [mixin]
bompasteque2-add
- [mixin]
bompasteque2-add
Links
Author
Hugo Giraudel