ExCSSModules v0.0.5 ExCSSModules View Source

CSS Modules helpers

Link to this section Summary

Functions

Reads the class definitions from the definition map and maps them to a class attribute. The classes argument takes any argument the class_name for the key

If value is truthy, read the class definitions and maps them to a class attribute. When value is falsy return nil

Returns the class name sfrom the definition map when the argument is a list of values or tuples

Returns the class name from the definition map if value is true

Link to this section Functions

Link to this function class(definition, classes) View Source

Reads the class definitions from the definition map and maps them to a class attribute. The classes argument takes any argument the class_name for the key.

Examples

iex> class(%{ “hello” => “world”}, “hello”)

Link to this function class(definition, classes, value) View Source

If value is truthy, read the class definitions and maps them to a class attribute. When value is falsy return nil.

Examples

iex> class(%{ “hello” => “world”}, “hello”, true)

iex> class(%{ “hello” => “world”}, “hello”, false) nil

Link to this function class_name(definition, keys) View Source

Returns the class name sfrom the definition map when the argument is a list of values or tuples.

Examples

iex> class_name(%{“hello” => “world”}, “hello”) “world”

iex> class_name(%{“hello” => “world”}, “foo”) nil

Link to this function class_name(definition, key, value) View Source

Returns the class name from the definition map if value is true.

Examples

iex> class_name(%{“hello” => “world”}, “hello”, true) “world”

iex> class_name(%{“hello” => “world”}, “hello”, false) nil

Link to this function read_stylesheet(filename) View Source