Last active
August 29, 2015 14:25
-
-
Save selfsame/f929d1c20abe60f2dcf6 to your computer and use it in GitHub Desktop.
css vars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cljs.user=> (require '[fast.core :refer [-o -styles -rules -add]] ) | |
| nil | |
| cljs.user=> (require 'css.units) | |
| nil | |
| cljs.user=> (-o 80) | |
| <span.tab> | |
| cljs.user=> (-add (-o 80) "width" "3em") | |
| #<width:3em;> | |
| cljs.user=> (-add (-o 80) "height" "5%") | |
| #<height:5%;> | |
| cljs.user=> (str (-o 80)) | |
| "<span class=\"tab\" style=\"width:3em;height:5%;\" >demo/std.html</span>" | |
| cljs.user=> (map (comp css.units/px #(.-value %)) (-rules (-o 80))) | |
| (<48px> <25px>) | |
| cljs.user=> (css.units/div (.-width (-styles (-o 80))) (.-height (-styles (-o 80)))) | |
| 1.92 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment