Change $ in CSS to prefix placeholder
This commit is contained in:
parent
52ec210fc6
commit
ec0edc9864
2 changed files with 3 additions and 4 deletions
5
css.js
5
css.js
|
@ -1,9 +1,8 @@
|
||||||
const diversify = (prefix, now, ...rest) =>
|
const diversify = (prefix, now, ...rest) =>
|
||||||
now
|
now
|
||||||
? now.split(/, */g)
|
? now.split(/, */g)
|
||||||
.map(current => current.replace(/\$/g, '.'))
|
.map(current => current.match(/\$/)
|
||||||
.map(current => current[0] == "_"
|
? diversify(current.replaceAll(/\$/g, prefix), ...rest)
|
||||||
? diversify(prefix+current.slice(1), ...rest)
|
|
||||||
: diversify(prefix+' '+current, ...rest)
|
: diversify(prefix+' '+current, ...rest)
|
||||||
).join(",")
|
).join(",")
|
||||||
: prefix
|
: prefix
|
||||||
|
|
|
@ -48,7 +48,7 @@ document.head.append(html.style(css({
|
||||||
],
|
],
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
},
|
},
|
||||||
$top: {
|
'.top': {
|
||||||
"scroll-to-top": {
|
"scroll-to-top": {
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
transform: `translate(0px, ${CSS.em(radius * 2)})`,
|
transform: `translate(0px, ${CSS.em(radius * 2)})`,
|
||||||
|
|
Loading…
Reference in a new issue