Liking cljdoc? Tell your friends :D

tornado.core

The core tornado namespace, where every single function or value you could need is defined and documented in this namespace.

The core tornado namespace, where every single function or value you could
need is defined and documented in this namespace.
raw docstring

activeclj/s

CSS pseudoselector "active". Used as a value, e.g.: [:.some-sel {:width (px 100)} [active {:width (px 120)}]]

CSS pseudoselector "active". Used as a value, e.g.:
[:.some-sel {:width (px 100)}
 [active {:width (px 120)}]]
sourceraw docstring

adjacent-siblingclj/s

(adjacent-sibling & selectors)

Coming soon

Coming soon
sourceraw docstring

afterclj/s

Coming soon

Coming soon
sourceraw docstring

at-font-faceclj/s

(at-font-face & props-maps)

Can be used for more convenient describing of @font-face. This is how example props-maps look like:

{:src [[(url "../webfonts/woff2/roboto.woff2") (css-format :woff2)] [(url "../webfonts/woff/roboto.woff") (css-format :woff)]] :font-family "Roboto" :font-weight :normal :font-style :italic}

This function can receive any number of props maps so that you can also write the example above this way:

{:src [[(url "../webfonts/woff2/roboto.woff2") (css-format :woff2)]]} {:src [[(url "../webfonts/woff/roboto.woff") (css-format :woff)]] :font-family "Roboto" :font-weight :normal :font-style :italic}

Can be used for more convenient describing of @font-face. This is how example
props-maps look like:

{:src         [[(url "../webfonts/woff2/roboto.woff2") (css-format :woff2)]
               [(url "../webfonts/woff/roboto.woff") (css-format :woff)]]
 :font-family "Roboto"
 :font-weight :normal
 :font-style  :italic}

 This function can receive any number of props maps so that you can also write
 the example above this way:

 {:src         [[(url "../webfonts/woff2/roboto.woff2") (css-format :woff2)]]}
 {:src         [[(url "../webfonts/woff/roboto.woff") (css-format :woff)]]
               :font-family "Roboto"
               :font-weight :normal
               :font-style  :italic}
sourceraw docstring

at-mediaclj/s

(at-media rules & changes)

Takes a rules map and any number of media changes and creates a CSSAtRule instance with "media" identifier:

(at-media {:screen :only :max-width (u/px 600) :min-width (u/px 800} [:& {:margin [[(u/px 15 0 (u/px 15) (u/px 20]] [:.abc #:def {:margin (u/px 20) :padding [[(u/px 30) (u/px 15)]] [:span {:background-color (colors/mix :red :green)]] [:footer {:font-size (u/em 1)])

The :& selector selects the current element. As you can see, you can nest the affected CSS hiccup how you only want. Special rules values: :screen :only => only screen :screen true => screen :screen false => not screen

{:screen true :speech false :max-width (u/px 600) :min-width (u/px 800} => @media screen and not speech and (min-width: 600px) and (max-width: 800px) {...

Takes a rules map and any number of media changes and creates a CSSAtRule instance
with "media" identifier:

(at-media {:screen    :only
         :max-width (u/px 600)
         :min-width (u/px 800}
         [:& {:margin [[(u/px 15 0 (u/px 15) (u/px 20]]
         [:.abc #:def {:margin  (u/px 20)
                       :padding [[(u/px 30) (u/px 15)]]
           [:span {:background-color (colors/mix :red :green)]]
         [:footer {:font-size (u/em 1)])

The :& selector selects the current element.
As you can see, you can nest the affected CSS hiccup how you only want.
Special rules values: :screen :only => only screen
                 :screen true  => screen
                 :screen false => not screen

{:screen    true
 :speech    false
 :max-width (u/px 600)
 :min-width (u/px 800}
 => @media screen and not speech and (min-width: 600px) and (max-width: 800px) {...
sourceraw docstring

attrclj/s

(attr & args)

Coming soon

Coming soon
sourceraw docstring

beforeclj/s

Coming soon

Coming soon
sourceraw docstring

blurclj/s

(blur arg)

Coming soon

Coming soon
sourceraw docstring

brightnessclj/s

(brightness arg)

Coming soon

Coming soon
sourceraw docstring

calcclj/s

(calc & args)

Coming soon

Coming soon
sourceraw docstring

checkedclj/s

CSS pseudoselector "checked". Used as a value, e.g.: [:.some-sel {:border [[(px 1) :solid :red]]} [checked {:border [[(px 1) :solid :crimson]]}]]

CSS pseudoselector "checked". Used as a value, e.g.:
[:.some-sel {:border [[(px 1) :solid :red]]}
 [checked {:border [[(px 1) :solid :crimson]]}]]
sourceraw docstring

child-selectorclj/s

(child-selector & selectors)

Coming soon

Coming soon
sourceraw docstring

circleclj/s

(circle & args)

Coming soon

Coming soon
sourceraw docstring

cmclj/s

(cm value)

An absolute length unit, "centimeter".

An absolute length unit, "centimeter".
sourceraw docstring

comma-joinclj/s

(comma-join {:keys [compiles-to args]})

Coming soon

Coming soon
sourceraw docstring

compile-expressionclj/s

(compile-expression expr)

Compiles an expression: a number, string, symbol or a record. If the expression is a vector of sequential structures, compiles each of the structures and str/joins them with a space. Then, str/joins all these str/spacejoined structures with a comma.

E.g.: (compile-expression [[(u/px 15) (u/percent 20)] [:red :chocolate]]) => "15px 20%, #FF0000 #D2691E"

Compiles an expression: a number, string, symbol or a record. If the expression is
a vector of sequential structures, compiles each of the structures and str/joins them
with a space. Then, str/joins all these str/spacejoined structures with a comma.

E.g.:
(compile-expression [[(u/px 15) (u/percent 20)] [:red :chocolate]])
=> "15px 20%, #FF0000 #D2691E"
sourceraw docstring

compile-paramsclj/s

(compile-params attributes-map)

Given a map of HTML style attributes described in Tornado, compiles all the values of the parameters, but the parameters names remain the same. This function is useful for Reagent to allow you describing the style with Tornado. Example usage:

{:style (compile-params {:width (px 500) :background-color (important (rgb 100 150 200)) :border [[(px 1) :solid :black]] :display :flex})}

=> {:style {:width "500px", :background-color "rgb(100, 150, 200) !important", :border "1px solid #000000", :display "flex"}

Given a map of HTML style attributes described in Tornado, compiles all the values
of the parameters, but the parameters names remain the same. This function is useful
for Reagent to allow you describing the style with Tornado.
Example usage:

{:style (compile-params {:width            (px 500)
                         :background-color (important (rgb 100 150 200))
                         :border           [[(px 1) :solid :black]]
                         :display          :flex})}

=> {:style {:width            "500px",
            :background-color "rgb(100, 150, 200) !important",
            :border           "1px solid #000000",
            :display          "flex"}
sourceraw docstring

contains-subsclj/s

(contains-subs attribute subvalue)
(contains-subs tag attribute subvalue)

Selects all descendant elements which have a given parameter with a value containing a given substring (unlike the contains-word selector, the substring does not have to be a whole word).

Selects all descendant elements which have a given parameter with a value containing
a given substring (unlike the contains-word selector, the substring does not have to
be a whole word).
sourceraw docstring

contains-wordclj/s

(contains-word attribute subvalue)
(contains-word tag attribute subvalue)

Selects all descendant elements which have a given parameter with a value containing a given word (substring is not enough - a matching word separated by commas or spaces).

Selects all descendant elements which have a given parameter with a value containing
a given word (substring is not enough - a matching word separated by commas or spaces).
sourceraw docstring

contrastclj/s

(contrast arg)

Coming soon

Coming soon
sourceraw docstring

counterclj/s

(counter & args)

Coming soon

Coming soon
sourceraw docstring

countersclj/s

(counters & args)

Coming soon

Coming soon
sourceraw docstring

cssclj/s

(css css-hiccup)
(css flags css-hiccup)

Generates CSS from a hiccup vector or a (maybe multiple times) nested list of hiccup vectors (and/or with @keyframes, @font-face). If pretty-print? is set to false, compresses it as well. Then saves the compiled CSS string to a given file path.

You can also call this function without flags whenever you want to to just get the whole compiled CSS string printed out.

Generates CSS from a hiccup vector or a (maybe multiple times) nested list of hiccup
vectors (and/or with @keyframes, @font-face). If pretty-print? is set to false,
compresses it as well. Then saves the compiled CSS string to a given file path.

You can also call this function without flags whenever you want to to just get
the whole compiled CSS string printed out.
sourceraw docstring

css-emptyclj/s

CSS pseudoselector "css-empty". Used as a value, e.g.: [:.some-sel {:padding (px 20)} [css-empty {:padding (px 5)}]]

CSS pseudoselector "css-empty". Used as a value, e.g.:
[:.some-sel {:padding (px 20)}
 [css-empty {:padding (px 5)}]]
sourceraw docstring

css-filterclj/s

(css-filter & args)

Coming soon

Coming soon
sourceraw docstring

css-firstclj/s

CSS pseudoselector "css-first". Used as a value, e.g.: [:.some-sel [css-first {:transform (scale 1.1)}]]

CSS pseudoselector "css-first". Used as a value, e.g.:
[:.some-sel
 [css-first {:transform (scale 1.1)}]]
sourceraw docstring

css-formatclj/s

(css-format arg)
source

css-maxclj/s

(css-max & args)

Coming soon

Coming soon
sourceraw docstring

css-minclj/s

(css-min & args)

Coming soon

Coming soon
sourceraw docstring

css-notclj/s

(css-not arg)

Coming soon

Coming soon
sourceraw docstring

css-remclj/s

(css-rem value)

A relative length unit, "rem", depending on the size of the root element

A relative length unit, "rem", depending on the size of the root element
sourceraw docstring

css-varclj/s

(css-var & args)

Coming soon

Coming soon
sourceraw docstring

cubic-bezierclj/s

(cubic-bezier & args)

Coming soon

Coming soon
sourceraw docstring

darkenclj/s

(darken color value)

Transforms a color to hsl/hsla and subtracts an absolute lightness from it. E.g.: (darken (rgb 50 100 150) "15%"), (darken :gray 0.35), (darken "#123456" (percent 50))

Transforms a color to hsl/hsla and subtracts an absolute lightness from it. E.g.:
(darken (rgb 50 100 150) "15%"), (darken :gray 0.35), (darken "#123456" (percent 50))
sourceraw docstring

defattributeselectorcljmacro

(defattributeselector & args)

Defines a CSS attribute selector. Those select all descendant elements containing a given attribute, of which the value matches a given substring. All attribute selectors have different conditions for matching: Start with a word, start with a substring, contain a word, contain a substring, end with a substring, have a given value, have a given attribute with any value.

By attributes, it is meant html attributes, e.g. span[class~="info"] selects all spans with a class containing a whole word "info". In tornado, we can represent this by (contains-word :span :class "info").

We can also use (contains-word :class "info") to mark all elements with that class ... compiles to [class~="info"] and affects all elements with that class (divs, spans, iframes, everything).

Defines a CSS attribute selector. Those select all descendant elements containing
a given attribute, of which the value matches a given substring. All attribute
selectors have different conditions for matching:
Start with a word, start with a substring, contain a word, contain a substring,
end with a substring, have a given value, have a given attribute with any value.

By attributes, it is meant html attributes,
e.g. span[class~="info"]
selects all spans with a class containing a whole word "info".
In tornado, we can represent this by (contains-word :span :class "info").

We can also use (contains-word :class "info") to mark all elements with that
class ... compiles to [class~="info"] and affects all elements with that
class (divs, spans, iframes, everything).
sourceraw docstring

defaultclj/s

CSS pseudoselector "default". Used as a value, e.g.: [:.some-sel {:width (px 100)} [default {:width (px 120)}]]

CSS pseudoselector "default". Used as a value, e.g.:
[:.some-sel {:width (px 100)}
 [default {:width (px 120)}]]
sourceraw docstring

defcombinatorselectorcljmacro

(defcombinatorselector & args)

Defines a combinator selector function which describes relationships between its arguments depending on the selector type:

:#abc :.def is the default combinator selector - descendant selector. Affects all children with a class .def.

child-selector ">": is active when the given selectors are every of them a direct child of the previous one.

adjacent-sibling (selector) "+": is active when the given html blocks elements or elements with a given class/id connected with the "+" sign are adjacent siblings.

general-sibling (selector) "~" is active when the given selectors are on the same level of nesting; they do not have to be adjacent necessarily.

Usage: [:.abc [:.def (child-selector :p :#ghi)]] compiles to ".abc .def, .abc > p > #ghi"

Defines a combinator selector function which describes relationships between its
 arguments depending on the selector type:

:#abc :.def is the default combinator selector - descendant selector. Affects all
 children with a class .def.

 child-selector ">": is active when the given selectors are every of them a direct
 child of the previous one.

 adjacent-sibling (selector) "+": is active when the given html blocks elements or
 elements with a given class/id connected with the "+" sign are adjacent siblings.

 general-sibling (selector) "~" is active when the given selectors are on the same
 level of nesting; they do not have to be adjacent necessarily.

 Usage: [:.abc
          [:.def (child-selector :p :#ghi)]]
 compiles to   ".abc .def, .abc > p > #ghi"
sourceraw docstring

defcssfncljmacro

(defcssfn & args)

Creates a cssfn function which which takes any number of arguments and creates a CSSFunction record for future compilation.

Defcssfn can take 1 argument, which creates the function with the same name in CSS and it will be expanded with str/join ", " (default function - commajoin): (defcssfn some-fn) => my.namespace/some-fn (some-fn "arg1" 42 (px 15)) ... compiles to "some-fn(arg1, 42, 15px)"

or it can take 2 arguments: (defcssfn css-min "min") => my.namespace/css-min (css-min (px 500) (vw 60)) ... compiles to "min(500px, 60vw)"

or the 2nd argument can be a compiling function (most commonly spacejoin, commajoin or single-arg for separating the args, you can also define a special function for that, but it should not ever be needed; read docs to these 3 functions): (defcssfn calc spacejoin) (calc (px 500) add 3 mul (vw 5)) ... "calc(500px + 3 * 5vw)"

you can also give defcssfn 3 arguments, where the 2nd one will be a special string for translation to CSS and the 3rd one the compiling function.

Creates a cssfn function which which takes any number of arguments and creates
a CSSFunction record for future compilation.

Defcssfn can take 1 argument, which creates the function with the same name in CSS
and it will be expanded with str/join ", " (default function - commajoin):
(defcssfn some-fn) => my.namespace/some-fn
(some-fn "arg1" 42 (px 15)) ... compiles to   "some-fn(arg1, 42, 15px)"

or it can take 2 arguments:
(defcssfn css-min "min") => my.namespace/css-min
(css-min (px 500) (vw 60)) ... compiles to   "min(500px, 60vw)"

or the 2nd argument can be a compiling function (most commonly spacejoin, commajoin
or single-arg for separating the args, you can also define a special function for
that, but it should not ever be needed; read docs to these 3 functions):
(defcssfn calc spacejoin)
(calc (px 500) add 3 mul (vw 5)) ... "calc(500px + 3 * 5vw)"

you can also give defcssfn 3 arguments, where the 2nd one will be a special string
for translation to CSS and the 3rd one the compiling function.
sourceraw docstring

defkeyframescljmacro

(defkeyframes & args)

Defines a CSS @keyframes animation. The animation name should have a unique symbol for later reference to it and then animation frames in a format [progress params]:

(defkeyframes fade-in-opacity [(u/percent 0) {:opacity 0}] [(u/percent 25) {:opacity 0.1}] [(u/percent 50) {:opacity 0.25}] [(u/percent 75) {:opacity 0.5}] [(u/percent 100) {:opacity 1}])

Then, insert it to the CSS hiccup list to make tornado compile it for later usage:

(def styles (list fade-in-opacity ...))

After that, you can assign this animation to whatever element you want:

(def styles (list fade-in-opacity [:.some-element {:animation-duration (ms 500) :animation-name fade-in-opacity)}] [:#another-element {:animation-name fade-in-opacity :animation-delay (s 1.5)}]))

You can also define from & to progress animations:

(defkeyframes translate-animation [:from {:transform (translate (px 100) (px 200)}] [:to {:transform (translate (px 200) (px 400)}])

Defines a CSS @keyframes animation. The animation name should have a unique symbol
for later reference to it and then animation frames in a format [progress params]:

(defkeyframes fade-in-opacity
              [(u/percent 0) {:opacity 0}]
              [(u/percent 25) {:opacity 0.1}]
              [(u/percent 50) {:opacity 0.25}]
              [(u/percent 75) {:opacity 0.5}]
              [(u/percent 100) {:opacity 1}])

Then, insert it to the CSS hiccup list to make tornado compile it for later usage:

(def styles
   (list
      fade-in-opacity
      ...))

After that, you can assign this animation to whatever element you want:

(def styles
   (list
      fade-in-opacity
      [:.some-element {:animation-duration (ms 500)
                       :animation-name     fade-in-opacity)}]
      [:#another-element {:animation-name  fade-in-opacity
                          :animation-delay (s 1.5)}]))

You can also define from & to progress animations:

(defkeyframes translate-animation
              [:from {:transform (translate (px 100) (px 200)}]
              [:to {:transform (translate (px 200) (px 400)}])
sourceraw docstring

defpseudoclasscljmacro

(defpseudoclass & args)

Defines a CSS pseudoclass. A CSS pseudoclass can activate some CSS properties on a css-class/css-id/html-element based on some current special state of the element.

For example, hover: (defpseudoclass hover) When compiling a selectors sequence, e.g. [:.abc :#def hover], the resulting CSS selectors sequence will look like this: ".abc #def:hover".

So, what does it even do? We can give the element a special value on hover: ... [:a hover {:color :blue} ...] - when we hover over a link with our mouse, the text color of the link will turn blue until we put our mouse away.

Defpseudoclass can also take 2 parameters, where the 2nd one will be the translation to CSS to avoid collisions between Clojure and CSS - e.g.(defpseudolass css-empty "empty").

Defines a CSS pseudoclass. A CSS pseudoclass can activate some CSS properties on
a css-class/css-id/html-element based on some current special state of the element.

For example, hover: (defpseudoclass hover)
When compiling a selectors sequence, e.g. [:.abc :#def hover], the resulting CSS
selectors sequence will look like this: ".abc #def:hover".

So, what does it even do? We can give the element a special value on hover:
... [:a hover {:color :blue} ...] - when we hover over a link with our mouse, the
text color of the link will turn blue until we put our mouse away.

Defpseudoclass can also take 2 parameters, where the 2nd one will be the translation
to CSS to avoid collisions between Clojure and CSS -
e.g.(defpseudolass css-empty "empty").
sourceraw docstring

defpseudoclassfncljmacro

(defpseudoclassfn & args)

Creates a special CSS pseudoclass function, which compiles similarly as a standard CSS pseudoclass, but it is pseudoclass function with an argument.

For example. if you wanted to only select every n-th argument: (defpseudoclassfn nth-child) (nth-child :odd) ... compiles to "<parent>:nth-child(odd)" (nth-child "3n+1") ... compiles to "<parent>:nth-child(3n+1)"

Or if you wanted to show something based on the current language of the browser: (defpseudoclass lang) (lang "en") ... compiles to "<parent>:lang(en)"

To avoid collisions with some Clojure functions, you can give a second argument to defpseudoclassfn for a different translation to CSS: (defpseudoclass css-not "not") (css-not :p) ... compiles-to "not(p)", which selects all descendants which are not a paragraph.

Creates a special CSS pseudoclass function, which compiles similarly as a standard
CSS pseudoclass, but it is pseudoclass function with an argument.

For example. if you wanted to only select every n-th argument:
(defpseudoclassfn nth-child)
(nth-child :odd)     ... compiles to   "<parent>:nth-child(odd)"
(nth-child "3n+1")   ... compiles to   "<parent>:nth-child(3n+1)"

Or if you wanted to show something based on the current language of the browser:
(defpseudoclass lang)
(lang "en") ... compiles to   "<parent>:lang(en)"

To avoid collisions with some Clojure functions, you can give a second argument
to defpseudoclassfn for a different translation to CSS:
(defpseudoclass css-not "not")
(css-not :p) ... compiles-to   "not(p)", which selects all descendants which are
not a paragraph.
sourceraw docstring

defpseudoelementcljmacro

(defpseudoelement & args)

Defines a CSS pseudoelement. A CSS pseudoelement activates some CSS properties on a special part of a css-class/css-id/html-element.

For example, first-letter: (defpseudoclass first-letter) When compiling a selectors sequence, e.g. [:.abc :#def first-letter], the resulting CSS selectors sequence will look like this: ".abc #def::first-letter".

So, what does it even do? We can give the first letter of an element a special value: ... [:.abc :p first-letter {:font-size (u/px 60)} ...] - this causes the first letter of every paragraph in an element with class .abc to have the first letter significantly bigger than the rest of the paragraph.

Defines a CSS pseudoelement. A CSS pseudoelement activates some CSS properties on
a special part of a css-class/css-id/html-element.

For example, first-letter: (defpseudoclass first-letter)
When compiling a selectors sequence, e.g. [:.abc :#def first-letter], the resulting CSS
selectors sequence will look like this: ".abc #def::first-letter".

So, what does it even do? We can give the first letter of an element a special value:
... [:.abc :p first-letter {:font-size (u/px 60)} ...] - this causes the first letter
of every paragraph in an element with class .abc to have the first letter significantly
bigger than the rest of the paragraph.
sourceraw docstring

defunitcljmacro

(defunit & args)

Creates a unit function which takes 1 argument and creates a CSSUnit record for future compilation. Defunit can take 1 arg: (defunit px) or 2 args: (defunit percent "%").

Usage of the defined units: (px 15) ... compiles to "15px" (percent 33) ... compiles to "33%"

CSSUnits can be added, subtracted, multiplied or divided by using function calc (you can also use these 4 keywords - they are defined just for better search in code: :add, :sub, :mul, :div

E.g. (calc (px 500) :add 3 :mul (vw 5)) ... "calc(500px + 3 * 5vw)".

Creates a unit function which takes 1 argument and creates a CSSUnit record for future
compilation. Defunit can take 1 arg: (defunit px)
                          or 2 args: (defunit percent "%").

Usage of the defined units: (px 15)       ...  compiles to "15px"
                            (percent 33)  ...  compiles to "33%"

CSSUnits can be added, subtracted, multiplied or divided by using function calc (you can
also use these 4 keywords - they are defined just for better search in code:
:add, :sub, :mul, :div

E.g. (calc (px 500) :add 3 :mul (vw 5)) ... "calc(500px + 3 * 5vw)".
sourceraw docstring

degclj/s

(deg value)

An angular unit, "degree".

An angular unit, "degree".
sourceraw docstring

desaturateclj/s

(desaturate color value)

Transforms a color to hsl/hsla and subtracts an absolute saturation from it. E.g.: (desaturate (rgb 50 100 150) "15%"), (desaturate :gray 0.35), (desaturate "#123456" (percent 50))

Transforms a color to hsl/hsla and subtracts an absolute saturation from it.
E.g.: (desaturate (rgb 50 100 150) "15%"),
(desaturate :gray 0.35), (desaturate "#123456" (percent 50))
sourceraw docstring

disabledclj/s

CSS pseudoselector "disabled". Used as a value, e.g.: [:.some-sel {:background-color :white} [disabled {:background-color :gray}]]

CSS pseudoselector "disabled". Used as a value, e.g.:
[:.some-sel {:background-color :white}
 [disabled {:background-color :gray}]]
sourceraw docstring

dpcmclj/s

(dpcm value)

A resolution unit, "dots per centimeter".

A resolution unit, "dots per centimeter".
sourceraw docstring

dpiclj/s

(dpi value)

A resolution unit, "dots per inches".

A resolution unit, "dots per inches".
sourceraw docstring

dppxclj/s

(dppx value)

A resolution unit, "dots per pixels".

A resolution unit, "dots per pixels".
sourceraw docstring

drop-shadowclj/s

(drop-shadow & args)

Coming soon

Coming soon
sourceraw docstring

ellipseclj/s

(ellipse & args)

Coming soon

Coming soon
sourceraw docstring

emclj/s

(em value)

A relative length unit, "em", depending on the size of the parent element.

A relative length unit, "em", depending on the size of the parent element.
sourceraw docstring

enabledclj/s

CSS pseudoselector "enabled". Used as a value, e.g.: [:.some-sel {:background-color :gray} [enabled {:background-color :white}]]

CSS pseudoselector "enabled". Used as a value, e.g.:
[:.some-sel {:background-color :gray}
 [enabled {:background-color :white}]]
sourceraw docstring

ends-withclj/s

(ends-with attribute subvalue)
(ends-with tag attribute subvalue)

Selects all descendant elements which have a given parameter with a value ending with a given substring. The substring does not have to be a whole matching word.

Selects all descendant elements which have a given parameter with a value ending
with a given substring. The substring does not have to be a whole matching word.
sourceraw docstring

first-childclj/s

CSS pseudoselector "first-child". Used as a value, e.g.: [:.some-sel [first-child {:transform (scale 1.1)}]]

CSS pseudoselector "first-child". Used as a value, e.g.:
[:.some-sel
 [first-child {:transform (scale 1.1)}]]
sourceraw docstring

first-letterclj/s

Coming soon

Coming soon
sourceraw docstring

first-lineclj/s

Coming soon

Coming soon
sourceraw docstring

first-of-typeclj/s

CSS pseudoselector "first-of-type". Used as a value, e.g.: [:.some-sel [first-of-type {:transform (scale 1.1)}]]

CSS pseudoselector "first-of-type". Used as a value, e.g.:
[:.some-sel
 [first-of-type {:transform (scale 1.1)}]]
sourceraw docstring

focusclj/s

CSS pseudoselector "focus". Used as a value, e.g.: [:.some-sel [focus {:background-color :blue}]]

CSS pseudoselector "focus". Used as a value, e.g.:
[:.some-sel
 [focus {:background-color :blue}]]
sourceraw docstring

frclj/s

(fr value)

A relative length unit, "fraction", depending on the size of the parent element.

A relative length unit, "fraction", depending on the size of the parent element.
sourceraw docstring

fullscreenclj/s

CSS pseudoselector "fullscreen". Used as a value, e.g.: [:.some-sel [fullscreen {:background-color :gray}]]

CSS pseudoselector "fullscreen". Used as a value, e.g.:
[:.some-sel
 [fullscreen {:background-color :gray}]]
sourceraw docstring

general-siblingclj/s

(general-sibling & selectors)

Coming soon

Coming soon
sourceraw docstring

gradclj/s

(grad value)

An angular unit, "gradian". 100 gradians are equal to 90 degrees.

An angular unit, "gradian". 100 gradians are equal to 90 degrees.
sourceraw docstring

grayscaleclj/s

(grayscale arg)

Coming soon

Coming soon
sourceraw docstring

grid-areasclj/s

(grid-areas [first-row & more :as all-rows])

Given a sequence of grid-rows sequences, where each the element is represented by a keyword, a string or a symbol, return a grid-areas string:

(grid-areas [(repeat 3 :header) [:. :content :.] (repeat 3 :footer)]) Output CSS string: "header header header" ". content ." "footer footer footer"

Given a sequence of grid-rows sequences, where each the element is represented by
a keyword, a string or a symbol, return a grid-areas string:

(grid-areas [(repeat 3 :header) [:. :content :.] (repeat 3 :footer)])
Output CSS string: ``"header header header" ". content ." "footer footer footer"``
sourceraw docstring

has-attrclj/s

(has-attr attribute)
(has-attr tag attribute)

An attribute selector which selects all elements which have a given attribute with any value, or all html elements on/below the current nested selectors level which have a given attribute with any value.

An attribute selector which selects all elements which have a given
attribute with any value, or all html elements on/below the current
nested selectors level which have a given attribute with any value.
sourceraw docstring

has-valclj/s

(has-val attribute subvalue)
(has-val tag attribute subvalue)

Selects all descendants of a html tag which have a given parameter with a given value.

Selects all descendants of a html tag which have a given parameter with a given value.
sourceraw docstring

hoverclj/s

CSS pseudoselector "hover". Used as a value, e.g.: [:.some-sel {:width (px 100)} [hover {:width (px 120)}]]

CSS pseudoselector "hover". Used as a value, e.g.:
[:.some-sel {:width (px 100)}
 [hover {:width (px 120)}]]
sourceraw docstring

hslclj/s

(hsl [hue saturation lightness])
(hsl hue saturation lightness)

Creates an hsl color.

Creates an hsl color.
sourceraw docstring

hslaclj/s

(hsla [hue saturation lightness])
(hsla [hue saturation lightness alpha])
(hsla hue saturation lightness)
(hsla hue saturation lightness alpha)

Creates an hsla color.

Creates an hsla color.
sourceraw docstring

html-styleclj/s

(html-style styles-map)

Can be used for compilation of a map of style parameters to a single string of html style="..." attribute. Receives the styles map as its argument and returns a string of compiled style:

(html-style {:width (px 500) :height (percent 15) :color :font-black :background-color :teal})

=> "width:500px;height:15%;color:#1A1B1F;background-color:#008080"

Can be used for compilation of a map of style parameters to a single string of html
style="..." attribute. Receives the styles map as its argument and returns a string
of compiled style:

(html-style {:width            (px 500)
             :height           (percent 15)
             :color            :font-black
             :background-color :teal})

=> "width:500px;height:15%;color:#1A1B1F;background-color:#008080"
sourceraw docstring

hue-rotateclj/s

(hue-rotate arg)

Coming soon

Coming soon
sourceraw docstring

hwbclj/s

(hwb & args)

Coming soon

Coming soon
sourceraw docstring

Hzclj/s

(Hz value)

A frequency unit, "Hertz.

A frequency unit, "Hertz.
sourceraw docstring

imageclj/s

(image & args)

Coming soon

Coming soon
sourceraw docstring

importantclj/s

(important expr)

After the expression is compiled, " !important" is appended to it:

(important [(repeat 3 :auto)]) => "auto auto auto !important" (important :none => "none !important" (important "yellow" => "yellow !important"

After the expression is compiled, " !important" is appended to it:

(important [(repeat 3 :auto)])   =>   "auto auto auto !important"
(important :none   =>   "none !important"
(important "yellow"   =>   "yellow !important"
sourceraw docstring

inclj/s

(in value)

An absolute length unit, "inch"

An absolute length unit, "inch"
sourceraw docstring

in-rangeclj/s

CSS pseudoselector "in-range". Used as a value, e.g.: [:.some-sel [in-range {:border [[(px 2) :solid :red]]}]]

CSS pseudoselector "in-range". Used as a value, e.g.:
[:.some-sel
 [in-range {:border [[(px 2) :solid :red]]}]]
sourceraw docstring

indeterminateclj/s

CSS pseudoselector "indeterminate". Used as a value, e.g.: [:.some-sel {:width (px 100)} [indeterminate {:width (px 120)}]]

CSS pseudoselector "indeterminate". Used as a value, e.g.:
[:.some-sel {:width (px 100)}
 [indeterminate {:width (px 120)}]]
sourceraw docstring

insetclj/s

(inset & args)

Coming soon

Coming soon
sourceraw docstring

invalidclj/s

CSS pseudoselector "invalid". Used as a value, e.g.: [:.some-sel {:width (px 100)} [invalid [:.err-msg {:display :flex}]]

CSS pseudoselector "invalid". Used as a value, e.g.:
[:.some-sel {:width (px 100)}
 [invalid
  [:.err-msg {:display :flex}]]
sourceraw docstring

invertclj/s

(invert arg)

Coming soon

Coming soon
sourceraw docstring

kHzclj/s

(kHz value)

A frequency unit, "kiloHertz.

A frequency unit, "kiloHertz.
sourceraw docstring

langclj/s

(lang arg)

Coming soon

Coming soon
sourceraw docstring

last-childclj/s

CSS pseudoselector "last-child". Used as a value, e.g.: [:.some-sel [last-child {:padding-right 0}]]

CSS pseudoselector "last-child". Used as a value, e.g.:
[:.some-sel
 [last-child {:padding-right 0}]]
sourceraw docstring

last-of-typeclj/s

CSS pseudoselector "last-of-type". Used as a value, e.g.: [:.some-sel [last-of-type {:margin-right (px 5p}]]

CSS pseudoselector "last-of-type". Used as a value, e.g.:
[:.some-sel
 [last-of-type {:margin-right (px 5p}]]
sourceraw docstring

lhclj/s

(lh value)

A relative length unit, equal to the line height.

A relative length unit, equal to the line height.
sourceraw docstring

lightenclj/s

(lighten color value)

Transforms a color to hsl/hsla and adds an absolute lightness to it. E.g.: (lighten (rgb 50 100 150) "15%"), (lighten :gray 0.35), (lighten "#123456" (percent 50))

Transforms a color to hsl/hsla and adds an absolute lightness to it.
E.g.: (lighten (rgb 50 100 150) "15%"),
(lighten :gray 0.35), (lighten "#123456" (percent 50))
sourceraw docstring

linear-gradientclj/s

(linear-gradient & args)

Coming soon

Coming soon
sourceraw docstring

CSS pseudoselector "links". Used as a value, e.g.: [:.some-sel [hover {:color :font-black}]]

CSS pseudoselector "links". Used as a value, e.g.:
[:.some-sel
 [hover {:color :font-black}]]
sourceraw docstring

markerclj/s

Coming soon

Coming soon
sourceraw docstring

matrixclj/s

(matrix & args)

Coming soon

Coming soon
sourceraw docstring

matrix3dclj/s

(matrix3d & args)

Coming soon

Coming soon
sourceraw docstring

mix-colorsclj/s

(mix-colors color & more)

Given any number of colors in any form (alpha-hex, non-alpha-hex, rgb, rgba, hsl, hsla), converts them to the most frequent type and mixes them.

Given any number of colors in any form (alpha-hex, non-alpha-hex, rgb, rgba,
hsl, hsla), converts them to the most frequent type and mixes them.
sourceraw docstring

mmclj/s

(mm value)

An absolute length unit, "millimeter".

An absolute length unit, "millimeter".
sourceraw docstring

msclj/s

(ms value)

A time unit, "millisecond".

A time unit, "millisecond".
sourceraw docstring

nth-childclj/s

(nth-child arg)

Coming soon

Coming soon
sourceraw docstring

nth-last-childclj/s

(nth-last-child arg)

Coming soon

Coming soon
sourceraw docstring

nth-last-of-typeclj/s

(nth-last-of-type arg)

Coming soon

Coming soon
sourceraw docstring

nth-of-typeclj/s

(nth-of-type arg)

Coming soon

Coming soon
sourceraw docstring

only-childclj/s

CSS pseudoselector "only-child". Used as a value, e.g.: [:.some-sel {:padding (px 10)} [only-child {:padding (px 15)}]]

CSS pseudoselector "only-child". Used as a value, e.g.:
[:.some-sel {:padding (px 10)}
 [only-child {:padding (px 15)}]]
sourceraw docstring

only-of-typeclj/s

CSS pseudoselector "only-of-type". Used as a value, e.g.: [:.some-sel [only-of-type {:background-color :chocolate}]]

CSS pseudoselector "only-of-type". Used as a value, e.g.:
[:.some-sel
 [only-of-type {:background-color :chocolate}]]
sourceraw docstring

opacifyclj/s

(opacify color value)

Transforms a color to its with-alpha form and adds an absolute alpha to it. E.g.: (opacify(rgb 50 100 150) "15%"), (opacify :gray 0.35), (opacify "#123456" (percent 50))

Transforms a color to its with-alpha form and adds an absolute alpha to it.
E.g.: (opacify(rgb 50 100 150) "15%"),
(opacify :gray 0.35), (opacify "#123456" (percent 50))
sourceraw docstring

opposite-hueclj/s

(opposite-hue color)

Transforms a color to hsl/hsla and rotates its hue by a half.

Transforms a color to hsl/hsla and rotates its hue by a half.
sourceraw docstring

optionalclj/s

CSS pseudoselector "optional". Used as a value, e.g.: [:.some-sel [optional {:opacity 0.8}]]

CSS pseudoselector "optional". Used as a value, e.g.:
[:.some-sel
 [optional {:opacity 0.8}]]
sourceraw docstring

out-of-rangeclj/s

CSS pseudoselector "out-of-range". Used as a value, e.g.: [:.some-sel [out-of-range {:display :none}]]

CSS pseudoselector "out-of-range". Used as a value, e.g.:
[:.some-sel
 [out-of-range {:display :none}]]
sourceraw docstring

pcclj/s

(pc value)

An absolute length unit, "pica".

An absolute length unit, "pica".
sourceraw docstring

percentclj/s

(percent value)

An absolute length unit, "percent" ("%"), can be used as color alpha in this library.

An absolute length unit, "percent" ("%"), can be used as color alpha in this library.
sourceraw docstring

perspectiveclj/s

(perspective arg)

Coming soon

Coming soon
sourceraw docstring

polygonclj/s

(polygon & args)

Coming soon

Coming soon
sourceraw docstring

ptclj/s

(pt value)

An absolute length unit, "point".

An absolute length unit, "point".
sourceraw docstring

pxclj/s

(px value)

An absolute length unit, "pixel".

An absolute length unit, "pixel".
sourceraw docstring

radclj/s

(rad value)

An angular unit, "radian". Equal to 360°/2π

An angular unit, "radian". Equal to 360°/2π
sourceraw docstring

radial-gradientclj/s

(radial-gradient & args)

Coming soon

Coming soon
sourceraw docstring

read-onlyclj/s

CSS pseudoselector "read-only". Used as a value, e.g.: [:.some-sel [read-only {:background-color :blanchedalmond}]]

CSS pseudoselector "read-only". Used as a value, e.g.:
[:.some-sel
 [read-only {:background-color :blanchedalmond}]]
sourceraw docstring

read-writeclj/s

CSS pseudoselector "read-write". Used as a value, e.g.: [:.some-sel [read-write {:cursor :pointer}]]

CSS pseudoselector "read-write". Used as a value, e.g.:
[:.some-sel
 [read-write {:cursor :pointer}]]
sourceraw docstring

repeating-linear-gradientclj/s

(repeating-linear-gradient & args)

Coming soon

Coming soon
sourceraw docstring

repeating-radial-gradientclj/s

(repeating-radial-gradient & args)

Coming soon

Coming soon
sourceraw docstring

repl-cssclj/s

(repl-css css-hiccup)

Generates CSS from a hiccup vector or a (maybe multiple times) nested list of hiccup vectors (and/or with @keyframes, @font-face). It then pretty prints the output string, which is useful for evaluating any tornado code in REPL.

Generates CSS from a hiccup vector or a (maybe multiple times) nested list of hiccup
vectors (and/or with @keyframes, @font-face). It then pretty prints the output string,
which is useful for evaluating any tornado code in REPL.
sourceraw docstring

requiredclj/s

CSS pseudoselector "required". Used as a value, e.g.: [:.some-sel [required {:border [[(px 2) :dotted :crimson]]}]]

CSS pseudoselector "required". Used as a value, e.g.:
[:.some-sel
 [required {:border [[(px 2) :dotted :crimson]]}]]
sourceraw docstring

rgbclj/s

(rgb [red green blue])
(rgb red green blue)

Creates an rgb color.

Creates an rgb color.
sourceraw docstring

rgbaclj/s

(rgba [red green blue])
(rgba [red green blue alpha])
(rgba red green blue)
(rgba red green blue alpha)

Creates an rgba color.

Creates an rgba color.
sourceraw docstring

rootclj/s

CSS pseudoselector "root". Used as a value, e.g.: [:.some-sel [root {:font-size (px 24)}]]

CSS pseudoselector "root". Used as a value, e.g.:
[:.some-sel
 [root {:font-size (px 24)}]]
sourceraw docstring

rotateclj/s

(rotate arg)

Coming soon

Coming soon
sourceraw docstring

rotate-hueclj/s

(rotate-hue color angle)

Transforms a color to hsl/hsla and rotates its hue by an angle.

Transforms a color to hsl/hsla and rotates its hue by an angle.
sourceraw docstring

rotate3dclj/s

(rotate3d & args)

Coming soon

Coming soon
sourceraw docstring

rotateXclj/s

(rotateX arg)

Coming soon

Coming soon
sourceraw docstring

rotateYclj/s

(rotateY arg)

Coming soon

Coming soon
sourceraw docstring

rotateZclj/s

(rotateZ arg)

Coming soon

Coming soon
sourceraw docstring

sclj/s

(s value)

A time unit, "second".

A time unit, "second".
sourceraw docstring

saturateclj/s

(saturate color value)

Transforms a color to hsl/hsla and adds an absolute saturation to it. E.g.: (saturate (rgb 50 100 150) "15%"), (saturate :gray 0.35), (saturate "#123456" (percent 50))

Transforms a color to hsl/hsla and adds an absolute saturation to it.
E.g.: (saturate (rgb 50 100 150) "15%"),
(saturate :gray 0.35), (saturate "#123456" (percent 50))
sourceraw docstring

scaleclj/s

(scale & args)

Coming soon

Coming soon
sourceraw docstring

scale-alphaclj/s

(scale-alpha color value)

Transforms a color to its with-alpha form and adds multiplies its alpha with a numeric value. E.g.: (scale-alpha (rgb 50 100 150) "15%"), (scale-alpha :gray 0.35), (scale-alpha "#123456" (percent 50))

Transforms a color to its with-alpha form and adds multiplies its alpha with
a numeric value.  E.g.: (scale-alpha (rgb 50 100 150) "15%"),
(scale-alpha :gray 0.35), (scale-alpha "#123456" (percent 50))
sourceraw docstring

scale-lightnessclj/s

(scale-lightness color value)

Transforms a color to hsl/hsla and adds multiplies its lightness with a numeric value. E.g.: (scale-lightness (rgb 50 100 150) "15%"), (scale-lightness :gray 0.35), (scale-lightness "#123456" (percent 50))

Transforms a color to hsl/hsla and adds multiplies its lightness with
a numeric value.  E.g.: (scale-lightness (rgb 50 100 150) "15%"),
(scale-lightness :gray 0.35), (scale-lightness "#123456" (percent 50))
sourceraw docstring

scale-saturationclj/s

(scale-saturation color value)

Transforms a color to hsl/hsla and adds multiplies its saturation with a numeric value. E.g.: (saturate (rgb 50 100 150) "15%"), (saturate :gray 0.35), (saturate "#123456" (percent 50))

Transforms a color to hsl/hsla and adds multiplies its saturation with
a numeric value.  E.g.: (saturate (rgb 50 100 150) "15%"),
(saturate :gray 0.35), (saturate "#123456" (percent 50))
sourceraw docstring

scale3dclj/s

(scale3d & args)

Coming soon

Coming soon
sourceraw docstring

scaleXclj/s

(scaleX arg)

Coming soon

Coming soon
sourceraw docstring

scaleYclj/s

(scaleY arg)

Coming soon

Coming soon
sourceraw docstring

scaleZclj/s

(scaleZ arg)

Coming soon

Coming soon
sourceraw docstring

scopeclj/s

CSS pseudoselector "scope". Used as a value, e.g.: [:.some-sel [scope {:background-color :lime}]]

CSS pseudoselector "scope". Used as a value, e.g.:
[:.some-sel
 [scope {:background-color :lime}]]
sourceraw docstring

selectionclj/s

Coming soon

Coming soon
sourceraw docstring

sepiaclj/s

(sepia arg)

Coming soon

Coming soon
sourceraw docstring

single-argclj/s

(single-arg {:keys [compiles-to args]})

Coming soon

Coming soon
sourceraw docstring

skewclj/s

(skew & args)

Coming soon

Coming soon
sourceraw docstring

skewXclj/s

(skewX arg)

Coming soon

Coming soon
sourceraw docstring

skewYclj/s

(skewY arg)

Coming soon

Coming soon
sourceraw docstring

space-joinclj/s

(space-join {:keys [compiles-to args]})

Coming soon

Coming soon
sourceraw docstring

starts-withclj/s

(starts-with attribute subvalue)
(starts-with tag attribute subvalue)

Selects all descendant elements which have a given parameter with a value starting with a given substring (unlike the contains-word selector, the substring does not have to be a whole matching word.

Selects all descendant elements which have a given parameter with a value starting with
a given substring (unlike the contains-word selector, the substring does not have to be
a whole matching word.
sourceraw docstring

starts-with-wordclj/s

(starts-with-word attribute subvalue)
(starts-with-word tag attribute subvalue)

Selects all descendant elements which have a given parameter with a value starting with a given word (substring is not enough - a matching word separated by commas or spaces).

Selects all descendant elements which have a given parameter with a value starting with
a given word (substring is not enough - a matching word separated by commas or spaces).
sourceraw docstring

symbolsclj/s

(symbols & args)

Coming soon

Coming soon
sourceraw docstring

targetclj/s

CSS pseudoselector "target". Used as a value, e.g.: [:.some-sel [target {:background-color :teal}]]

CSS pseudoselector "target". Used as a value, e.g.:
[:.some-sel
 [target {:background-color :teal}]]
sourceraw docstring

translateclj/s

(translate & args)

Coming soon

Coming soon
sourceraw docstring

translate3dclj/s

(translate3d & args)

Coming soon

Coming soon
sourceraw docstring

translateXclj/s

(translateX arg)

Coming soon

Coming soon
sourceraw docstring

translateYclj/s

(translateY arg)

Coming soon

Coming soon
sourceraw docstring

translateZclj/s

(translateZ arg)

Coming soon

Coming soon
sourceraw docstring

transparentizeclj/s

(transparentize color value)

Transforms a color to its with-alpha form and subtracts an absolute alpha from it. E.g.: (transparentize (rgb 50 100 150) "15%"), (transparentize :gray 0.35), (transparentize "#123456" (percent 50))

Transforms a color to its with-alpha form and subtracts an absolute alpha from it.
E.g.: (transparentize (rgb 50 100 150) "15%"),
(transparentize :gray 0.35), (transparentize "#123456" (percent 50))
sourceraw docstring

triad-nextclj/s

(triad-next color)

Transforms a color to hsl/hsla and rotates its hue by a third clockwise.

Transforms a color to hsl/hsla and rotates its hue by a third clockwise.
sourceraw docstring

triad-previousclj/s

(triad-previous color)

Transforms a color to hsl/hsla and rotates its hue by a third counterclockwise.

Transforms a color to hsl/hsla and rotates its hue by a third counterclockwise.
sourceraw docstring

turnclj/s

(turn value)

An angular unit, "turn". Represents one whole turn, equal to 360 degrees.

An angular unit, "turn". Represents one whole turn, equal to 360 degrees.
sourceraw docstring

urlclj/s

(url & args)

Coming soon

Coming soon
sourceraw docstring

validclj/s

CSS pseudoselector "valid". Used as a value, e.g.: [:.some-sel [valid {:background-color :limegreen}]]

CSS pseudoselector "valid". Used as a value, e.g.:
[:.some-sel
 [valid {:background-color :limegreen}]]
sourceraw docstring

vhclj/s

(vh value)

A relative length unit, "viewport height", based on the height of the window.

A relative length unit, "viewport height", based on the height of the window.
sourceraw docstring

visitedclj/s

CSS pseudoselector "visited". Used as a value, e.g.: [:.some-sel [visited {:color :seashell}]]

CSS pseudoselector "visited". Used as a value, e.g.:
[:.some-sel
 [visited {:color :seashell}]]
sourceraw docstring

vmaxclj/s

(vmax value)

A relative length unit, maximum of vw and vh.

A relative length unit, maximum of vw and vh.
sourceraw docstring

vminclj/s

(vmin value)

A relative length unit, minimum of vw and vh.

A relative length unit, minimum of vw and vh.
sourceraw docstring

vwclj/s

(vw value)

A relative length unit, "viewport width", based on the width of the window.

A relative length unit, "viewport width", based on the width of the window.
sourceraw docstring

with-alphaclj/s

(with-alpha color hue)

Given a color, sets its alpha to a given value. E.g.: (with-alpha :red 0.4), (with-alpha "#FF7FCF" 0.4)

Given a color, sets its alpha to a given value.
E.g.: (with-alpha :red 0.4), (with-alpha "#FF7FCF" 0.4)
sourceraw docstring

with-hueclj/s

(with-hue color hue)

Given a color, transforms it into HSL and sets its hue to a given value. E.g.: (with-hue :red 150), (with-hue (rgba 200 150 100 0.3) 75)

Given a color, transforms it into HSL and sets its hue to a given value.
E.g.: (with-hue :red 150), (with-hue (rgba 200 150 100 0.3) 75)
sourceraw docstring

with-lightnessclj/s

(with-lightness color hue)

Given a color, transforms it into HSL and sets its lightness to a given value. E.g.: (with-lightness :red 0.8), (with-lightness (rgba 200 150 100 0.3) 0.8)

Given a color, transforms it into HSL and sets its lightness to a given value.
E.g.: (with-lightness :red 0.8), (with-lightness (rgba 200 150 100 0.3) 0.8)
sourceraw docstring

with-saturationclj/s

(with-saturation color hue)

Given a color, transforms it into HSL and sets its saturation to a given value. E.g.: (with-saturation :red 0.5), (with-saturation (rgba 200 150 100 0.3) 0.5)

Given a color, transforms it into HSL and sets its saturation to a given value.
E.g.: (with-saturation :red 0.5), (with-saturation (rgba 200 150 100 0.3) 0.5)
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close