View Source ExCSSModules.View (ExCSSModules v0.0.10)

Implements the ExCSSModule functions into a view.

Link to this section Summary

Functions

Use the ExCSSModules.View on a view which defines the JSON for CSS Modules as an external resource.

Link to this section Functions

Link to this macro

__using__(opts \\ [])

View Source (macro)

Use the ExCSSModules.View on a view which defines the JSON for CSS Modules as an external resource.

To embed the stylesheet in the file set :embed_stylesheet to true. This can also be enabled through the :embed_by_default config option.

If adds the following functions to the View:

  • stylesheet/0 - same as ExCSSModules.stylesheet/2 with the stylesheet predefined
  • class/1 - same as ExCSSModules.class/2 with the stylesheet predefined
  • class_name/1 - same as ExCSSModules.class_name/2 with the stylesheet predefined
  • class_name/2 - same as ExCSSModules.class_name/3 with the stylesheet predefined
  • class_selector/1 - same as ExCSSModules.class_selector/2 with the stylesheet predefined