any suggestions about how to write?
:target:before {
content:"";
display:block;
height:90px; /* fixed header height*/
margin:-90px 0 0; /* negative fixed header height */
}
with Garden?it's just the initial :
the problem realiy
[:target [:&:before {:content "" ...}]]
mm if I try in the repl
(css [:target [:&:before {:content ""}]])
"target:before {\n content: ;\n}"
doesn't look like it's the same thing
and this gives the same output to be fair
(css [:target:before {:content ""}])
"target:before {\n content: ;\n}"
Yeah, I was just going to mention that. The garden compiler optimizes empty strings incorrectly in that case. Here is a workaround that I’ve used: https://github.com/niamu/fume/blob/master/src/fume/style.cljc#L143
ah ok well didn't even notice the empty string problem
I was talking about the fact that I need :target:before
not target:before
oh. Totally missed that.
ah but maybe I can do also a:target
.. in this case
That could work. I know there is a way to do it without having a parent tag attached to it. Just haven’t ever had to do it before.
It looks like you can use garden.selectors/target
Or maybe it’s simpler than that and you can just do [:&:target:before {...}]
@andrea.crotti Strings work. Try [":target:before" {:content ""}]