@apolitical/component-library 0.0.4-beta.1 → 0.0.4-beta.3
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/index.js +1 -1
- package/index.mjs +7 -5
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/README.md +53 -0
- package/styles/base-styles/_accessibility.scss +31 -0
- package/styles/base-styles/_blockquotes.scss +31 -0
- package/styles/base-styles/_hr.scss +17 -0
- package/styles/base-styles/_index.scss +8 -0
- package/styles/base-styles/_links.scss +18 -0
- package/styles/base-styles/_lists.scss +30 -0
- package/styles/base-styles/_text.scss +83 -0
- package/styles/base-styles/_titles.scss +132 -0
- package/styles/base-styles/buttons/_buttons.scss +236 -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 +6 -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 +5 -0
- package/styles/mixins/_selectors.scss +8 -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
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"),n="_container_a7v7k_1",o={container:n};function t(r){return e.jsx("div",{className:o.container,children:e.jsx("h1",{children:"Component library demo!"})})}exports.Demo=t;
|
package/index.mjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
const r = {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
const o = "_container_a7v7k_1", r = {
|
|
3
|
+
container: o
|
|
4
|
+
};
|
|
5
|
+
function c(e) {
|
|
6
|
+
return /* @__PURE__ */ n("div", { className: r.container, children: /* @__PURE__ */ n("h1", { children: "Component library demo!" }) });
|
|
5
7
|
}
|
|
6
8
|
export {
|
|
7
|
-
|
|
9
|
+
c as Demo
|
|
8
10
|
};
|
package/package.json
CHANGED
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,53 @@
|
|
|
1
|
+
# Styles
|
|
2
|
+
|
|
3
|
+
## `#root`
|
|
4
|
+
|
|
5
|
+
NextJS is very opinionated and won't let us style general elements (e.g. `h1`) - it wants elements to be 'pure', using classes or IDs to identify them (e.g. `.specific-section h1`).
|
|
6
|
+
|
|
7
|
+
To get the benefit of global base styling, where we get styling out of the box without having to explicitly add it to every element, we use the `#root` ID, on the `body`, to scope our global styling.
|
|
8
|
+
|
|
9
|
+
### Adding a selector between `#root` and an element
|
|
10
|
+
|
|
11
|
+
One of the big benefits of using Sass is the `&` selector, which uses the full path to the element as the selector, letting us quickly add different states, like `:hover` and `:focus`, or show different styling inside a specific parent element.
|
|
12
|
+
|
|
13
|
+
This works as expected for states, but - because we scope everything to `#root` - using `&` would result in a selector like `.new-parent #root .element` - which is not going to be a valid path.
|
|
14
|
+
|
|
15
|
+
Instead, we've created a mixin, `selector-after-root`, to write the expected path.
|
|
16
|
+
|
|
17
|
+
`@include selector-after-root('.element')` will translate to the path `#root .element &`.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## `@layer`
|
|
22
|
+
|
|
23
|
+
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.
|
|
24
|
+
|
|
25
|
+
The `global.css` file defines the order of our layers, with the browser reset as the lowest.
|
|
26
|
+
|
|
27
|
+
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.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## `button` styling
|
|
32
|
+
|
|
33
|
+
We handle button styling through classes.
|
|
34
|
+
|
|
35
|
+
### Variations
|
|
36
|
+
|
|
37
|
+
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`.
|
|
38
|
+
|
|
39
|
+
### Sizes
|
|
40
|
+
|
|
41
|
+
By default, buttons are `medium`. They don't need a class to be styled. Buttons can also be `small` or `large`.
|
|
42
|
+
|
|
43
|
+
### Icons
|
|
44
|
+
|
|
45
|
+
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.
|
|
46
|
+
|
|
47
|
+
To add an icon to a button, add the class name `icon [file name of icon without file extension]`, e.g. `icon heart_empty`.
|
|
48
|
+
|
|
49
|
+
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.)
|
|
50
|
+
|
|
51
|
+
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`.
|
|
52
|
+
|
|
53
|
+
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,31 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import './../functions',
|
|
3
|
+
'./../mixins',
|
|
4
|
+
'./../variables';
|
|
5
|
+
|
|
6
|
+
@layer base {
|
|
7
|
+
#root {
|
|
8
|
+
|
|
9
|
+
/* stylelint-disable no-descending-specificity */
|
|
10
|
+
a, button, input, textarea, [role="menu"], li[tabindex] {
|
|
11
|
+
&:focus, &:focus-visible {
|
|
12
|
+
outline: none;
|
|
13
|
+
box-shadow: $outline map.get($theme, 'default_focus');
|
|
14
|
+
}
|
|
15
|
+
&:active { box-shadow: none; }
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
[role="menu"], [role="menu"] a, li[tabindex] {
|
|
19
|
+
&:focus, &:focus-visible { box-shadow: $outline map.get($theme, 'default_focus') inset; }
|
|
20
|
+
}
|
|
21
|
+
/* stylelint-enable no-descending-specificity */
|
|
22
|
+
|
|
23
|
+
.hidden {
|
|
24
|
+
width: 0;
|
|
25
|
+
height: 0;
|
|
26
|
+
display: block;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
#root {
|
|
10
|
+
blockquote {
|
|
11
|
+
margin: px-to-rem(map.get($blockquote, 'margin-top')) 0 px-to-rem(map.get($blockquote, 'margin-bottom')) 0;
|
|
12
|
+
padding: px-to-rem(map.get($blockquote, 'padding-vertical')) 0 0 px-to-rem(map.get($blockquote, 'padding-left'));
|
|
13
|
+
font-size: px-to-rem(map.get($blockquote, 'font-size'));
|
|
14
|
+
color: map.get($theme, 'blockquote');
|
|
15
|
+
font-weight: 700;
|
|
16
|
+
font-style: italic;
|
|
17
|
+
line-height: px-to-rem(map.get($blockquote, 'line-height'));
|
|
18
|
+
border-left: px-to-rem(map.get($blockquote, 'border-width')) solid map.get($theme, 'blockquote_border');
|
|
19
|
+
|
|
20
|
+
p:last-of-type {
|
|
21
|
+
margin-bottom: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@include breakpoint('min-width', 'md') {
|
|
25
|
+
margin-top: px-to-rem(map.get($blockquote, 'margin-top_md'));
|
|
26
|
+
margin-bottom: px-to-rem(map.get($blockquote, 'margin-bottom_md'));
|
|
27
|
+
font-size: px-to-rem(map.get($blockquote, 'font-size_md'));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import './../functions',
|
|
3
|
+
'./../variables';
|
|
4
|
+
|
|
5
|
+
$hr: ('height': 1, 'margin-vertical': 40);
|
|
6
|
+
|
|
7
|
+
@layer base {
|
|
8
|
+
#root {
|
|
9
|
+
hr {
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: px-to-rem(map.get($hr, 'height'));
|
|
12
|
+
background: map.get($theme, 'divider');
|
|
13
|
+
margin: px-to-rem(map.get($hr, 'margin-vertical')) auto;
|
|
14
|
+
border: none;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import './../variables';
|
|
3
|
+
|
|
4
|
+
@layer base {
|
|
5
|
+
#root {
|
|
6
|
+
a {
|
|
7
|
+
color: map.get($theme, 'link');
|
|
8
|
+
text-decoration: underline;
|
|
9
|
+
font-weight: 900;
|
|
10
|
+
|
|
11
|
+
&:hover,
|
|
12
|
+
&:focus,
|
|
13
|
+
&:active {
|
|
14
|
+
color: map.get($theme, 'link_hover');
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import './../functions',
|
|
3
|
+
'./../mixins';
|
|
4
|
+
|
|
5
|
+
$ul: ('margin-bottom': 16, 'padding-left': 40);
|
|
6
|
+
$li: ('margin-bottom': 18, 'margin-bottom_sm': 12, 'margin-bottom_md': 16);
|
|
7
|
+
|
|
8
|
+
@layer base {
|
|
9
|
+
#root {
|
|
10
|
+
ol, ul {
|
|
11
|
+
margin: 0 0 px-to-rem(map.get($ul, 'margin-bottom')) 0;
|
|
12
|
+
padding-left: px-to-rem(map.get($ul, 'padding-left'));
|
|
13
|
+
display: block;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
li {
|
|
17
|
+
margin-bottom: px-to-rem(map.get($li, 'margin-bottom'));
|
|
18
|
+
|
|
19
|
+
@include selector-after-root('.text-small') { margin-bottom: px-to-rem(map.get($li, 'margin-bottom_sm')); }
|
|
20
|
+
|
|
21
|
+
@include selector-after-root('.text-medium') { margin-bottom: px-to-rem(map.get($li, 'margin-bottom_md')); }
|
|
22
|
+
|
|
23
|
+
&:last-child {
|
|
24
|
+
margin-bottom: 0;
|
|
25
|
+
|
|
26
|
+
p:last-child { margin-bottom: 0; }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
#root {
|
|
13
|
+
p, li, small {
|
|
14
|
+
color: map.get($theme, 'text');
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
p, li {
|
|
19
|
+
font-size: px-to-rem(map.get($default, 'font-size'));
|
|
20
|
+
line-height: px-to-rem(map.get($default, 'line-height'));
|
|
21
|
+
|
|
22
|
+
@include selector-after-root('.text-small') {
|
|
23
|
+
font-size: px-to-rem(map.get($small, 'font-size'));
|
|
24
|
+
line-height: px-to-rem(map.get($small, 'line-height'));
|
|
25
|
+
letter-spacing: px-to-rem(map.get($small, 'letter-spacing'));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@include selector-after-root('.text-medium') {
|
|
29
|
+
font-size: px-to-rem(map.get($medium, 'font-size'));
|
|
30
|
+
line-height: px-to-rem(map.get($medium, 'line-height'));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@include breakpoint('min-width', 'md') {
|
|
34
|
+
font-size: px-to-rem(map.get($default, 'font-size_md'));
|
|
35
|
+
line-height: px-to-rem(map.get($default, 'line-height_md'));
|
|
36
|
+
|
|
37
|
+
@include selector-after-root('.text-small') {
|
|
38
|
+
font-size: px-to-rem(map.get($small, 'font-size_md'));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@include selector-after-root('.text-medium') {
|
|
42
|
+
font-size: px-to-rem(map.get($medium, 'font-size_md'));
|
|
43
|
+
line-height: px-to-rem(map.get($medium, 'line-height_md'));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
p {
|
|
49
|
+
margin-bottom: px-to-rem(map.get($default, 'margin-bottom'));
|
|
50
|
+
|
|
51
|
+
@include selector-after-root('.text-small') { margin-bottom: px-to-rem(map.get($small, 'margin-bottom')); }
|
|
52
|
+
|
|
53
|
+
@include selector-after-root('.text-medium') { margin-bottom: px-to-rem(map.get($medium, 'margin-bottom')); }
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
small {
|
|
57
|
+
font-size: px-to-rem(map.get($small, 'font-size'));
|
|
58
|
+
line-height: px-to-rem(map.get($small, 'line-height'));
|
|
59
|
+
|
|
60
|
+
@include breakpoint('min-width', 'md') {
|
|
61
|
+
font-size: px-to-rem(map.get($small, 'font-size_md'));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
strong { font-weight: 900; }
|
|
66
|
+
em, i { font-style: italic; }
|
|
67
|
+
|
|
68
|
+
sup, sub {
|
|
69
|
+
font-size: px-to-rem(map.get($sup, 'font-size'));
|
|
70
|
+
line-height: normal;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
sup {
|
|
74
|
+
vertical-align: super;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
sub {
|
|
78
|
+
vertical-align: sub;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
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
|
+
#root {
|
|
18
|
+
.pre-title, h5, h6 {
|
|
19
|
+
color: map.get($theme, 'title');
|
|
20
|
+
text-transform: uppercase;
|
|
21
|
+
font-weight: 700;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.title, h1, h2, h3, h4 {
|
|
25
|
+
color: map.get($theme, 'title');
|
|
26
|
+
font-weight: 900;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.pre-title {
|
|
30
|
+
margin-bottom: px-to-rem(map.get($pre-title, 'margin-bottom'));
|
|
31
|
+
font-size: px-to-rem(map.get($pre-title, 'font-size'));
|
|
32
|
+
line-height: px-to-rem(map.get($pre-title, 'line-height'));
|
|
33
|
+
letter-spacing: px-to-rem(map.get($pre-title, 'letter-spacing'));
|
|
34
|
+
text-transform: uppercase;
|
|
35
|
+
|
|
36
|
+
@include breakpoint('min-width', 'md') {
|
|
37
|
+
font-size: px-to-rem(map.get($pre-title, 'font-size_md'));
|
|
38
|
+
line-height: px-to-rem(map.get($title, 'line-height_md'));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.title {
|
|
43
|
+
margin-bottom: px-to-rem(map.get($title, 'margin-bottom'));
|
|
44
|
+
font-size: px-to-rem(map.get($title, 'font-size'));
|
|
45
|
+
line-height: px-to-rem(map.get($title, 'line-height'));
|
|
46
|
+
letter-spacing: px-to-rem(map.get($title, 'letter-spacing'));
|
|
47
|
+
|
|
48
|
+
@include breakpoint('min-width', 'md') {
|
|
49
|
+
font-size: px-to-rem(map.get($title, 'font-size_md'));
|
|
50
|
+
line-height: px-to-rem(map.get($title, 'line-height_md'));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
h1 {
|
|
55
|
+
margin-bottom: px-to-rem(map.get($h1, 'margin-bottom'));
|
|
56
|
+
font-size: px-to-rem(map.get($h1, 'font-size'));
|
|
57
|
+
line-height: px-to-rem(map.get($h1, 'line-height'));
|
|
58
|
+
letter-spacing: px-to-rem(map.get($h1, 'letter-spacing'));
|
|
59
|
+
|
|
60
|
+
@include breakpoint('min-width', 'md') {
|
|
61
|
+
font-size: px-to-rem(map.get($h1, 'font-size_md'));
|
|
62
|
+
line-height: px-to-rem(map.get($h1, 'line-height_md'));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
h2 {
|
|
67
|
+
margin: px-to-rem(map.get($h2, 'margin-top')) 0 px-to-rem(map.get($h2, 'margin-bottom')) 0;
|
|
68
|
+
font-size: px-to-rem(map.get($h2, 'font-size'));
|
|
69
|
+
line-height: px-to-rem(map.get($h2, 'line-height'));
|
|
70
|
+
|
|
71
|
+
@include breakpoint('min-width', 'md') {
|
|
72
|
+
font-size: px-to-rem(map.get($h2, 'font-size_md'));
|
|
73
|
+
line-height: px-to-rem(map.get($h2, 'line-height_md'));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
h3 {
|
|
78
|
+
margin: px-to-rem(map.get($h3, 'margin-top')) 0 px-to-rem(map.get($h3, 'margin-bottom')) 0;
|
|
79
|
+
font-size: px-to-rem(map.get($h3, 'font-size'));
|
|
80
|
+
line-height: px-to-rem(map.get($h3, 'line-height'));
|
|
81
|
+
|
|
82
|
+
@include breakpoint('min-width', 'md') {
|
|
83
|
+
font-size: px-to-rem(map.get($h3, 'font-size_md'));
|
|
84
|
+
line-height: px-to-rem(map.get($h3, 'line-height_md'));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
h4 {
|
|
89
|
+
margin: px-to-rem(map.get($h4, 'margin-top')) 0 px-to-rem(map.get($h4, 'margin-bottom')) 0;
|
|
90
|
+
font-size: px-to-rem(map.get($h4, 'font-size'));
|
|
91
|
+
line-height: px-to-rem(map.get($h4, 'line-height'));
|
|
92
|
+
|
|
93
|
+
@include breakpoint('min-width', 'md') {
|
|
94
|
+
font-size: px-to-rem(map.get($h4, 'font-size_md'));
|
|
95
|
+
line-height: px-to-rem(map.get($h4, 'line-height_md'));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
h5 {
|
|
101
|
+
margin: px-to-rem(map.get($h5, 'margin-top')) 0 px-to-rem(map.get($h5, 'margin-bottom')) 0;
|
|
102
|
+
font-size: px-to-rem(map.get($h5, 'font-size'));
|
|
103
|
+
line-height: px-to-rem(map.get($h5, 'line-height'));
|
|
104
|
+
|
|
105
|
+
@include breakpoint('min-width', 'md') {
|
|
106
|
+
font-size: px-to-rem(map.get($h5, 'font-size_md'));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
h6 {
|
|
111
|
+
font-size: px-to-rem(map.get($h6, 'font-size'));
|
|
112
|
+
line-height: px-to-rem(map.get($h6, 'line-height'));
|
|
113
|
+
|
|
114
|
+
@include breakpoint('min-width', 'md') {
|
|
115
|
+
font-size: px-to-rem(map.get($h6, 'font-size_md'));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.subtitle {
|
|
120
|
+
margin-bottom: px-to-rem(map.get($subtitle, 'margin-bottom'));
|
|
121
|
+
font-size: px-to-rem(map.get($subtitle, 'font-size'));
|
|
122
|
+
color: map.get($theme, 'subtitle');
|
|
123
|
+
font-weight: 400;
|
|
124
|
+
line-height: px-to-rem(map.get($subtitle, 'line-height'));
|
|
125
|
+
|
|
126
|
+
@include breakpoint('min-width', 'md') {
|
|
127
|
+
font-size: px-to-rem(map.get($subtitle, 'font-size_md'));
|
|
128
|
+
line-height: px-to-rem(map.get($subtitle, 'line-height_md'));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|