@import "../themes/ionic.globals";
@import "../themes/ionic.mixins";


// Element Space
// --------------------------------------------------
// Creates padding and margin attributes to be used on
// any element

$padding: var(--ion-padding, 16px);
$margin: var(--ion-margin, 16px);

// Padding
// --------------------------------------------------

[no-padding] {
  --padding-start: 0;
  --padding-end: 0;
  --padding-top: 0;
  --padding-bottom: 0;

  @include padding(0);
}

[padding] {
  --padding-start: #{$padding};
  --padding-end: #{$padding};
  --padding-top: #{$padding};
  --padding-bottom: #{$padding};

  @include padding($padding);
}

[padding-top] {
  --padding-top: #{$padding};

  @include padding($padding, null, null, null);
}

[padding-start] {
  --padding-start: #{$padding};

  @include padding-horizontal($padding, null);
}

[padding-end] {
  --padding-end: #{$padding};

  @include padding-horizontal(null, $padding);
}

[padding-bottom] {
  --padding-bottom: #{$padding};

  @include padding(null, null, $padding, null);
}

[padding-vertical] {
  --padding-top: #{$padding};
  --padding-bottom: #{$padding};

  @include padding($padding, null, $padding, null);
}

[padding-horizontal] {
  --padding-start: #{$padding};
  --padding-end: #{$padding};

  @include padding-horizontal($padding);
}


// Margin
// --------------------------------------------------

[no-margin] {
  --margin-start: 0;
  --margin-end: 0;
  --margin-top: 0;
  --margin-bottom: 0;

  @include margin(0);
}

[margin] {
  --margin-start: #{$margin};
  --margin-end: #{$margin};
  --margin-top: #{$margin};
  --margin-bottom: #{$margin};

  @include margin($margin);
}

[margin-top] {
  --margin-top: #{$margin};

  @include margin($margin, null, null, null);
}


[margin-start] {
  --margin-start: #{$margin};

  @include margin-horizontal($margin, null);
}

[margin-end] {
  --margin-end: #{$margin};

  @include margin-horizontal(null, $margin);
}

[margin-bottom] {
  --margin-bottom: #{$margin};

  @include margin(null, null, $margin, null);
}

[margin-vertical] {
  --margin-top: #{$margin};
  --margin-bottom: #{$margin};

  @include margin($margin, null, $margin, null);
}

[margin-horizontal] {
  --margin-start: #{$margin};
  --margin-end: #{$margin};

  @include margin-horizontal($margin);
}
