Component Spacing
Components can be spaced with either margin or padding applied to the top and/or bottom.
@include ltc-spacing($property: "margin-top", $size: "micro");
@include ltc-spacing($property: "margin-bottom", $size: "micro");
@include ltc-spacing($property: "padding-top", $size: "micro");
@include ltc-spacing($property: "padding-bottom", $size: "micro");
Copy@include ltc-spacing($property: "margin-top", $size: "xs");
@include ltc-spacing($property: "margin-bottom", $size: "xs");
@include ltc-spacing($property: "padding-top", $size: "xs");
@include ltc-spacing($property: "padding-bottom", $size: "xs");
Copy@include ltc-spacing($property: "margin-top", $size: "s");
@include ltc-spacing($property: "margin-bottom", $size: "s");
@include ltc-spacing($property: "padding-top", $size: "s");
@include ltc-spacing($property: "padding-bottom", $size: "s");
Copy@include ltc-spacing($property: "margin-top", $size: "m");
@include ltc-spacing($property: "margin-bottom", $size: "m");
@include ltc-spacing($property: "padding-top", $size: "m");
@include ltc-spacing($property: "padding-bottom", $size: "m");
Copy@include ltc-spacing($property: "margin-top", $size: "l");
@include ltc-spacing($property: "margin-bottom", $size: "l");
@include ltc-spacing($property: "padding-top", $size: "l");
@include ltc-spacing($property: "padding-bottom", $size: "l");
Copy@include ltc-spacing($property: "margin-top", $size: "xl");
@include ltc-spacing($property: "margin-bottom", $size: "xl");
@include ltc-spacing($property: "padding-top", $size: "xl");
@include ltc-spacing($property: "padding-bottom", $size: "xl");
CopySpacing beyond the x-large size can use the custom ltc-unit mixin. The below code will add a 200 pixel (25 x 8) top margin:
@include ltc-unit("margin-top", 25);
CopyTypography Spacing
Spacing can be applied to type by adding a class or using a sass mixin. Note that the micro or x-small spacing may not be applied visually due to existing padding and line-height.
jsx<h4 className={`type-sp-micro`}>micro</h4>
Copy scss@include typography-styles("h4", .5);
Copy jsx<h4 className={`type-sp-xs`}>x-small</h4>
Copy scss@include typography-styles("h4", 1);
Copy jsx<h4 className={`type-sp-s`}>small</h4>
Copy scss@include typography-styles("h4", 2);
Copy jsx<h4 className={`type-sp-m`}>medium</h4>
Copy scss@include typography-styles("h4", 3);
Copy jsx<h4 className={`type-sp-l`}>large</h4>
Copy scss@include typography-styles("h4", 4);
Copy jsx<h4 className={`type-sp-xl`}>x-large</h4>
Copy scss@include typography-styles("h4", 5);
Copy Border & Separator Spacing
Spacing can be applied above or below lines and borders.
micro (top)
@include ltc-border-padding(
$border-top-pixels: 1,
$border-bottom-pixels: 0,
$padding-top: 1,
$border-top-color: $black
);
Copymicro (bottom)
@include ltc-border-padding(
$border-top-pixels: 0,
$border-bottom-pixels: 1,
$padding-top: 1,
$border-top-color: $black
);
Copyx-small (top)
@include ltc-border-padding(
$border-top-pixels: 1,
$border-bottom-pixels: 0,
$padding-top: 2,
$border-top-color: $black
);
Copyx-small (bottom)
@include ltc-border-padding(
$border-top-pixels: 0,
$border-bottom-pixels: 1,
$padding-top: 2,
$border-top-color: $black
);
Copysmall (top)
@include ltc-border-padding(
$border-top-pixels: 1,
$border-bottom-pixels: 0,
$padding-top: 4,
$border-top-color: $black
);
Copysmall (bottom)
@include ltc-border-padding(
$border-top-pixels: 0,
$border-bottom-pixels: 1,
$padding-top: 4,
$border-top-color: $black
);
Copymedium (top)
@include ltc-border-padding(
$border-top-pixels: 1,
$border-bottom-pixels: 0,
$padding-top: 6,
$border-top-color: $black
);
Copymedium (bottom)
@include ltc-border-padding(
$border-top-pixels: 0,
$border-bottom-pixels: 1,
$padding-top: 6,
$border-top-color: $black
);
Copylarge (top)
@include ltc-border-padding(
$border-top-pixels: 1,
$border-bottom-pixels: 0,
$padding-top: 8,
$border-top-color: $black
);
Copylarge (bottom)
@include ltc-border-padding(
$border-top-pixels: 0,
$border-bottom-pixels: 1,
$padding-top: 8,
$border-top-color: $black
);
Copyx-large (top)
@include ltc-border-padding(
$border-top-pixels: 1,
$border-bottom-pixels: 0,
$padding-top: 10,
$border-top-color: $black
);
Copyx-large (bottom)
@include ltc-border-padding(
$border-top-pixels: 0,
$border-bottom-pixels: 1,
$padding-top: 10,
$border-top-color: $black
);
Copy