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

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

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

adjacent-siblingclj

(adjacent-sibling & selectors)

Coming soon

Coming soon
sourceraw docstring

afterclj

Coming soon

Coming soon
sourceraw docstring

at-font-faceclj

(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

(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

(attr & args)

Coming soon

Coming soon
sourceraw docstring

beforeclj

Coming soon

Coming soon
sourceraw docstring

blurclj

(blur arg)

Coming soon

Coming soon
sourceraw docstring

brightnessclj

(brightness arg)

Coming soon

Coming soon
sourceraw docstring

calcclj

(calc & args)

Coming soon

Coming soon
sourceraw docstring

checkedclj

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

(child-selector & selectors)

Coming soon

Coming soon
sourceraw docstring

circleclj

(circle & args)

Coming soon

Coming soon
sourceraw docstring

cmclj

(cm value)

An absolute length unit, "centimeter".

An absolute length unit, "centimeter".
sourceraw docstring

commajoinclj

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

Coming soon

Coming soon
sourceraw docstring

compile-expressionclj

(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

contains-subsclj

(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

(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

(contrast arg)

Coming soon

Coming soon
sourceraw docstring

counterclj

(counter & args)

Coming soon

Coming soon
sourceraw docstring

countersclj

(counters & args)

Coming soon

Coming soon
sourceraw docstring

cssclj

(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

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

(css-filter & args)

Coming soon

Coming soon
sourceraw docstring

css-firstclj

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

(css-format arg)
source

css-maxclj

(css-max & args)

Coming soon

Coming soon
sourceraw docstring

css-minclj

(css-min & args)

Coming soon

Coming soon
sourceraw docstring

css-notclj

(css-not arg)

Coming soon

Coming soon
sourceraw docstring

css-remclj

(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

(css-var & args)

Coming soon

Coming soon
sourceraw docstring

cubic-bezierclj

(cubic-bezier & args)

Coming soon

Coming soon
sourceraw docstring

darkenclj

(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 condition.

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 condition.
sourceraw docstring

defaultclj

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

(deg value)

An angular unit, "degree".

An angular unit, "degree".
sourceraw docstring

desaturateclj

(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

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

(dpcm value)

A resolution unit, "dots per centimeter".

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

dpiclj

(dpi value)

A resolution unit, "dots per inches".

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

dppxclj

(dppx value)

A resolution unit, "dots per pixels".

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

drop-shadowclj

(drop-shadow & args)

Coming soon

Coming soon
sourceraw docstring

ellipseclj

(ellipse & args)

Coming soon

Coming soon
sourceraw docstring

emclj

(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

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

(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

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

Coming soon

Coming soon
sourceraw docstring

first-lineclj

Coming soon

Coming soon
sourceraw docstring

first-of-typeclj

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

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

(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

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

(general-sibling & selectors)

Coming soon

Coming soon
sourceraw docstring

gradclj

(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

(grayscale arg)

Coming soon

Coming soon
sourceraw docstring

grid-areasclj

(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

(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

(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

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

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

Creates an hsl color.

Creates an hsl color.
sourceraw docstring

hslaclj

(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

hue-rotateclj

(hue-rotate arg)

Coming soon

Coming soon
sourceraw docstring

hwbclj

(hwb & args)

Coming soon

Coming soon
sourceraw docstring

Hzclj

(Hz value)

A frequency unit, "Hertz.

A frequency unit, "Hertz.
sourceraw docstring

imageclj

(image & args)

Coming soon

Coming soon
sourceraw docstring

importantclj

(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

(in value)

An absolute length unit, "inch"

An absolute length unit, "inch"
sourceraw docstring

in-rangeclj

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

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

(inset & args)

Coming soon

Coming soon
sourceraw docstring

invalidclj

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

(invert arg)

Coming soon

Coming soon
sourceraw docstring

kHzclj

(kHz value)

A frequency unit, "kiloHertz.

A frequency unit, "kiloHertz.
sourceraw docstring

langclj

(lang arg)

Coming soon

Coming soon
sourceraw docstring

last-childclj

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

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

leftclj

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

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

lhclj

(lh value)

A relative length unit, equal to the line height.

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

lightenclj

(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

(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

matrixclj

(matrix & args)

Coming soon

Coming soon
sourceraw docstring

matrix3dclj

(matrix3d & args)

Coming soon

Coming soon
sourceraw docstring

mix-colorsclj

(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

(mm value)

An absolute length unit, "millimeter".

An absolute length unit, "millimeter".
sourceraw docstring

msclj

(ms value)

A time unit, "millisecond".

A time unit, "millisecond".
sourceraw docstring

nth-childclj

(nth-child arg)

Coming soon

Coming soon
sourceraw docstring

nth-last-childclj

(nth-last-child arg)

Coming soon

Coming soon
sourceraw docstring

nth-last-of-typeclj

(nth-last-of-type arg)

Coming soon

Coming soon
sourceraw docstring

nth-of-typeclj

(nth-of-type arg)

Coming soon

Coming soon
sourceraw docstring

only-childclj

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

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

(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

(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

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

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

(pc value)

An absolute length unit, "pica".

An absolute length unit, "pica".
sourceraw docstring

percentclj

(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

(perspective arg)

Coming soon

Coming soon
sourceraw docstring

polygonclj

(polygon & args)

Coming soon

Coming soon
sourceraw docstring

ptclj

(pt value)

An absolute length unit, "point".

An absolute length unit, "point".
sourceraw docstring

pxclj

(px value)

An absolute length unit, "pixel".

An absolute length unit, "pixel".
sourceraw docstring

radclj

(rad value)

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

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

radial-gradientclj

(radial-gradient & args)

Coming soon

Coming soon
sourceraw docstring

read-onlyclj

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

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

(repeating-linear-gradient & args)

Coming soon

Coming soon
sourceraw docstring

repeating-radial-gradientclj

(repeating-radial-gradient & args)

Coming soon

Coming soon
sourceraw docstring

repl-cssclj

(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

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

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

Creates an rgb color.

Creates an rgb color.
sourceraw docstring

rgbaclj

(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

CSS pseudoselector "right". Used as a value, e.g.: [:.some-sel [right {:font-weight 800}]]

CSS pseudoselector "right". Used as a value, e.g.:
[:.some-sel
 [right {:font-weight 800}]]
sourceraw docstring

rootclj

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

(rotate arg)

Coming soon

Coming soon
sourceraw docstring

rotate-hueclj

(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

(rotate3d & args)

Coming soon

Coming soon
sourceraw docstring

rotateXclj

(rotateX arg)

Coming soon

Coming soon
sourceraw docstring

rotateYclj

(rotateY arg)

Coming soon

Coming soon
sourceraw docstring

rotateZclj

(rotateZ arg)

Coming soon

Coming soon
sourceraw docstring

sclj

(s value)

A time unit, "second".

A time unit, "second".
sourceraw docstring

saturateclj

(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

(scale & args)

Coming soon

Coming soon
sourceraw docstring

scale-alphaclj

(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

(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

(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

(scale3d & args)

Coming soon

Coming soon
sourceraw docstring

scaleXclj

(scaleX arg)

Coming soon

Coming soon
sourceraw docstring

scaleYclj

(scaleY arg)

Coming soon

Coming soon
sourceraw docstring

scaleZclj

(scaleZ arg)

Coming soon

Coming soon
sourceraw docstring

scopeclj

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

Coming soon

Coming soon
sourceraw docstring

sepiaclj

(sepia arg)

Coming soon

Coming soon
sourceraw docstring

single-argclj

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

Coming soon

Coming soon
sourceraw docstring

skewclj

(skew & args)

Coming soon

Coming soon
sourceraw docstring

skewXclj

(skewX arg)

Coming soon

Coming soon
sourceraw docstring

skewYclj

(skewY arg)

Coming soon

Coming soon
sourceraw docstring

spacejoinclj

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

Coming soon

Coming soon
sourceraw docstring

starts-withclj

(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

(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

(symbols & args)

Coming soon

Coming soon
sourceraw docstring

targetclj

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

(translate & args)

Coming soon

Coming soon
sourceraw docstring

translate3dclj

(translate3d & args)

Coming soon

Coming soon
sourceraw docstring

translateXclj

(translateX arg)

Coming soon

Coming soon
sourceraw docstring

translateYclj

(translateY arg)

Coming soon

Coming soon
sourceraw docstring

translateZclj

(translateZ arg)

Coming soon

Coming soon
sourceraw docstring

transparentizeclj

(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

(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

(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

(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

(url & args)

Coming soon

Coming soon
sourceraw docstring

validclj

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

(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

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

(vmax value)

A relative length unit, maximum of vw and vh.

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

vminclj

(vmin value)

A relative length unit, minimum of vw and vh.

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

vwclj

(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

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

× close