diff --git a/css/font-sizes.css b/css/font-sizes.css index ccb48b3..0ec46a8 100644 --- a/css/font-sizes.css +++ b/css/font-sizes.css @@ -1,101 +1,3 @@ /** * Font Sizes */ -:root { - --bb-size-0: 0; - --bb-size-1: 1px; - --bb-size-2: 2px; - --bb-size-4: 4px; - --bb-size-6: 6px; - --bb-size-8: 8px; - --bb-size-12: 12px; - --bb-size-16: 16px; - --bb-size-24: 24px; - --bb-size-32: 32px; - --bb-size-48: 48px; - --bb-size-64: 64px; - --bb-size-96: 96px; - --bb-size-128: 128px; -} - -.fs0 { - font-size: var(--bb-size-0); -} - -.fs1 { - font-size: var(--bb-size-1); -} - -.fs2 { - font-size: var(--bb-size-2); -} - -.fs4 { - font-size: var(--bb-size-4); -} - -.fs6 { - font-size: var(--bb-size-6); -} - -.fs8 { - font-size: var(--bb-size-8); -} - -.fs12 { - font-size: var(--bb-size-12); -} - -.fs16 { - font-size: var(--bb-size-16); -} - -.fs24 { - font-size: var(--bb-size-24); -} - -.fs32 { - font-size: var(--bb-size-32); -} - -.fs48 { - font-size: var(--bb-size-48); -} - -.fs64 { - font-size: var(--bb-size-64); -} - -.fs96 { - font-size: var(--bb-size-96); -} - -.fs128 { - font-size: var(--bb-size-128); -} - -/* Breakpoint md */ -@media only screen and (max-width: 1024px) { - :root { - --bb-size-32: 30px; - --bb-size-48: 40px; - --bb-size-64: 50px; - --bb-size-96: 60px; - --bb-size-128: 70px; - } -} -/* Breakpoint xs */ -@media only screen and (max-width: 480px) { - :root { - --bb-size-128: 60px; - } -} -:root { - --bb-size-h1: 60px; - --bb-size-h2: 50px; - --bb-size-h3: 40px; - --bb-size-h4: 30px; - --bb-size-h5: 20px; - --bb-size-h6: var(--bb-size-16); - --bb-size-body: var(--bb-size-16); -} diff --git a/scss/_build.scss b/scss/_build.scss index 2bdf8bf..63b99e4 100644 --- a/scss/_build.scss +++ b/scss/_build.scss @@ -30,4 +30,5 @@ @import "cursors"; @import "aspect-ratio"; @import "extra"; -@import "container"; \ No newline at end of file +@import "container"; +@import "font-sizes"; \ No newline at end of file diff --git a/scss/_config.scss b/scss/_config.scss index 36e9b67..ddbbf40 100644 --- a/scss/_config.scss +++ b/scss/_config.scss @@ -70,6 +70,29 @@ $breakpoints: ( // "gap-container":40px, // Add unit to not use the responsive value //); +// font sizes +//$font_sizes: ( +// "values": 13 14 15 16 18 20 28 30 32 35 40 50 70 100, +// "md": 13 14 15 16 18 20 24 26 28 32 35 40 50 71, +// "sm": 13 14 15 16 18 20 22 24 26 30 32 36 40 58, +// "xs": 13 14 15 16 16 18 20 24 24 26 30 33 34 48 +//); + + +// font size custom name +// The value must be defined by font_sizes above +//$font_size_custom: ( +// "h1": 40, +// "h2": 35, +// "h3": 35, +// "h4": 18, +// "h5": 16, +// "h6": 15, +// 'body': 16, +// "large": 100, +//); + + // containers //$containers: ( // "container-small": 768, @@ -83,21 +106,3 @@ $breakpoints: ( // "isWoocommerce": false // true if project using woocommerce //); -// font sizes -$font_sizes: ( - "values":0 1 2 4 6 8 12 16 24 32 48 64 96 128, - "md": 0 1 2 4 6 8 12 16 24 30 40 50 60 70, - "xs": 0 1 2 4 6 8 12 16 24 30 40 50 60 60, -); - -// font size custom name -// The value must be defined by font_sizes above -$font_size_custom: ( - "h1": 60, - "h2": 50, - "h3": 40, - "h4": 30, - "h5": 20, - "h6": 16, - 'body': 16 -); diff --git a/scss/_defs.scss b/scss/_defs.scss index f89ec3f..77ef593 100644 --- a/scss/_defs.scss +++ b/scss/_defs.scss @@ -67,6 +67,12 @@ $coordinate_values: ( // aspect ratio $aspect_ratio: (); +// font sizes +$font_sizes: (); + +// font size custom name +$font_size_custom: (); + // containers $containers: (); //$containers: ( diff --git a/scss/font-sizes.scss b/scss/font-sizes.scss index d1fbfeb..c594205 100644 --- a/scss/font-sizes.scss +++ b/scss/font-sizes.scss @@ -22,7 +22,7 @@ // and changed compare with the previous value @if $value != $previous_postfix { - @include get-variable(bb-size-#{replace-prop($postfix)}, #{format-value($value)}); + @include get-variable(size-#{replace-prop($postfix)}, #{format-value($value)}); } } } @@ -36,7 +36,7 @@ $postfix: get-previous-breakpoint-value($i, $value, $breakpoint, $font_sizes); //@debug $value, $postfix; - @include get-variable(bb-size-#{replace-prop($postfix)}, #{format-value($value)}); + @include get-variable(size-#{replace-prop($postfix)}, #{format-value($value)}); } } @@ -46,7 +46,7 @@ $postfix: get-previous-breakpoint-value($i, $value, $breakpoint, $font_sizes); //@debug $value, $postfix; - $var: var(#{get-variable(bb-size-#{replace-prop($postfix)})}); + $var: var(#{get-variable(size-#{replace-prop($postfix)})}); .fs#{replace-prop($postfix)} { font-size: #{$var}; @@ -67,9 +67,9 @@ $isValid: map-search($list, $value); // if the value is not existing in the $font_sizes, create 'px' for the value @if (not $isValid) { - @include get-variable(bb-size-#{replace-prop($name)}, format-value($value)); + @include get-variable(size-#{replace-prop($name)}, format-value($value)); } @else { - @include get-variable(bb-size-#{replace-prop($name)}, var(#{get-variable(bb-size-#{replace-prop($value)})})); + @include get-variable(size-#{replace-prop($name)}, var(#{get-variable(size-#{replace-prop($value)})})); } } }