Jump To:

  1. utils/dom.dataAttributeToDatasetKey(dataAttribute) ⇒ string
  2. utils/dom.setPositionClasses(parent, classes)
  3. utils/dom.resolveClasses(input) ⇒ Array.

utils/dom

utils/dom.dataAttributeToDatasetKey(dataAttribute) ⇒ string

Converts a data attribute name to its corresponding dataset property name.

Kind: static method of utils/dom
Returns: string - - The dataset property name (e.g., "uluDialog").

Param Type Description
dataAttribute string The data attribute name (e.g., "data-ulu-dialog").

utils/dom.setPositionClasses(parent, classes)

Sets up the positional classes that would come from the equal height module. Needs to be rerun by user when layout changes or new instances are added to the screen

  • Used for gutter crops
  • Used for rule placement
  • Devs Remember that default classes should match sass defaults

Kind: static method of utils/dom

Param Type Description
parent Node The grid parent <data-grid="">
classes Object Override the default equal heights classes

utils/dom.resolveClasses(input) ⇒ Array.<string>

Resolves a class input (string or array) into a consistent array of class names.

Kind: static method of utils/dom
Returns: Array.<string> - An array of class names. Returns an empty array for invalid or falsy input.

Param Type Description
input string | Array.<string> The class input, which can be a string, an array of strings, or any other value.

Example

resolveClassArray("fas fa-check  my-class"); // Returns ["fas", "fa-check", "my-class"]
resolveClassArray(["another-class", "yet-another-class"]); // Returns ["another-class", "yet-another-class"]
resolveClassArray("single-class"); // Returns ["single-class"]