////////////////////////////////////////////////////////////////////////////////////
// Generator. //////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
//
// This file is meant to create all the utility classes we need. Some of them are
// also being generated with responsiveness in mind.
// Read more about its parameters in config/import.scss

@import 'import';

@include initialize-generator(
  $breakpoints,
  (
    'color',
    'color',
    ('transparent': transparent, 'current': currentColor),
    $colors,
    false
  ),
  (
    'bg',
    'background-color',
    ('transparent': transparent, 'current': currentColor),
    $colors,
    false
  ),
  (
    'border',
    'border-color',
    ('transparent': transparent, 'current': currentColor),
    $colors,
    false
  ),
  (
    'opacity',
    'opacity',
    ('100': 1, '75': 0.75, '50': 0.5, '25': 0.25, '0': 0),
    (),
    true
  ),
  (
    'cursor',
    'cursor',
    (
      'auto': auto,
      'default': default,
      'pointer': pointer,
      'wait': wait,
      'text': text,
      'move': move,
      'not-allowed': not-allowed
    ),
    (),
    false
  ),
  ('pointer-events', 'pointer-events', ('auto': auto, 'none': none), (), false),
  (
    'radius',
    'border-radius',
    ('default': $br-default, '0': 0, 'full': 9999px),
    (),
    true
  ),
  (
    'bg',
    'background-position',
    (
      'bottom': bottom,
      'center': center,
      'left': left,
      'right': right,
      'top': top,
      'left-bottom': left bottom,
      'left-top': left top,
      'right-bottom': right bottom,
      'right-top': right top
    ),
    (),
    false
  ),
  (
    'bg',
    'background-repeat',
    (
      'repeat': repeat,
      'repeat-x': repeat-x,
      'repeat-y': repeat-y,
      'no-repeat': no-repeat
    ),
    (),
    false
  ),
  (
    'bg',
    'background-size',
    ('auto': auto, 'cover': cover, 'contain': contain),
    (),
    false
  ),
  (
    'bg',
    'background-attachment',
    ('fixed': fixed, 'local': local, 'scroll': scroll),
    (),
    false
  ),
  (
    'flex',
    'flex-direction',
    (
      'row': row,
      'col': column,
      'row-reverse': row-reverse,
      'col-reverse': column-reverse
    ),
    (),
    true
  ),
  (
    'flex',
    'flex-wrap',
    ('wrap': wrap, 'nowrap': nowrap, 'wrap-reverse': wrap-reverse),
    (),
    true
  ),
  (
    'items',
    'align-items',
    (
      'stretch': stretch,
      'start': flex-start,
      'center': center,
      'end': flex-end,
      'baseline': baseline
    ),
    (),
    true
  ),
  (
    'content',
    'align-content',
    (
      'start': flex-start,
      'center': center,
      'end': flex-end,
      'between': space-between,
      'around': space-around
    ),
    (),
    true
  ),
  (
    'self',
    'align-self',
    (
      'auto': auto,
      'start': flex-start,
      'center': center,
      'end': flex-end,
      'stretch': stretch
    ),
    (),
    true
  ),
  (
    'justify',
    'justify-content',
    (
      'start': flex-start,
      'center': center,
      'end': flex-end,
      'between': space-between,
      'around': space-around
    ),
    (),
    true
  ),
  (
    'flex',
    'flex',
    ('initial': 0 auto, '1': 1 1 0%, 'auto': 1 1 auto, 'none': none),
    (),
    true
  ),
  ('grow', 'flex-grow', ('0': 0, '1': 1), (), true),
  ('shrink', 'flex-shrink', ('0': 0, '1': 1), (), true),
  ('order', 'order', ('first': -9999, 'last': 9999, '0': 0), (), true),
  ('gap', 'grid-gap', ('0': 0), $spacing-units, true),
  (
    'grid-cols',
    'grid-template-columns',
    (
      'none': none,
      '1': repeat(1, minmax(0, 1fr)),
      '2': repeat(2, minmax(0, 1fr)),
      '3': repeat(3, minmax(0, 1fr)),
      '4': repeat(4, minmax(0, 1fr)),
      '5': repeat(5, minmax(0, 1fr)),
      '6': repeat(6, minmax(0, 1fr)),
      '7': repeat(7, minmax(0, 1fr)),
      '8': repeat(8, minmax(0, 1fr))
    ),
    (),
    true
  ),
  (
    'grid-rows',
    'grid-template-rows',
    (
      'none': none,
      '1': repeat(1, minmax(0, 1fr)),
      '2': repeat(2, minmax(0, 1fr)),
      '3': repeat(3, minmax(0, 1fr)),
      '4': repeat(4, minmax(0, 1fr))
    ),
    (),
    true
  ),
  (
    'grid-flow',
    'grid-auto-flow',
    (
      'row': row,
      'col': column,
      'row-dense': row dense,
      'col-dense': column dense
    ),
    (),
    true
  ),
  (
    'grid-items',
    'justify-items',
    ('start': start, 'end': end, 'center': center, 'stretch': stretch),
    (),
    true
  ),
  (
    'float',
    'float',
    ('left': left, 'right': right, 'none': none, 'unset': unset),
    (),
    true
  ),
  (
    'box',
    'box-sizing',
    ('border': border-box, 'content': content-box),
    (),
    false
  ),
  ('table', 'table-layout', ('auto': auto, 'fixed': fixed), (), false),
  (
    'border',
    'border-style',
    ('solid': solid, 'dashed': dashed, 'dotted': dotted, 'none': none),
    (),
    true
  ),
  (
    'border',
    'border-width',
    ('0': 0, '1': 1px, '2': 2px, '3': 3px, '4': 4px, '8': 8px),
    (),
    true
  ),
  (
    'border',
    'border-top-width',
    ('t-0': 0, 't-1': 1px, 't-2': 2px, 't-3': 3px, 't-4': 4px, 't-8': 8px),
    (),
    true
  ),
  (
    'border',
    'border-bottom-width',
    ('b-0': 0, 'b-1': 1px, 'b-2': 2px, 'b-3': 3px, 'b-4': 4px, 'b-8': 8px),
    (),
    true
  ),
  (
    'border',
    'border-left-width',
    ('l-0': 0, 'l-1': 1px, 'l-2': 2px, 'l-3': 3px, 'l-4': 4px, 'l-8': 8px),
    (),
    true
  ),
  (
    'border',
    'border-right-width',
    ('r-0': 0, 'r-1': 1px, 'r-2': 2px, 'r-3': 3px, 'r-4': 4px, 'r-8': 8px),
    (),
    true
  ),
  (
    'top',
    'top',
    (
      'auto': auto,
      'unset': unset,
      '0': 0,
      '1': $su-1,
      '2': $su-2,
      '3': $su-3,
      '4': $su-4
    ),
    (),
    true
  ),
  (
    '-top',
    'top',
    ('1': -$su-1, '2': -$su-2, '3': -$su-3, '4': -$su-4),
    (),
    true
  ),
  (
    'bottom',
    'bottom',
    (
      'auto': auto,
      'unset': unset,
      '0': 0,
      '1': $su-1,
      '2': $su-2,
      '3': $su-3,
      '4': $su-4
    ),
    (),
    true
  ),
  (
    '-bottom',
    'bottom',
    ('1': -$su-1, '2': -$su-2, '3': -$su-3, '4': -$su-4),
    (),
    true
  ),
  (
    'left',
    'left',
    (
      'auto': auto,
      'unset': unset,
      '0': 0,
      '1': $su-1,
      '2': $su-2,
      '3': $su-3,
      '4': $su-4
    ),
    (),
    true
  ),
  (
    '-left',
    'left',
    ('1': -$su-1, '2': -$su-2, '3': -$su-3, '4': -$su-4),
    (),
    true
  ),
  (
    'right',
    'right',
    (
      'auto': auto,
      'unset': unset,
      '0': 0,
      '1': $su-1,
      '2': $su-2,
      '3': $su-3,
      '4': $su-4
    ),
    (),
    true
  ),
  (
    '-right',
    'right',
    ('1': -$su-1, '2': -$su-2, '3': -$su-3, '4': -$su-4),
    (),
    true
  ),
  (
    'z',
    'z-index',
    (
      'negative': -1,
      '0': 0,
      '10': 10,
      '20': 20,
      '30': 30,
      '40': 40,
      '50': 50,
      'auto': auto
    ),
    (),
    false
  ),
  (
    'overflow',
    'overflow',
    ('auto': auto, 'visible': visible, 'scroll': scroll, 'hidden': hidden),
    (),
    true
  ),
  (
    'overflow-x',
    'overflow-x',
    ('auto': auto, 'visible': visible, 'scroll': scroll, 'hidden': hidden),
    (),
    true
  ),
  (
    'overflow-y',
    'overflow-y',
    ('auto': auto, 'visible': visible, 'scroll': scroll, 'hidden': hidden),
    (),
    true
  ),
  (
    'w',
    'width',
    (
      '0': 0,
      '25': 25%,
      '50': 50%,
      '100': 100%,
      'auto': auto,
      'full': 100vw,
      'max': max-content
    ),
    (),
    true
  ),
  ('min-w', 'min-width', ('0': 0, '100': 100%), (), true),
  (
    'h',
    'height',
    ('0': 0, '25': 25%, '50': 50%, '100': 100%, 'auto': auto, 'full': 100vh),
    (),
    true
  ),
  ('min-h', 'min-height', ('0': 0, '100': 100%, 'full': 100vh), (), true),
  ('max-h', 'max-height', ('0': 0, '100': 100%, 'full': 100vh), (), true),
  (
    'max-w',
    'max-width',
    ('0': 0, '25': 25%, '50': 50%, '75': 75%, '100': 100%),
    (),
    true
  ),
  ('m', 'margin', ('auto': auto, 'unset': unset, '0': 0), $spacing-units, true),
  ('-m', 'margin', $negative-spacing-units, (), true),
  (
    'my',
    ('margin-top', 'margin-bottom'),
    ('auto': auto, 'unset': unset, '0': 0),
    $spacing-units,
    true
  ),
  ('-my', ('margin-top', 'margin-bottom'), $negative-spacing-units, (), true),
  (
    'mx',
    ('margin-left', 'margin-right'),
    ('auto': auto, 'unset': unset, '0': 0),
    $spacing-units,
    true
  ),
  ('-mx', ('margin-left', 'margin-right'), $negative-spacing-units, (), true),
  (
    'mt',
    'margin-top',
    ('auto': auto, 'unset': unset, '0': 0),
    $spacing-units,
    true
  ),
  ('-mt', 'margin-top', $negative-spacing-units, (), true),
  (
    'mb',
    'margin-bottom',
    ('auto': auto, 'unset': unset, '0': 0),
    $spacing-units,
    true
  ),
  ('-mb', 'margin-bottom', $negative-spacing-units, (), true),
  (
    'ml',
    'margin-left',
    ('auto': auto, 'unset': unset, '0': 0),
    $spacing-units,
    true
  ),
  ('-ml', 'margin-left', $negative-spacing-units, (), true),
  (
    'mr',
    'margin-right',
    ('auto': auto, 'unset': unset, '0': 0),
    $spacing-units,
    true
  ),
  ('-mr', 'margin-right', $negative-spacing-units, (), true),
  ('p', 'padding', ('0': 0, 'unset': unset), $spacing-units, true),
  (
    'py',
    ('padding-top', 'padding-bottom'),
    ('0': 0, 'unset': unset),
    $spacing-units,
    true
  ),
  (
    'px',
    ('padding-left', 'padding-right'),
    ('0': 0, 'unset': unset),
    $spacing-units,
    true
  ),
  ('pt', 'padding-top', ('0': 0, 'unset': unset), $spacing-units, true),
  ('pb', 'padding-bottom', ('0': 0, 'unset': unset), $spacing-units, true),
  ('pl', 'padding-left', ('0': 0, 'unset': unset), $spacing-units, true),
  ('pr', 'padding-right', ('0': 0, 'unset': unset), $spacing-units, true),
  (
    'ff',
    'font-family',
    ('default': $ff-default, 'accent': $ff-accent),
    (),
    false
  ),
  (
    'fs',
    'font-size',
    (
      'xs': $fs-xs,
      's': $fs-s,
      'base': $fs-base,
      'l': $fs-l,
      'xl': $fs-xl,
      '2xl': $fs-2xl,
      '3xl': $fs-3xl,
      '4xl': $fs-4xl,
      '5xl': $fs-5xl
    ),
    (),
    true
  ),
  ('lh', 'line-height', ('tight': $lh-tight, 'base': $lh-base), (), true),
  (
    'fw',
    'font-weight',
    (
      'normal': $fw-normal,
      'medium': $fw-medium,
      'bold': $fw-bold,
      'heavy': $fw-heavy
    ),
    (),
    false
  ),
  (
    'list',
    'list-style-type',
    ('none': none, 'disc': disc, 'decimal': decimal),
    (),
    false
  ),
  (
    'text',
    'text-decoration',
    ('underline': underline, 'none': none),
    (),
    false
  ),
  (
    'text',
    'text-transform',
    (
      'uppercase': uppercase,
      'lowercase': lowercase,
      'capitalize': capitalize,
      'normal': none
    ),
    (),
    false
  ),
  (
    'align',
    'text-align',
    ('left': left, 'center': center, 'right': right, 'justify': justify),
    (),
    true
  ),
  (
    'align',
    'vertical-align',
    (
      'baseline': baseline,
      'top': top,
      'middle': middle,
      'bottom': bottom,
      'text-top': text-top,
      'text-bottom': text-bottom
    ),
    (),
    true
  ),
  (
    'whitespace',
    'white-space',
    ('normal': normal, 'nowrap': nowrap, 'pre': pre),
    (),
    true
  ),
  ('shadow', 'box-shadow', ('none': none), (), true),
  ('outline', 'outline', ('none': none), (), false),
  (
    null,
    'display',
    (
      'hidden': none,
      'block': block,
      'inline': inline,
      'inline-block': inline-block,
      'flex': flex,
      'inline-flex': inline-flex,
      'grid': grid
    ),
    (),
    true,
    null
  ),
  (
    null,
    'visibility',
    ('visible': visible, 'invisible': hidden),
    (),
    true,
    null
  ),
  (null, 'clear', ('clear': both), (), false, null),
  (
    null,
    'position',
    (
      'static': static,
      'absolute': absolute,
      'fixed': fixed,
      'sticky': sticky,
      'relative': relative
    ),
    (),
    true,
    null
  ),
  (null, 'all', ('reset': unset), (), false, null)
);
