You are here

public function Classes::getInternalClasses in GridStack 8.2

Returns the module feature CSS classes, not available at CSS frameworks.

File

src/Plugin/gridstack/stylizer/Classes.php, line 30

Class

Classes
Provides the classes styles.

Namespace

Drupal\gridstack\Plugin\gridstack\stylizer

Code

public function getInternalClasses() {
  $classes = $bg = $bg_pos = $padding = $min_height = $min_height_md = [];
  $min_height_lg = [];
  foreach ($this->opacity as $key) {
    $bg[] = 'bg-dark-' . $key;
  }
  foreach (array_keys(GridStackDefault::breakpoints()) as $key) {
    $min_height[] = 'mh-' . $key;
    $min_height_md[] = 'mh-md-' . $key;
    $min_height_lg[] = 'mh-lg-' . $key;
    $padding[] = 'p-' . $key;
  }
  $positions = [
    'center',
    'bottom',
    'bottom-left',
    'bottom-right',
    'left',
    'right',
    'top',
    'top-left',
    'top-right',
  ];
  foreach ($positions as $key) {
    $bg_pos[] = 'bg-' . $key;
  }
  $classes['background'] = $bg;
  $classes['bg_position'] = $bg_pos;
  $classes['min_height'] = $min_height;
  $classes['min_height_md'] = $min_height_md;
  $classes['min_height_lg'] = $min_height_lg;
  $classes['padding'] = $padding;
  return $classes;
}