Method: TailwindTheme::Theme#merge_css!

Defined in:
lib/tailwind_theme.rb

#merge_css!(paths, options = {}) ⇒ String

Combine multiple paths and merging the combined Tailwind CSS classes. Raises an IndexError if a path

cannot be found.

Parameters:

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

    the array of paths to combine

  • 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 a path cannot be found

  • (ArgumentError)

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



148
149
150
# File 'lib/tailwind_theme.rb', line 148

def merge_css!(paths, options = {})
  merge_css paths, options.merge(raise: true)
end