Sha256: d7d895f966c8ae90c462d759a5e5f186c10a544e1d5261a5b71d66ad4f967095

Contents?: true

Size: 1.56 KB

Versions: 129

Compression:

Stored size: 1.56 KB

Contents

@import "../tokens/spacing";

$space_classes: (
	xxs: $space_xxs,
	xs: $space_xs,
	sm: $space_sm,
	md: $space_md,
	lg: $space_lg,
	xl: $space_xl,
	none: 0,
  auto: auto,
  initial: initial,
  inherit: inherit
);

$positions: (
	m: "margin",
	mr: "margin-right",
	ml: "margin-left",
	mt: "margin-top",
	mb: "margin-bottom",
	mx: ("margin-left", "margin-right"),
	my: ("margin-top", "margin-bottom"),
	p: "padding",
	pr: "padding-right",
	pl: "padding-left",
	pt: "padding-top",
	pb: "padding-bottom",
	px: ("padding-left", "padding-right"),
	py: ("padding-top", "padding-bottom")
);

@each $position_name, $position in $positions {
	@each $space_name, $space in $space_classes {
		.#{$position_name}_#{$space_name} {
			@if type-of($position)=="list" {
				@each $coordinate in $position {
					#{$coordinate}: #{$space} !important;
				}
			}
			@else {
				#{$position}: #{$space} !important;
			}
		}
	}
}

@each $size, $size_value in $breakpoints_max_only {
  @each $position_name, $position in $positions {
    @each $space_name, $space in $space_classes {
        $min_size: map-get($size_value, "min");
        $max_size: map-get($size_value, "max");
        .#{$position_name}_#{$size}_#{$space_name} {
          @if type-of($position)=="list" {
            @each $coordinate in $position {
              @include break_at( $max_size) {
              #{$coordinate}: #{$space} !important;
              }
            }
          }
          @else {
            @include break_at( $max_size) {
              #{$position}: #{$space} !important;
            }
          }
        }
    }
  }
}

Version data entries

129 entries across 129 versions & 1 rubygems

Version Path
playbook_ui-12.26.0 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.25.0.pre.alpha.railsmultilevelimprovements785 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.25.0.pre.alpha.railsmultilevelimprovements780 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.25.0.pre.alpha.PLAY818multilevelrebuild779 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.25.0.pre.alpha.railsmultilevelimprovements776 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.25.0.pre.alpha.PLAY818multilevelrebuild774 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.25.0.pre.alpha.PLAY818multilevelrebuild773 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.25.0.pre.alpha.PLAY818multilevelrebuild770 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.25.0.pre.alpha.play822bolddefaultfortitle3764 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.25.0.pre.alpha.PLAY733DetailKit761 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.25.0.pre.alpha.railsmultilevelimprovements758 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.25.0 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.24.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown756 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.24.0.pre.alpha.play824753 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.24.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown752 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.24.0.pre.alpha.play824751 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.24.0.pre.alpha.railsmultilevelimprovements749 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.24.0.pre.alpha.play824745 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.24.0.pre.alpha.railsmultilevelimprovements742 app/pb_kits/playbook/utilities/_spacing.scss
playbook_ui-12.24.0.pre.alpha.railsmultilevelimprovements741 app/pb_kits/playbook/utilities/_spacing.scss