This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Gregory J. Orton
Posted Oct 12 - Read on Facebook

Hey folks

Trying to use <input> elements in my framer prototype. But I want to style what happens when it's 'checked'.

Obvs normal css selector would be .checkbox:checked {..}

Anyway i can use CSS selectors inside framer?

3 Comments

Sigurd Tapio Mannsåker

Unfortunately, pseudo classes like :checked are tricky to set via JavaScript (as far as I know). A couple links you might find useful:

https://pankajparashar.com/posts/modify-pseudo-elements-css/
http://stackoverflow.com/questions/311052/setting-css-pseudo-class-rules-from-javascript

Sigurd Tapio Mannsåker

Maybe your best bet is to simply add your own style sheet to index.html in your .framer folder? Alternatively, you could style it with JavaScript manually by detecting when its state changes, if you don't want to deal with separate files.

Gregory J. Orton

Thanks. Thing is, it's even more difficult once stuff is in coffeescript. I feel so much more comfortable in regular JS

Read the entire post on Facebook