@apolitical/component-library 0.0.4-beta.1 → 0.0.4-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fonts/Moderat-Black-Italic.woff2 +0 -0
- package/fonts/Moderat-Black.woff2 +0 -0
- package/fonts/Moderat-Bold-Italic.woff2 +0 -0
- package/fonts/Moderat-Bold.woff2 +0 -0
- package/fonts/Moderat-Medium-Italic.woff2 +0 -0
- package/fonts/Moderat-Medium.woff2 +0 -0
- package/index.js +1 -1
- package/index.mjs +29 -5
- package/package.json +3 -2
- package/style.css +1 -1
- package/styles/README.md +35 -0
- package/styles/base-styles/_accessibility.scss +26 -0
- package/styles/base-styles/_blockquotes.scss +29 -0
- package/styles/base-styles/_fonts.scss +42 -0
- package/styles/base-styles/_hr.scss +15 -0
- package/styles/base-styles/_index.scss +10 -0
- package/styles/base-styles/_links.scss +16 -0
- package/styles/base-styles/_lists.scss +27 -0
- package/styles/base-styles/_text.scss +80 -0
- package/styles/base-styles/_titles.scss +130 -0
- package/styles/base-styles/buttons/_buttons.scss +234 -0
- package/styles/base-styles/buttons/_icons.scss +24 -0
- package/styles/base-styles/buttons/_index.scss +1 -0
- package/styles/base-styles/buttons/_mixins.scss +30 -0
- package/styles/functions/_index.scss +1 -0
- package/styles/functions/_size-conversions.scss +8 -0
- package/styles/index.scss +9 -0
- package/styles/mixins/_animations.scss +7 -0
- package/styles/mixins/_backgrounds.scss +41 -0
- package/styles/mixins/_breakpoints.scss +18 -0
- package/styles/mixins/_index.scss +4 -0
- package/styles/mixins/_transitions.scss +32 -0
- package/styles/reset/_index.scss +1 -0
- package/styles/reset/_reset.scss +62 -0
- package/styles/variables/_index.scss +3 -0
- package/styles/variables/assets/_assets.scss +4 -0
- package/styles/variables/assets/_index.scss +1 -0
- package/styles/variables/colors/_colors.scss +64 -0
- package/styles/variables/colors/_index.scss +1 -0
- package/styles/variables/colors/_theme.scss +62 -0
- package/styles/variables/sizes/_common.scss +3 -0
- package/styles/variables/sizes/_index.scss +1 -0
- package/index.css +0 -1060
- package/index.css.map +0 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n={};function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t="_container_a7v7k_1",n={container:t};function r(i){return e.jsxs("div",{className:n.container,children:[e.jsx("small",{className:"pre-title",children:"Component library"}),e.jsx("h1",{children:"Component library demo!"}),e.jsx("h2",{children:"A demo of the component library"}),e.jsxs("p",{children:["Text with ",e.jsx("a",{href:"https://google.com",children:"link"})]}),e.jsx("button",{className:"primary large icon arrow_left left",children:"Button"}),e.jsx("button",{className:"secondary icon pencil right animate",children:"Button"}),e.jsx("button",{className:"tertiary small icon heart_empty hover_heart right",children:"Button"}),e.jsx("hr",{}),e.jsxs("ul",{children:[e.jsx("li",{children:"Item 1"}),e.jsx("li",{children:"Item 2"})]}),e.jsx("p",{children:"More text."}),e.jsxs("ol",{children:[e.jsx("li",{children:"Item 1"}),e.jsx("li",{children:"Item 2"})]}),e.jsx("blockquote",{children:"A quote."})]})}exports.Demo=r;
|
package/index.mjs
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
const r = {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
const r = "_container_a7v7k_1", n = {
|
|
3
|
+
container: r
|
|
4
|
+
};
|
|
5
|
+
function o(l) {
|
|
6
|
+
return /* @__PURE__ */ t("div", { className: n.container, children: [
|
|
7
|
+
/* @__PURE__ */ e("small", { className: "pre-title", children: "Component library" }),
|
|
8
|
+
/* @__PURE__ */ e("h1", { children: "Component library demo!" }),
|
|
9
|
+
/* @__PURE__ */ e("h2", { children: "A demo of the component library" }),
|
|
10
|
+
/* @__PURE__ */ t("p", { children: [
|
|
11
|
+
"Text with ",
|
|
12
|
+
/* @__PURE__ */ e("a", { href: "https://google.com", children: "link" })
|
|
13
|
+
] }),
|
|
14
|
+
/* @__PURE__ */ e("button", { className: "primary large icon arrow_left left", children: "Button" }),
|
|
15
|
+
/* @__PURE__ */ e("button", { className: "secondary icon pencil right animate", children: "Button" }),
|
|
16
|
+
/* @__PURE__ */ e("button", { className: "tertiary small icon heart_empty hover_heart right", children: "Button" }),
|
|
17
|
+
/* @__PURE__ */ e("hr", {}),
|
|
18
|
+
/* @__PURE__ */ t("ul", { children: [
|
|
19
|
+
/* @__PURE__ */ e("li", { children: "Item 1" }),
|
|
20
|
+
/* @__PURE__ */ e("li", { children: "Item 2" })
|
|
21
|
+
] }),
|
|
22
|
+
/* @__PURE__ */ e("p", { children: "More text." }),
|
|
23
|
+
/* @__PURE__ */ t("ol", { children: [
|
|
24
|
+
/* @__PURE__ */ e("li", { children: "Item 1" }),
|
|
25
|
+
/* @__PURE__ */ e("li", { children: "Item 2" })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ e("blockquote", { children: "A quote." })
|
|
28
|
+
] });
|
|
5
29
|
}
|
|
6
30
|
export {
|
|
7
|
-
|
|
31
|
+
o as Demo
|
|
8
32
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apolitical/component-library",
|
|
3
|
-
"version": "0.0.4-beta.
|
|
3
|
+
"version": "0.0.4-beta.10",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"import": "./index.mjs",
|
|
9
9
|
"require": "./index.js"
|
|
10
|
-
}
|
|
10
|
+
},
|
|
11
|
+
"./style.css": "./style.css"
|
|
11
12
|
}
|
|
12
13
|
}
|
package/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
h1{color:#4f43ba}
|
|
1
|
+
._container_a7v7k_1 h1{color:#4f43ba}
|
package/styles/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Styles
|
|
2
|
+
|
|
3
|
+
## `@layer`
|
|
4
|
+
|
|
5
|
+
We're using [CSS cascade layers (`@layer`)](https://www.smashingmagazine.com/2022/01/introduction-css-cascade-layers/) to organise our styles, to help us avoid specificity issues and to make it easier to find and update styles.
|
|
6
|
+
|
|
7
|
+
The `public/styles/index.scss` file defines the order of our layers, with the browser reset as the lowest.
|
|
8
|
+
|
|
9
|
+
If you need to overwrite CSS, you don't need to create an overly specific (and less performant) rule or add an `!important` (as an aside: please, please [never add an `!important`](https://dev.to/alvaromontoro/using-important-in-css-75c)) - just put the styling in a higher layer.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## `button` styling
|
|
14
|
+
|
|
15
|
+
We handle button styling through classes.
|
|
16
|
+
|
|
17
|
+
### Variations
|
|
18
|
+
|
|
19
|
+
By default, buttons have `primary` styling (a purple background and white text) and don't need a `primary` class to be styled. Buttons can also be `secondary` (a ghost button with a purple border) or `tertiary` (no border or background color). There are additional variations for `destructive` (only available on primary buttons), `muted` (only available on secondary and tertiary buttons), and `disabled`.
|
|
20
|
+
|
|
21
|
+
### Sizes
|
|
22
|
+
|
|
23
|
+
By default, buttons are `medium`. They don't need a class to be styled. Buttons can also be `small` or `large`.
|
|
24
|
+
|
|
25
|
+
### Icons
|
|
26
|
+
|
|
27
|
+
Buttons can have an icon but - because we can't mix pre-processing and data passed into CSS for file names, like CSS variables or data attributes - icons on buttons need to be set up in advance with classes. The list of available icons is maintained in `base-styles/buttons/_icons.scss`. To add a new icon, add a new item to the list with arguments for the sizes on large, medium, and small buttons.
|
|
28
|
+
|
|
29
|
+
To add an icon to a button, add the class name `icon [file name of icon without file extension]`, e.g. `icon heart_empty`.
|
|
30
|
+
|
|
31
|
+
The icon file, with a matching name, should be uploaded to the `apolitical-assets` bucket on Google Cloud Platform. (Referred to as `$assets-bucket` in the styling.)
|
|
32
|
+
|
|
33
|
+
You can also pass `left` or `right` to position the icon - this will add margin between the text and the icon. e.g. `icon heart_empty right`.
|
|
34
|
+
|
|
35
|
+
You can change the icon on hover by adding a second file name, prepended with `hover_`, e.g. `icon heart_empty hover_heart` will change the heart icon from an outline to a filled in heart on hover.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import './../functions',
|
|
3
|
+
'./../mixins',
|
|
4
|
+
'./../variables';
|
|
5
|
+
|
|
6
|
+
@layer base {
|
|
7
|
+
a, button, input, textarea, [role="menu"], li[tabindex] {
|
|
8
|
+
&:focus, &:focus-visible {
|
|
9
|
+
outline: none;
|
|
10
|
+
box-shadow: $outline map.get($theme, 'default_focus');
|
|
11
|
+
}
|
|
12
|
+
&:active { box-shadow: none; }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[role="menu"], [role="menu"] a, li[tabindex] {
|
|
16
|
+
&:focus, &:focus-visible { box-shadow: $outline map.get($theme, 'default_focus') inset; }
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.hidden {
|
|
20
|
+
width: 0;
|
|
21
|
+
height: 0;
|
|
22
|
+
display: block;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import './../functions',
|
|
3
|
+
'./../mixins',
|
|
4
|
+
'./../variables';
|
|
5
|
+
|
|
6
|
+
$blockquote: ('margin-top': 20, 'margin-top_md': 30, 'margin-bottom': 10, 'margin-bottom_md': 20, 'padding-vertical': 4, 'padding-left': 24, 'font-size': 18, 'font-size_md': 20, 'line-height': 28, 'border-width': 6);
|
|
7
|
+
|
|
8
|
+
@layer base {
|
|
9
|
+
blockquote {
|
|
10
|
+
margin: px-to-rem(map.get($blockquote, 'margin-top')) 0 px-to-rem(map.get($blockquote, 'margin-bottom')) 0;
|
|
11
|
+
padding: px-to-rem(map.get($blockquote, 'padding-vertical')) 0 0 px-to-rem(map.get($blockquote, 'padding-left'));
|
|
12
|
+
font-size: px-to-rem(map.get($blockquote, 'font-size'));
|
|
13
|
+
color: map.get($theme, 'blockquote');
|
|
14
|
+
font-weight: 700;
|
|
15
|
+
font-style: italic;
|
|
16
|
+
line-height: px-to-rem(map.get($blockquote, 'line-height'));
|
|
17
|
+
border-left: px-to-rem(map.get($blockquote, 'border-width')) solid map.get($theme, 'blockquote_border');
|
|
18
|
+
|
|
19
|
+
p:last-of-type {
|
|
20
|
+
margin-bottom: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@include breakpoint('min-width', 'md') {
|
|
24
|
+
margin-top: px-to-rem(map.get($blockquote, 'margin-top_md'));
|
|
25
|
+
margin-bottom: px-to-rem(map.get($blockquote, 'margin-bottom_md'));
|
|
26
|
+
font-size: px-to-rem(map.get($blockquote, 'font-size_md'));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
$font-path: 'fonts/';
|
|
2
|
+
$font-name: 'Moderat';
|
|
3
|
+
|
|
4
|
+
@mixin font-styling($weight: 400, $style: normal) {
|
|
5
|
+
$font-file: 'Medium';
|
|
6
|
+
|
|
7
|
+
@if $weight == 600 {
|
|
8
|
+
$font-file: 'Bold';
|
|
9
|
+
} @else if $weight == 900 {
|
|
10
|
+
$font-file: 'Black';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@if $style == italic {
|
|
14
|
+
$font-file: '#{$font-file}-Italic';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@font-face {
|
|
18
|
+
font-family: #{$font-name};
|
|
19
|
+
src: url('#{$font-path}/#{$font-name}-#{$font-file}.woff2') format('woff2'),
|
|
20
|
+
url('#{$font-path}/#{$font-name}-#{$font-file}.woff') format('woff');
|
|
21
|
+
font-display: optional;
|
|
22
|
+
font-weight: $weight;
|
|
23
|
+
|
|
24
|
+
@if $style == italic {
|
|
25
|
+
font-style: italic;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
$font-family: (400, normal), (400, italic), (600, normal), (600, italic), (900, normal), (900, italic);
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@layer base {
|
|
34
|
+
@each $weight, $style in $font-family {
|
|
35
|
+
@include font-styling($weight, $style);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
body {
|
|
39
|
+
font-family: #{$font-name}, sans-serif;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import './../functions',
|
|
3
|
+
'./../variables';
|
|
4
|
+
|
|
5
|
+
$hr: ('height': 1, 'margin-vertical': 40);
|
|
6
|
+
|
|
7
|
+
@layer base {
|
|
8
|
+
hr {
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: px-to-rem(map.get($hr, 'height'));
|
|
11
|
+
background: map.get($theme, 'divider');
|
|
12
|
+
margin: px-to-rem(map.get($hr, 'margin-vertical')) auto;
|
|
13
|
+
border: none;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import './../functions';
|
|
3
|
+
|
|
4
|
+
$ul: ('margin-bottom': 16, 'padding-left': 40);
|
|
5
|
+
$li: ('margin-bottom': 18, 'margin-bottom_sm': 12, 'margin-bottom_md': 16);
|
|
6
|
+
|
|
7
|
+
@layer base {
|
|
8
|
+
ol, ul {
|
|
9
|
+
margin: 0 0 px-to-rem(map.get($ul, 'margin-bottom')) 0;
|
|
10
|
+
padding-left: px-to-rem(map.get($ul, 'padding-left'));
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
li {
|
|
15
|
+
margin-bottom: px-to-rem(map.get($li, 'margin-bottom'));
|
|
16
|
+
|
|
17
|
+
.text-small & { margin-bottom: px-to-rem(map.get($li, 'margin-bottom_sm')); }
|
|
18
|
+
|
|
19
|
+
.text-medium & { margin-bottom: px-to-rem(map.get($li, 'margin-bottom_md')); }
|
|
20
|
+
|
|
21
|
+
&:last-child {
|
|
22
|
+
margin-bottom: 0;
|
|
23
|
+
|
|
24
|
+
p:last-child { margin-bottom: 0; }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import './../functions',
|
|
3
|
+
'./../mixins',
|
|
4
|
+
'./../variables';
|
|
5
|
+
|
|
6
|
+
$default: ('font-size': 16, 'font-size_md': 18, 'line-height': 24, 'line-height_md': 28, 'margin-bottom': 20); // The default size is the 'large paragraph' in Figma
|
|
7
|
+
$small: ('font-size': 12, 'font-size_md': 14, 'letter-spacing': 0.16, 'line-height': 16, 'margin-bottom': 16);
|
|
8
|
+
$medium: ('font-size': 14, 'font-size_md': 16, 'line-height': 16, 'line-height_md': 20, 'margin-bottom': 18);
|
|
9
|
+
$sup: ('font-size': 10);
|
|
10
|
+
|
|
11
|
+
@layer base {
|
|
12
|
+
p, li, small {
|
|
13
|
+
color: map.get($theme, 'text');
|
|
14
|
+
font-weight: 500;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
p, li {
|
|
18
|
+
font-size: px-to-rem(map.get($default, 'font-size'));
|
|
19
|
+
line-height: px-to-rem(map.get($default, 'line-height'));
|
|
20
|
+
|
|
21
|
+
.text-small & {
|
|
22
|
+
font-size: px-to-rem(map.get($small, 'font-size'));
|
|
23
|
+
line-height: px-to-rem(map.get($small, 'line-height'));
|
|
24
|
+
letter-spacing: px-to-rem(map.get($small, 'letter-spacing'));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.text-medium & {
|
|
28
|
+
font-size: px-to-rem(map.get($medium, 'font-size'));
|
|
29
|
+
line-height: px-to-rem(map.get($medium, 'line-height'));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@include breakpoint('min-width', 'md') {
|
|
33
|
+
font-size: px-to-rem(map.get($default, 'font-size_md'));
|
|
34
|
+
line-height: px-to-rem(map.get($default, 'line-height_md'));
|
|
35
|
+
|
|
36
|
+
.text-small & {
|
|
37
|
+
font-size: px-to-rem(map.get($small, 'font-size_md'));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.text-medium & {
|
|
41
|
+
font-size: px-to-rem(map.get($medium, 'font-size_md'));
|
|
42
|
+
line-height: px-to-rem(map.get($medium, 'line-height_md'));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
p {
|
|
48
|
+
margin-bottom: px-to-rem(map.get($default, 'margin-bottom'));
|
|
49
|
+
|
|
50
|
+
.text-small & { margin-bottom: px-to-rem(map.get($small, 'margin-bottom')); }
|
|
51
|
+
|
|
52
|
+
.text-medium & { margin-bottom: px-to-rem(map.get($medium, 'margin-bottom')); }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
small {
|
|
56
|
+
font-size: px-to-rem(map.get($small, 'font-size'));
|
|
57
|
+
line-height: px-to-rem(map.get($small, 'line-height'));
|
|
58
|
+
|
|
59
|
+
@include breakpoint('min-width', 'md') {
|
|
60
|
+
font-size: px-to-rem(map.get($small, 'font-size_md'));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
strong { font-weight: 900; }
|
|
65
|
+
em, i { font-style: italic; }
|
|
66
|
+
|
|
67
|
+
sup, sub {
|
|
68
|
+
font-size: px-to-rem(map.get($sup, 'font-size'));
|
|
69
|
+
line-height: normal;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
sup {
|
|
73
|
+
vertical-align: super;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
sub {
|
|
77
|
+
vertical-align: sub;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import './../functions',
|
|
3
|
+
'./../mixins',
|
|
4
|
+
'./../variables';
|
|
5
|
+
|
|
6
|
+
$pre-title: ('font-size': 14, 'font-size_md': 16, 'letter-spacing': 1.28, 'line-height': 16, 'line-height_md': 20, 'margin-bottom': 24);
|
|
7
|
+
$title: ('font-size': 32, 'font-size_md': 52, 'letter-spacing': -0.16, 'line-height': 40, 'line-height_md': 64, 'margin-bottom': 16, 'margin-bottom_md': 32);
|
|
8
|
+
$h1: ('font-size': 28, 'font-size_md': 40, 'line-height': 32, 'line-height_md': 48, 'letter-spacing': -0.16, 'margin-bottom': 16);
|
|
9
|
+
$h2: ('font-size': 24, 'font-size_md': 28, 'line-height': 32, 'line-height_md': 40, 'margin-top': 40, 'margin-bottom': 16);
|
|
10
|
+
$h3: ('font-size': 20, 'font-size_md': 24, 'line-height': 28, 'line-height_md': 32, 'margin-top': 60, 'margin-bottom': 20);
|
|
11
|
+
$h4: ('font-size': 18, 'font-size_md': 20, 'line-height': 24, 'line-height_md': 28, 'margin-top': 40, 'margin-bottom': 20);
|
|
12
|
+
$h5: ('font-size': 12, 'font-size_md': 14, 'line-height': 16, 'margin-top': 16, 'margin-bottom': 16);
|
|
13
|
+
$h6: ('font-size': 12, 'font-size_md': 11, 'line-height': 16);
|
|
14
|
+
$subtitle: ('font-size': 20, 'font-size_md': 24, 'line-height': 28, 'line-height_md': 32, 'margin-bottom': 20);
|
|
15
|
+
|
|
16
|
+
@layer base {
|
|
17
|
+
.pre-title, h5, h6 {
|
|
18
|
+
color: map.get($theme, 'title');
|
|
19
|
+
text-transform: uppercase;
|
|
20
|
+
font-weight: 700;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.title, h1, h2, h3, h4 {
|
|
24
|
+
color: map.get($theme, 'title');
|
|
25
|
+
font-weight: 900;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.pre-title {
|
|
29
|
+
margin-bottom: px-to-rem(map.get($pre-title, 'margin-bottom'));
|
|
30
|
+
font-size: px-to-rem(map.get($pre-title, 'font-size'));
|
|
31
|
+
line-height: px-to-rem(map.get($pre-title, 'line-height'));
|
|
32
|
+
letter-spacing: px-to-rem(map.get($pre-title, 'letter-spacing'));
|
|
33
|
+
text-transform: uppercase;
|
|
34
|
+
|
|
35
|
+
@include breakpoint('min-width', 'md') {
|
|
36
|
+
font-size: px-to-rem(map.get($pre-title, 'font-size_md'));
|
|
37
|
+
line-height: px-to-rem(map.get($title, 'line-height_md'));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.title {
|
|
42
|
+
margin-bottom: px-to-rem(map.get($title, 'margin-bottom'));
|
|
43
|
+
font-size: px-to-rem(map.get($title, 'font-size'));
|
|
44
|
+
line-height: px-to-rem(map.get($title, 'line-height'));
|
|
45
|
+
letter-spacing: px-to-rem(map.get($title, 'letter-spacing'));
|
|
46
|
+
|
|
47
|
+
@include breakpoint('min-width', 'md') {
|
|
48
|
+
font-size: px-to-rem(map.get($title, 'font-size_md'));
|
|
49
|
+
line-height: px-to-rem(map.get($title, 'line-height_md'));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
h1 {
|
|
54
|
+
margin-bottom: px-to-rem(map.get($h1, 'margin-bottom'));
|
|
55
|
+
font-size: px-to-rem(map.get($h1, 'font-size'));
|
|
56
|
+
line-height: px-to-rem(map.get($h1, 'line-height'));
|
|
57
|
+
letter-spacing: px-to-rem(map.get($h1, 'letter-spacing'));
|
|
58
|
+
|
|
59
|
+
@include breakpoint('min-width', 'md') {
|
|
60
|
+
font-size: px-to-rem(map.get($h1, 'font-size_md'));
|
|
61
|
+
line-height: px-to-rem(map.get($h1, 'line-height_md'));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
h2 {
|
|
66
|
+
margin: px-to-rem(map.get($h2, 'margin-top')) 0 px-to-rem(map.get($h2, 'margin-bottom')) 0;
|
|
67
|
+
font-size: px-to-rem(map.get($h2, 'font-size'));
|
|
68
|
+
line-height: px-to-rem(map.get($h2, 'line-height'));
|
|
69
|
+
|
|
70
|
+
@include breakpoint('min-width', 'md') {
|
|
71
|
+
font-size: px-to-rem(map.get($h2, 'font-size_md'));
|
|
72
|
+
line-height: px-to-rem(map.get($h2, 'line-height_md'));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
h3 {
|
|
77
|
+
margin: px-to-rem(map.get($h3, 'margin-top')) 0 px-to-rem(map.get($h3, 'margin-bottom')) 0;
|
|
78
|
+
font-size: px-to-rem(map.get($h3, 'font-size'));
|
|
79
|
+
line-height: px-to-rem(map.get($h3, 'line-height'));
|
|
80
|
+
|
|
81
|
+
@include breakpoint('min-width', 'md') {
|
|
82
|
+
font-size: px-to-rem(map.get($h3, 'font-size_md'));
|
|
83
|
+
line-height: px-to-rem(map.get($h3, 'line-height_md'));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
h4 {
|
|
88
|
+
margin: px-to-rem(map.get($h4, 'margin-top')) 0 px-to-rem(map.get($h4, 'margin-bottom')) 0;
|
|
89
|
+
font-size: px-to-rem(map.get($h4, 'font-size'));
|
|
90
|
+
line-height: px-to-rem(map.get($h4, 'line-height'));
|
|
91
|
+
|
|
92
|
+
@include breakpoint('min-width', 'md') {
|
|
93
|
+
font-size: px-to-rem(map.get($h4, 'font-size_md'));
|
|
94
|
+
line-height: px-to-rem(map.get($h4, 'line-height_md'));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
h5 {
|
|
100
|
+
margin: px-to-rem(map.get($h5, 'margin-top')) 0 px-to-rem(map.get($h5, 'margin-bottom')) 0;
|
|
101
|
+
font-size: px-to-rem(map.get($h5, 'font-size'));
|
|
102
|
+
line-height: px-to-rem(map.get($h5, 'line-height'));
|
|
103
|
+
|
|
104
|
+
@include breakpoint('min-width', 'md') {
|
|
105
|
+
font-size: px-to-rem(map.get($h5, 'font-size_md'));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
h6 {
|
|
110
|
+
font-size: px-to-rem(map.get($h6, 'font-size'));
|
|
111
|
+
line-height: px-to-rem(map.get($h6, 'line-height'));
|
|
112
|
+
|
|
113
|
+
@include breakpoint('min-width', 'md') {
|
|
114
|
+
font-size: px-to-rem(map.get($h6, 'font-size_md'));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.subtitle {
|
|
119
|
+
margin-bottom: px-to-rem(map.get($subtitle, 'margin-bottom'));
|
|
120
|
+
font-size: px-to-rem(map.get($subtitle, 'font-size'));
|
|
121
|
+
color: map.get($theme, 'subtitle');
|
|
122
|
+
font-weight: 400;
|
|
123
|
+
line-height: px-to-rem(map.get($subtitle, 'line-height'));
|
|
124
|
+
|
|
125
|
+
@include breakpoint('min-width', 'md') {
|
|
126
|
+
font-size: px-to-rem(map.get($subtitle, 'font-size_md'));
|
|
127
|
+
line-height: px-to-rem(map.get($subtitle, 'line-height_md'));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|