Dom3 compatible electric-css
Dom3 compatible electric-css - Experimental — Use it at your own risk. - Partial at-rules support (only @keyframes ATM)
(grid-template rows)(grid-template rows columns)Convenient way to build a string compatible with CSS grid-template rule. Takes a collection of rows definition [dimention1 … dimentionN] or [[[area1 … areaN] dimention] …] And an optional collection of columns dimentions [dimention1 … dimentionN].
E.g. (grid-template [[[:logo :title :user-info] :auto] [[:menu :content :content ] :auto] [[:footer :footer :footer ] "1fr"]] ["20rem" :auto]) := ""logo title user-info" auto "menu content content" auto "footer footer footer" 1fr / 20rem auto"
Convenient way to build a string compatible with CSS grid-template rule.
Takes a collection of rows definition [dimention1 … dimentionN] or [[[area1 … areaN] dimention] …]
And an optional collection of columns dimentions [dimention1 … dimentionN].
E.g. (grid-template [[[:logo :title :user-info] :auto]
[[:menu :content :content ] :auto]
[[:footer :footer :footer ] "1fr"]]
["20rem" :auto])
:= ""logo title user-info" auto "menu content content" auto "footer footer footer" 1fr / 20rem auto"
(keyframe stop declarations)Take a stop string (e.g. "from", "to", "0%", "50%", etc...) and a map of css declarations to apply at the given stop.
Will add the animation stop to the current keyframes. Can only be used in a keyframes block.
Note that adding or removing a keyframe at runtime resets running animations, but changing a keyframe's content doesn't.
Take a `stop` string (e.g. "from", "to", "0%", "50%", etc...) and a map of css declarations to apply at the given `stop`. Will add the animation stop to the current `keyframes`. Can only be used in a `keyframes` block. Note that adding or removing a `keyframe` at runtime resets running animations, but changing a keyframe's content doesn't.
(keyframes animation-name & keyframes)Create an @keyframes <animation-name> rule group. Note @keyframes are always
global, even if defined in a scoped style. Can only contain keyframe rules.
Create an @keyframes <animation-name> rule group. Note @keyframes are always global, even if defined in a scoped style. Can only contain `keyframe` rules.
(rule-index styled-element target-rule)Find the rule index in the node sheet's CSSRuleList
Find the rule index in the node sheet's CSSRuleList
(Style styled property value)Set a style property name to value on a styled object (e.g. DOM node, CSS Stylesheet, CSS Rule etc.).
Set a style `property` name to `value` on a `styled` object (e.g. DOM node, CSS Stylesheet, CSS Rule etc.).
(style & body)Usage: (dom/div (dom/props {:class "my-div"}) (css/style (css/rule ".my-div" {:color :red}) (css/rule ".my-div:hover" {:color :blue})))
Usage:
(dom/div
(dom/props {:class "my-div"})
(css/style
(css/rule ".my-div" {:color :red})
(css/rule ".my-div:hover" {:color :blue})))
Define an object containing CSS rules
Define an object containing CSS rules
(add-rule this rule)(add-rule this rule index)(css-rules this)(delete-rule this rule)(find-rule this rule)(sheet this)Interface over a CSS rule
Interface over a CSS rule
(set-property this key value)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |