@symbo.ls/scratch 0.7.29 → 0.7.31
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 +1 -1
- package/src/system/reset.js +4 -9
- package/src/system/theme.js +6 -3
- package/src/utils/sequence.js +1 -0
package/package.json
CHANGED
package/src/system/reset.js
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import { CSS_VARS } from '../factory'
|
|
3
|
+
import { CONFIG, CSS_VARS } from '../factory'
|
|
5
4
|
import { getMediaTheme } from '.'
|
|
6
5
|
import { deepMerge, merge, overwriteDeep } from '@domql/utils' // eslint-disable-line no-unused-vars
|
|
7
6
|
|
|
8
7
|
export const applyReset = (reset = {}) => {
|
|
9
8
|
if (CONFIG.RESET) {
|
|
10
|
-
// if (CONFIG.RESET[':root']) {
|
|
11
|
-
// overwriteDeep(CONFIG.TYPOGRAPHY.styles, CONFIG.RESET)
|
|
12
|
-
// console.log(CONFIG.RESET)
|
|
13
|
-
// CONFIG.RESET[':root'] = CSS_VARS
|
|
14
|
-
// }
|
|
15
9
|
if (CONFIG.RESET[':root']) {
|
|
16
10
|
const configReset = CONFIG.RESET
|
|
17
11
|
const configStyles = CONFIG.TYPOGRAPHY.styles
|
|
12
|
+
|
|
18
13
|
configReset[':root'] = CSS_VARS
|
|
19
14
|
configReset.body = {
|
|
20
|
-
...getMediaTheme('document', CONFIG.globalTheme),
|
|
15
|
+
...getMediaTheme('document', `@${CONFIG.globalTheme}`),
|
|
21
16
|
...configStyles.body
|
|
22
17
|
}
|
|
23
18
|
configReset.h1 = configStyles.h1
|
|
@@ -59,7 +54,7 @@ export const applyReset = (reset = {}) => {
|
|
|
59
54
|
|
|
60
55
|
fontSize: CONFIG.TYPOGRAPHY.base / CONFIG.TYPOGRAPHY.browserDefault + CONFIG.UNIT.default,
|
|
61
56
|
|
|
62
|
-
...getMediaTheme('document', CONFIG.globalTheme),
|
|
57
|
+
...getMediaTheme('document', `@${CONFIG.globalTheme}`),
|
|
63
58
|
|
|
64
59
|
...CONFIG.TYPOGRAPHY.styles.body
|
|
65
60
|
},
|
package/src/system/theme.js
CHANGED
|
@@ -225,12 +225,15 @@ export const getMediaTheme = (val, mod) => {
|
|
|
225
225
|
return
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
+
console.group(val)
|
|
229
|
+
|
|
228
230
|
const [name, ...modifier] = isArray(val) ? val : val.split(' ')
|
|
229
231
|
let value = CONFIG.THEME[name]
|
|
230
232
|
if (value && (modifier || mod)) {
|
|
233
|
+
console.log(value)
|
|
231
234
|
value = findModifier(value, modifier.length ? modifier : mod)
|
|
232
235
|
}
|
|
233
|
-
return recursiveTheme(value)
|
|
234
|
-
}
|
|
235
236
|
|
|
236
|
-
|
|
237
|
+
const r = recursiveTheme(value)
|
|
238
|
+
return r
|
|
239
|
+
}
|
package/src/utils/sequence.js
CHANGED
|
@@ -143,6 +143,7 @@ export const getSequenceValue = (value = 'A', sequenceProps) => {
|
|
|
143
143
|
value === 'none' ||
|
|
144
144
|
value === 'auto' ||
|
|
145
145
|
value === 'unset' ||
|
|
146
|
+
value === 'inherit' ||
|
|
146
147
|
value === 'fit-content' ||
|
|
147
148
|
value === 'min-content' ||
|
|
148
149
|
value === 'max-content' ||
|