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) =>
|
||||
now
|
||||
? now.split(/, */g)
|
||||
.map(current => current.replace(/\$/g, '.'))
|
||||
.map(current => current[0] == "_"
|
||||
? diversify(prefix+current.slice(1), ...rest)
|
||||
.map(current => current.match(/\$/)
|
||||
? diversify(current.replaceAll(/\$/g, prefix), ...rest)
|
||||
: diversify(prefix+' '+current, ...rest)
|
||||
).join(",")
|
||||
: prefix
|
||||
|
|
|
@ -48,7 +48,7 @@ document.head.append(html.style(css({
|
|||
],
|
||||
cursor: "pointer",
|
||||
},
|
||||
$top: {
|
||||
'.top': {
|
||||
"scroll-to-top": {
|
||||
opacity: 0,
|
||||
transform: `translate(0px, ${CSS.em(radius * 2)})`,
|
||||
|
|
Loading…
Reference in a new issue