@symbo.ls/scratch 0.7.9 → 0.7.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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@symbo.ls/scratch",
3
3
  "description": "Φ / CSS framework and methodology.",
4
4
  "author": "symbo.ls",
5
- "version": "0.7.9",
5
+ "version": "0.7.10",
6
6
  "files": [
7
7
  "src"
8
8
  ],
package/src/set.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
 
17
17
  import { isFunction } from './utils'
18
18
 
19
- const ENV = process.env.NODE_ENV
19
+ const ENV = process.env.NODE_ENV // eslint-disable-line no-unused-vars
20
20
 
21
21
  const setCases = (val, key) => {
22
22
  if (isFunction(val)) return val()
@@ -35,11 +35,11 @@ export const applyReset = (reset = {}) => {
35
35
 
36
36
  ...getTheme('document'),
37
37
 
38
- fontSize: CONFIG.TYPOGRAPHY.base / CONFIG.TYPOGRAPHY.browserDefault + CONFIG.UNIT.default,
39
-
40
- ...CONFIG.TYPOGRAPHY.styles
38
+ fontSize: CONFIG.TYPOGRAPHY.base / CONFIG.TYPOGRAPHY.browserDefault + CONFIG.UNIT.default
41
39
  },
42
40
 
41
+ ...CONFIG.TYPOGRAPHY.styles,
42
+
43
43
  // form elements
44
44
  fieldset: {
45
45
  border: 0,
@@ -49,8 +49,13 @@ export const applyHeadings = (props) => {
49
49
  const HEADINGS = findHeadings(props)
50
50
  const { styles } = props
51
51
  for (const k in HEADINGS) {
52
- styles[`h${parseInt(k) + 1}`] = {
53
- fontSize: CONFIG.useVariable ? `var(${HEADINGS[k].variable})` : `${HEADINGS[k].scaling}${unit}`
52
+ const headerName = `h${parseInt(k) + 1}`
53
+ const headerStyle = styles[headerName]
54
+ styles[headerName] = {
55
+ fontSize: CONFIG.useVariable ? `var(${HEADINGS[k].variable})` : `${HEADINGS[k].scaling}${unit}`,
56
+ margin: headerStyle?.margin || 0,
57
+ lineHeight: headerStyle?.lineHeight || props.lineHeight,
58
+ fontWeight: headerStyle?.fontWeight || 900 - (k * 100)
54
59
  }
55
60
  }
56
61
  }