Fork me on GitHub
#garden
<
2018-03-02
>
andrea.crotti13:03:37

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?

andrea.crotti13:03:02

it's just the initial : the problem realiy

niamu13:03:49

[:target [:&:before {:content "" ...}]]

andrea.crotti13:03:35

mm if I try in the repl

(css [:target [:&:before {:content ""}]])
"target:before {\n  content: ;\n}"

andrea.crotti13:03:48

doesn't look like it's the same thing

andrea.crotti13:03:13

and this gives the same output to be fair

andrea.crotti13:03:17

(css [:target:before {:content ""}])
"target:before {\n  content: ;\n}"

niamu13:03:22

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

andrea.crotti14:03:00

ah ok well didn't even notice the empty string problem

andrea.crotti14:03:16

I was talking about the fact that I need :target:before not target:before

niamu14:03:25

oh. Totally missed that.

andrea.crotti14:03:57

ah but maybe I can do also a:target.. in this case

niamu14:03:42

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.

niamu14:03:03

It looks like you can use garden.selectors/target

niamu14:03:59

Or maybe it’s simpler than that and you can just do [:&:target:before {...}]

levitanong20:03:57

@andrea.crotti Strings work. Try [":target:before" {:content ""}]