color
variables
colors
$colors: (
'deep': #000,
'deep2': #1d1d1d,
'pale': #fff,
'pale2': #fafafa,
'grey': #5e5c5d,
'grey2': #b4b4b4
) !default;
Description
colors map. to manage colors as map, you can convert it to css-vars easily.
Used by
- [function]
color
functions
color
@function color($name) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$name | choice key from $colors map. | $colors key | — none |
Returns
$colors val
—return $colors val.
Requires
- [variable]
colors
font
variables
font-family
$font-family: (
main: 'sans-serif',
en: "'Josefin Sans', -apple-system, blinkmacsystemfont, sans-serif"
) !default;
Description
font-family map. to manage font-family as map, you can convert it to css-vars easily.
default-sp-font
$default-sp-font: 13px !default;
Description
default sp fontsize. I recommend you to set this to html.
default-pc-font
$default-pc-font: 16px !default;
Description
default pc fontsize. I recommend you to set this to html.
Used by
- [mixin]
liquid-px
default-line
$default-line: 1.6 !default;
Description
default line-height. I recommend you to set this to html or body.
functions
liquid
@function liquid($minFont: $default-sp-font, $maxFont: $default-pc-font, $minDevice: width(min), $maxDevice: width(max)) { ... }
Description
liquid fontsize. this size will change between minFont and maxFont.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$minFont | min fontsize at minDevice. | Any | $default-sp-font |
$maxFont | max fontsize at maxDevice. | Any | $default-pc-font |
$minDevice | — none | $content-width key | width(min) |
$maxDevice | — none | $content-width key | width(max) |
Returns
Calc(#{$minfont} + #{$difffontsize} * ((100vw - #{$mindevice}) / (#{$maxdevicenum} - #{$mindevicenum})))
Requires
- [function]
width
mixins
limitLines
@mixin limitLines($font-size: $default-sp-font, $line-height: $default-line, $lines: 2, $max: false) { ... }
Description
limitLines.
this mixin is useful for Card component especially in CMS.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$font-size | — none | Any | $default-sp-font |
$line-height | — none | Uint or Float | $default-line |
$lines | — none | Uint | 2 |
$max | set true, It will be flexible height. | Boolean | false |
liquid-px
@mixin liquid-px($px) { ... }
Description
if you set $liquid to html, you can adapt flexible font-size to use em-unit.
But, em-unit is often complicated to communicate with designer. So this convert px-unit to em-unit.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$px | — none | Px | — none |
Requires
- [mixin]
break
- [variable]
default-pc-font
layout
variables
sp-side
$sp-side: 12px !default;
Description
mobile-device's side padding.
mixins
spPadding
@mixin spPadding($side: $sp-side, $break: md) { ... }
Description
add padding to both-side in mobile
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$side | both-side padding | Any | $sp-side |
$break | breakpoint | $content-width key | md |
Requires
- [mixin]
break
content
@mixin content($break: md, $max: width(pc)) { ... }
Description
set max-width on the breakpoint and centered
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$break | breakpoint | $content-width key | md |
$max | content max-width on the breakpoint | $content-width key | width(pc) |
Requires
- [mixin]
break
grid
@mixin grid($fr: (48fr), $min-side: $sp-side) { ... }
Description
make grid layout-system.
this base on 50 fr.
both side 1fr area-names are blank.
this has [main, side?, aside?, left?, right?] area-names.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$fr | you can set between 1 to 3 columns. | Int[] | (48fr) |
$min-side | side padding | Any | $sp-side |
Throws
over 50fr
over 48 fr
you cannot set columns below 1 or over 3
ratio
variables
ratios
$ratios: (
square: (
1 / 1
),
normal: (
1 / 4 * 3
),
silver: (
1 / 1.414
),
film: (
1 / 3 * 2
),
golden: (
1 / 1.6
),
logo: (
1 / 1.66
),
wide: (
1 / 16 * 9
),
cinema: (
1 / 47 * 20
),
banner: (
1 / 3
),
bronze: (
1 / 3.303
)
) !default;
Description
height ratios map. to manage ratios as map, you can convert it to css-vars easily. DO NOT DELETE normal key !! (this is default value of @aspect mixin).
Used by
- [function]
ratio
functions
ratio
@function ratio($name) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$name | — none | $ratios key | — none |
Returns
Float
—$ratios val (height ratio).
Requires
- [variable]
ratios
Used by
- [mixin]
aspect
mixins
aspect
@mixin aspect($name: normal, $fit: cover, $selector: 'img', $pseudo: 'after') { ... }
Description
set the ratio * width as height (padding-top).
this is for iframe, img video and so on.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$name | — none | $ratios key | normal |
$fit | — none | 'cover' or 'contain' | cover |
$selector | child selector | Selector | 'img' |
$pseudo | this has the 'ratio height' (padding-top) | 'before' or 'after' | 'after' |
Requires
- [function]
ratio
shape
mixins
ellipse
@mixin ellipse($width, $height) { ... }
Description
this will make ellipse.
it's useful to make buttons.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$width | — none | Any | — none |
$height | — none | Any | — none |
circle
@mixin circle($diameter) { ... }
Description
this will make circle
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$diameter | — none | Any | — none |
utils
this file can be used in anywhere offcourse in util/
variables
content-width
$content-width: (
min: 320px,
max: 1440px,
landscape: 896px,
pc: 1200px
) !default;
Description
content-width map. this is related to break-point or content-width.
Used by
- [function]
width
breaks
$breaks: (
min: 'screen and (max-width:#{width(min)})',
max: 'screen and (min-width: #{width(max)})',
sm: 'screen and (max-width:#{width(landscape)})',
md: 'screen and (min-width:#{(width(landscape) + 1)})',
lg: 'screen and (min-width:#{width(pc)})'
) !default;
Description
break-point map.
mobile-first is on by default.
Requires
- [function]
width
Used by
- [mixin]
break
functions
width
@function width($size) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$size | choice key from $content-width map. | $content-width key | — none |
Returns
$content-width val
—return $content-width val.
Requires
- [variable]
content-width
Used by
mixins
break
@mixin break($name) { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$name | choice key from $breaks map. | $breaks key | — none |
Requires
- [variable]
breaks
Used by
before
@mixin before() { ... }
Description
short-hand of use pseudo
Parameters
None.
after
@mixin after() { ... }
Description
short-hand of use pseudo
Parameters
None.
z-index
variables
z-index
$z-index: (
front: 9999,
drawer: 1000,
hamburger: 900,
selectbox: 800,
header: 800,
footer: 700,
follow: 600,
middle: 500,
hover: 400,
masktext: 300,
mask: 200,
tag: 100,
top: 1,
base: 0,
back: -1
) !default;
Description
z-index map
manage z-index
Used by
- [function]
z
functions
z
@function z($name: 'base') { ... }
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$name | choice key from $z-index map. | $z-index key | 'base' |
Returns
$z-index val
—return $z-index val.
Requires
- [variable]
z-index