garden

2018-03-02T13:54:37.000642Z

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?

2018-03-02T13:55:02.000186Z

it's just the initial : the problem realiy

niamu 2018-03-02T13:56:49.000142Z

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

2018-03-02T13:58:35.000113Z

mm if I try in the repl

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

2018-03-02T13:58:48.000248Z

doesn't look like it's the same thing

2018-03-02T13:59:13.000638Z

and this gives the same output to be fair

2018-03-02T13:59:17.000420Z

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

niamu 2018-03-02T13:59:22.000222Z

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

2018-03-02T14:00:00.000589Z

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

2018-03-02T14:00:16.000575Z

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

niamu 2018-03-02T14:00:25.000340Z

oh. Totally missed that.

2018-03-02T14:01:57.000084Z

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

niamu 2018-03-02T14:03:42.000149Z

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.

niamu 2018-03-02T14:09:03.000275Z

It looks like you can use garden.selectors/target

niamu 2018-03-02T14:14:59.000661Z

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

levitanong 2018-03-02T20:27:57.000172Z

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