Update sass reset and componets to use modern css and internal mixins to replace typey.
This commit is contained in:
parent
4b4234df6f
commit
3fdb351a8a
1 changed files with 285 additions and 361 deletions
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
// Variables
|
||||
|
||||
// Set variables for this site before a library sets its !default value.
|
||||
|
||||
// Font faces, stacks and sizes.
|
||||
|
||||
// Font styling and line heights are controlled by the several variables that
|
||||
|
|
@ -12,28 +10,54 @@
|
|||
// homepage](https://github.com/jptaranto/typey).
|
||||
|
||||
// The font size set on the root html element.
|
||||
$base-font-size: 18px;
|
||||
// Specify unitless, it will be recalculated as %.
|
||||
$base-font-size: 18;
|
||||
|
||||
// The base line height determines the basic unit of vertical rhythm.
|
||||
$base-line-height: $base-font-size * 1.5;
|
||||
// Base and heading line height, unitless.
|
||||
$base-line-height: 1.5;
|
||||
$heading-line-height: 1.3;
|
||||
|
||||
// The pt font-size to be used for printing.
|
||||
$print-font-size: 12pt;
|
||||
|
||||
// The font sizes in our type hierarchy as tee shirt sizes.
|
||||
$font-size: (
|
||||
xxl: 36px,
|
||||
xl: 28px,
|
||||
l: 22px,
|
||||
m: $base-font-size,
|
||||
s: 16px,
|
||||
xs: 14px,
|
||||
// Size m is base.
|
||||
$font-size-fixed: (
|
||||
xxxxl: 2.778rem,
|
||||
xxxl: 2.335rem,
|
||||
xxl: 2rem,
|
||||
xl: 1.556rem,
|
||||
l: 1.223rem,
|
||||
m: 1rem,
|
||||
s: 0.889rem,
|
||||
xs: 0.778rem,
|
||||
);
|
||||
|
||||
// Typey allows you to alter font weights site-wide with this map.
|
||||
// The responsive font sizes in our type hierarchy as tee shirt sizes.
|
||||
// Size m is base.
|
||||
$font-size-fluid: (
|
||||
xxxxl: clamp(1.80rem, calc(1.45rem + 1.73vw), 2.80rem),
|
||||
xxxl: clamp(1.60rem, calc(1.35rem + 1.27vw), 2.33rem),
|
||||
xxl: clamp(1.42rem, calc(1.24rem + 0.90vw), 1.94rem),
|
||||
xl: clamp(1.27rem, calc(1.14rem + 0.62vw), 1.62rem),
|
||||
l: clamp(1.13rem, calc(1.05rem + 0.39vw), 1.35rem),
|
||||
m: 1rem,
|
||||
s: 0.889rem,
|
||||
xs: 0.778rem,
|
||||
);
|
||||
|
||||
// Set the font sizes to use, fixed or fluid.
|
||||
$font-size: $font-size-fixed;
|
||||
//$font-size: $font-size-fluid;
|
||||
|
||||
// Font weights.
|
||||
$font-weight: (
|
||||
bold: bold,
|
||||
medium: 500,
|
||||
normal: normal,
|
||||
light: 300,
|
||||
lighter: lighter,
|
||||
bolder: 900,
|
||||
bold: 700,
|
||||
medium: 500,
|
||||
normal: 400,
|
||||
light: 300,
|
||||
lighter: 200,
|
||||
);
|
||||
|
||||
// The following font family declarations use widely available fonts.
|
||||
|
|
@ -53,8 +77,6 @@ $garamond: Garamond, Charter, 'Times New Roman', serif;
|
|||
$verdana: Verdana, Tahoma, 'DejaVu Sans', sans-serif;
|
||||
$tahoma: Tahoma, Verdana, 'DejaVu Sans', sans-serif;
|
||||
$helvetica: Helvetica, Arial, 'Nimbus Sans L', sans-serif;
|
||||
$arial: Arial, Helvetica, 'Nimbus Sans L', sans-serif;
|
||||
$impact: Impact, 'Arial Narrow', Helvetica, sans-serif;
|
||||
$lucida: 'Lucida Grande', 'Lucida Sans Unicode', Lucida, Verdana, sans-serif;
|
||||
$futura: Futura, 'Century Gothic', AppleGothic, sans-serif;
|
||||
|
||||
|
|
@ -64,81 +86,66 @@ $system-ui: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Rob
|
|||
// Monospace font stacks.
|
||||
// For an explanation of why "sans-serif" is at the end of this list, see
|
||||
// http://meyerweb.com/eric/thoughts/2010/02/12/fixed-monospace-sizing/
|
||||
// $menlo: Menlo, 'DejaVu Sans Mono', 'Ubuntu Mono', Courier, 'Courier New', monospace, sans-serif;
|
||||
$menlo: Menlo, 'Ubuntu Mono', 'DejaVu Sans Mono', 'Courier New', Courier, monospace, sans-serif;
|
||||
|
||||
// The font faces you specify in the $typefaces map can be used in the
|
||||
// typeface() mixin.
|
||||
$typefaces: (
|
||||
body: (
|
||||
font-family: $garamond,
|
||||
),
|
||||
headings: (
|
||||
font-family: $futura,
|
||||
),
|
||||
monospace: (
|
||||
font-family: $menlo,
|
||||
),
|
||||
compact: (
|
||||
font-family: $impact,
|
||||
weight: bold,
|
||||
case: uppercase,
|
||||
// We could also specify the following property:
|
||||
// letter-spacing: .5px,
|
||||
),
|
||||
); // stylelint-disable indentation
|
||||
|
||||
// Output a horizontal grid to help with debugging typography.
|
||||
$typey-debug: false;
|
||||
$with-wireframes: false;
|
||||
|
||||
// The length unit in which to output font size and margin values.
|
||||
// Supported values: px, em, rem.
|
||||
$base-unit: 'rem';
|
||||
|
||||
// px fallbacks for rem units are needed for IE 8 and earlier.
|
||||
$rem-fallback: false;
|
||||
|
||||
// We have separate print file.
|
||||
$auto-print-sizing: false;
|
||||
$font-family: (
|
||||
body: $garamond,
|
||||
headings: $futura,
|
||||
alt: $system-ui,
|
||||
monospace: $menlo,
|
||||
);
|
||||
|
||||
// Breakpoints
|
||||
|
||||
// Use the `respond-to()` mixin to use named breakpoints.
|
||||
|
||||
$breakpoints: (
|
||||
'xxxs': 333px,
|
||||
'xxs': 444px,
|
||||
'xs': 555px,
|
||||
's': 666px,
|
||||
'm': 777px,
|
||||
'l': 888px,
|
||||
'xl': 999px,
|
||||
'xxl': 1111px,
|
||||
'xxxl': 1222px
|
||||
) !default;
|
||||
|
||||
// Layout
|
||||
|
||||
// The max content width.
|
||||
$max-content-width: 1000px;
|
||||
|
||||
// The max line width for readability.
|
||||
$max-line-width: 70ch;
|
||||
|
||||
// The default left/right gutter/padding.
|
||||
$zen-gutters: calc(5px + 1.5625vw);
|
||||
$zen-gutters-reverse: calc(0px - (5px + 1.5625vw));
|
||||
'xxxl': 1222px,
|
||||
'xxl': 1111px,
|
||||
'xl': 999px,
|
||||
'l': 888px,
|
||||
'm': 777px,
|
||||
's': 666px,
|
||||
'xs': 555px,
|
||||
'xxs': 444px,
|
||||
'xxxs': 333px,
|
||||
);
|
||||
|
||||
// Border radius.
|
||||
$s-radius: 3px;
|
||||
$m-radius: .3rem;
|
||||
$l-radius: 1rem;
|
||||
$border-radius: (
|
||||
l: 1rem,
|
||||
m: 0.3rem,
|
||||
s: 3px,
|
||||
);
|
||||
|
||||
// Miscellaneous variables
|
||||
// Spacing.
|
||||
$spacing: (
|
||||
xxxl: 5rem,
|
||||
xxl: 3rem,
|
||||
xl: 2rem,
|
||||
l: 1.5rem,
|
||||
m: 1rem,
|
||||
s: 0.75rem,
|
||||
xs: 0.5rem,
|
||||
xxs: 0.4rem,
|
||||
xxxs: 0.3rem,
|
||||
);
|
||||
|
||||
// `$indent-amount` controls the amount lists, blockquotes and comments are indented.
|
||||
$indent-amount: 2 * $base-font-size;
|
||||
// The max content width. (Consider using one of the breakpoints.)
|
||||
$max-content-width: 1111px;
|
||||
|
||||
// `$include-rtl` controls whether RTL styles are output.
|
||||
// The max page width. Defaults to max-content-width.
|
||||
// Setting this to a larger value than max-content-width allows
|
||||
// content with class "stetch" to strech out to the page edge.
|
||||
//$max-page-width: 1111px;
|
||||
|
||||
// The max line width for readability.
|
||||
$max-line-width: 70ch;
|
||||
|
||||
// The left/right gutter/padding.
|
||||
$gutters: calc(5px + 1.5625vw);
|
||||
$gutters-reverse: calc(0px - (5px + 1.5625vw));
|
||||
|
||||
// The amount lists, blockquotes and comments are indented.
|
||||
$indent-amount: 2rem;
|
||||
|
||||
// Control whether RTL styles are added.
|
||||
$include-rtl: false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue