Fork me on GitHub

oh my god basic CSS question: How do you select the child of an element generically? Like if I say .my-class::nth-child(1) that targets the first my-class element that is a child. how do I select the first child of the my-class element???

Daniel Hines13:09:56

@josh_tackett That's my bread and butter. I've written some Clojure for working with it (though the library is rather incomplete) . Are you On-Premise or Online?

Daniel Hines13:09:02

@idiomancy, I think it's as easy as .my-class:first-child.


>:first-child p:first-child Selects every <p> element that is the first child of its parent


nah, that's just a shortcut of nth-child(1)


Hmm, .my-class > :first-child?


does that work? is that a thing?


The > works, it means "direct descendant of"


yeah, but how would I select the "first" one?


in my use case, I guess I can rely on there only ever being one, so I could do > *, but its imprecise


I think what I gave you should select the first child element that is a direct descendant of .my-class (if I'm getting the pseudo-class syntax right)


huh, yeah you might be right, let me check it out


totally works!!


woot, awesome! Thanks for letting me know.


(your example only worked because color is an inherited property lol)

Daniel Hines13:09:51

Ah, woops! Good catch.

Digital Baboon15:09:01

Day 4 with Clojure/Script: have learned how to separate logic with namespaces so everything isn't a big ugly mess in core.cljs, learned how to do routing with html5 pushState, learned how to do events. I'm pretty proud of today.

👍 20
🚀 8

clojure itself is "The mess that rich writes and dont need to live in my code" If you think that cljs.core is a mess, dont look at clojure.RT

Digital Baboon15:09:23

Oh by core I meant namespace.core in CLJS. Did not know previously I can separate logic into different namespaces (files) so had a huge pile in one file.

👍 4
Digital Baboon15:09:52

First day was like "holy shit what did I get myself into by getting this job" 😄


@UCTNL1JNN also fell into the bait Clojure is a really high quality bait

Digital Baboon10:09:03

@U2J4FRT2T I am liking it very much thus far

Digital Baboon15:09:21

They bait and switched me. Job ad was for JS. Job itself is for Clojure.

👍 8

Usually the bait and switch goes the other way

☝️ 8

@im hope you enjoy yourself, welcome to the cult community 😉

😆 4
Digital Baboon15:09:37

Oh I definitely do! Clojure is fun. First few days were dizzying as I'm merely a mediocre full-stack developer (php, js) as far as my background goes, but I'm increasingly so getting the hang of it. I have to thank @U06B8J0AJ who invited me to this slack as well, it has been helpful.

🎉 4

has anyone tried lux by any chance?