Method: TailwindTheme::Theme#css!

Defined in:
lib/tailwind_theme.rb

#css!(path, options = {}) ⇒ String

Get the merged Tailwind CSS classes. Raises an IndexError if the path cannot be found.

Parameters:

  • path (String, Symbol, Array<String, Symbol>)

    the path to the css classes or sub theme

  • options (Hash<Symbol, Object>) (defaults to: {})

    the options to use when parsing the css theme

Options Hash (options):

  • prepend (prepend)

    the classnames before merging the Tailwind Classes

  • append (append)

    the classnames before merging the Tailwind Classes

  • object (Object)

    the object to apply the sub theme

  • attributes (Hash<String, Object>)

    the attributes to apply the sub theme. Overrides the attributes defined in ‘options`.

Returns:

  • (String)

    the merged Tailwind CSS classes

Raises:

  • (IndexError)

    if the :raise options is true and the path cannot be found

  • (ArgumentError)

    if processing an object theme and the object or attributes option is not defined



106
107
108
# File 'lib/tailwind_theme.rb', line 106

def css!(path, options = {})
  css path, options.merge(raise: true)
end