Last active
October 9, 2015 03:13
-
-
Save wildermuthn/178dee2896a833e7c362 to your computer and use it in GitHub Desktop.
ClojureScript CSS Experiment — Replacing SASS/LESS
This file contains 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
;;; Common Styles | |
(def modal-header-common | |
(css | |
:flex* [:center :center :row] | |
:overflow "hidden" | |
:font* [vars/bold vars/bold-size vars/white])) | |
;;; Elements | |
(defdiv modal-header-wrapper | |
:size* [nil nil 500 70] | |
:background-color vars/blue | |
:flex* [:center :center] | |
:overflow "hidden") | |
(defdiv modal-header | |
:include* [modal-header-common] | |
:background-color vars/blue | |
:size* [460 30]) | |
(defdiv modal-header-empty | |
:include* [modal-header-common] | |
:padding* 3 | |
:background-color vars/blue) | |
;;; Renderer | |
(defn render-reagent-element [title] | |
[let [header-div (if title | |
[modal-header title] | |
[modal-empty-header])]] | |
[modal-header-wrapper | |
[modal-header-div]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment