Liking cljdoc? Tell your friends :D

tincture.core


-maincljs

(-main & args)
source

<subcljs

Shorthand for subscribing to re-frame subscriptions and dereference in one go.

Source: https://lambdaisland.com/blog/2017-02-11-re-frame-form-1-subscriptions

Example:

(<sub [:tincture/viewport-width])
Shorthand for subscribing to re-frame subscriptions and
dereference in one go.

Source: https://lambdaisland.com/blog/2017-02-11-re-frame-form-1-subscriptions

Example:

```clojure
(<sub [:tincture/viewport-width])
```
sourceraw docstring

>evtcljs

Shorthand for dispatching re-frame events

source: https://lambdaisland.com/blog/2017-02-11-re-frame-form-1-subscriptions

Example:

(>evt [:tincture/set-font
  {:font-family ["Raleway" "'Helvetica Neue'" "Arial" "Helvetica" "sans-serif"]
   :font-url "https://fonts.googleapis.com/css?family=Raleway:300,400,500"}])
Shorthand for dispatching re-frame events

source: https://lambdaisland.com/blog/2017-02-11-re-frame-form-1-subscriptions

Example:
```clojure
(>evt [:tincture/set-font
  {:font-family ["Raleway" "'Helvetica Neue'" "Arial" "Helvetica" "sans-serif"]
   :font-url "https://fonts.googleapis.com/css?family=Raleway:300,400,500"}])
```
sourceraw docstring

box-shadowcljs

(box-shadow elevation)

Takes a elevation and retuns a CSS box-shadow string. Elevation can be one of #{0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24}

Takes a elevation and retuns a CSS box-shadow string. Elevation can
be one of `#{0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
22 23 24}`
sourceraw docstring

breakpointscljs

Map of breakpoints to be used in media queries, this is just an alias to the breakpoints defined in tincture.core/grid

Map of breakpoints to be used in media queries, this is just an alias to
the breakpoints defined in `tincture.core/grid`
sourceraw docstring

clampcljs

(clamp value min-value max-value)

Clamps a value between a pair of boundary values. Takes a value and boundries max-value, min-value, and returns the a value within those bounds. Example:

(clamp 200 100 150)
;=> 150
Clamps a value between a pair of boundary values. Takes a value and
boundries max-value, min-value, and returns the a value within those bounds.
Example:
```clojure
(clamp 200 100 150)
;=> 150
```
sourceraw docstring

create-transitioncljs

(create-transition
  {:keys [property duration delay easing]
   :or {property :all duration 300 easing :ease-in-cubic delay 0}})

Helper function that generates a transition string for multiple properties.

Options

create-transition takes a map of options:

  • :property CSS property/ies to transition. Can be single prop either string or keyword, a sequental collection of string or keyword.

  • :duration Duration applied to each property. A single positive int in milliseconds, or sequential collection of positive integers in milliseconds. Does not have to match the property count, it will get padded out to match the property count.

  • :delay, delay applied to each property. A single positive int in milliseconds, or a sequential collection of positive integers in milliseconds. Does not have to match property count, will get padded out based on the last value in collection, or if single value it is used for each property.

  • :easing, the easing function to be used on each property. Can be one of: #{:ease-in-quad :ease-in-cubic :ease-in-quart :ease-in-quint :ease-in-expo :ease-in-circ :ease-out-quad :ease-out-cubic :ease-out-quart :ease-out-quint :ease-out-expo :ease-out-circ :ease-in-out-quad :ease-in-out-cubic :ease-in-out-quart :ease-in-out-quint :ease-in-out-expo :ease-in-out-circ} or a sequential collection the same. Does not have to match property count, will get padded out based on either last value in collection.

Example usage

{:transition (create-transition {:property [:transform :opacity]
                                 :duration [300 500]
                                 :easing   [:ease-in-cubic :ease-out-cubic]})}

Result:

{:transition "transform 300ms cubic-bezier(.550, .055, .675, .19) 0ms, opacity 300ms cubic-bezier(.550, .055, .675, .19) 0ms"}
Helper function that generates a transition string for multiple properties.

**Options**

create-transition takes a map of options:

* `:property` CSS property/ies to transition. Can be single prop
either string or keyword, a sequental collection of string or keyword.

* `:duration` Duration applied to each property. A single positive
int in milliseconds, or sequential collection of positive integers
in milliseconds. Does not have to match the property count, it will
get padded out to match the property count.

* `:delay`, delay applied to each property. A single positive int in
milliseconds, or a sequential collection of positive integers in
milliseconds. Does not have to match property count, will get padded
out based on the last value in collection, or if single value it is
used for each property.

* `:easing`, the easing function to be used on each property. Can be one of:
`#{:ease-in-quad :ease-in-cubic :ease-in-quart :ease-in-quint :ease-in-expo
:ease-in-circ :ease-out-quad :ease-out-cubic :ease-out-quart :ease-out-quint
:ease-out-expo :ease-out-circ :ease-in-out-quad :ease-in-out-cubic
:ease-in-out-quart :ease-in-out-quint :ease-in-out-expo :ease-in-out-circ}`
or a sequential collection the same. Does not have to match property
count, will get padded out based on either last value in collection.

**Example usage**
```clojure
{:transition (create-transition {:property [:transform :opacity]
                                 :duration [300 500]
                                 :easing   [:ease-in-cubic :ease-out-cubic]})}
```
Result:
```clojure
{:transition "transform 300ms cubic-bezier(.550, .055, .675, .19) 0ms, opacity 300ms cubic-bezier(.550, .055, .675, .19) 0ms"}
```
sourceraw docstring

css-wrap-urlcljsdeprecated

(css-wrap-url prop)

Wrap a url string in the url css function. Deprecated, use tincture.cssfns/url instead

Wrap a url string in the url css function. Deprecated, use tincture.cssfns/url
instead
sourceraw docstring

easing-presetscljs

Map of easing preset functions to be used in CSS transitions Source: https://gist.github.com/bendc/ac03faac0bf2aee25b49e5fd260a727d

Map of easing preset functions to be used in CSS transitions
Source: https://gist.github.com/bendc/ac03faac0bf2aee25b49e5fd260a727d
sourceraw docstring

index-ofcljs

(index-of coll value)

Takes a collection and a value and returns the value's index in the given collection

Takes a collection and a value and returns the value's index in the given
collection
sourceraw docstring

init!cljs

(init!)
(init! options)

Initialize tincture. Dispatches :tincture/initialize which takes a map of options:

Options

:font-family a vector of font-families to be used in tincture.typography/Typography component. Default: ["Roboto" "Helvetica" "Arial" "sans-serif"]

:font-url a string representing a font url. If a url is provided it is injected as a <link> element in <head> on initialize. Default: nil

Initialize tincture. Dispatches `:tincture/initialize` which takes a map of options:

**Options**

`:font-family` a vector of font-families to be used in
`tincture.typography/Typography` component.
Default: `["Roboto" "Helvetica" "Arial" "sans-serif"]`

`:font-url` a string representing a font url.  If a url is provided
it is injected as a &lt;link&gt; element in &lt;head&gt; on
initialize. Default: nil
 
sourceraw docstring

text-shadowcljs

(text-shadow elevation)

Takes an elevation and returns a CSS string to be used in text-shadow property Elevation can be one of #{0 1 2 3}

Takes an elevation and returns a CSS string to be used in text-shadow property
Elevation can be one of `#{0 1 2 3}`
sourceraw docstring

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

× close