ExCSSModules v0.0.4 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

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 is 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_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 is 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