@use '../1-variables/spacing.variables' as spacing;

/*
* Spacing overrides
* This .scss loop will create margin & padding helpers classes
*/

$spacing-units: (
	0: spacing.$spacing-0,
	4: spacing.$spacing-1,
	8: spacing.$spacing-2,
	12: spacing.$spacing-3,
	16: spacing.$spacing-4,
	24: spacing.$spacing-5,
	32: spacing.$spacing-6,
	40: spacing.$spacing-7,
	48: spacing.$spacing-8,
	64: spacing.$spacing-9,
);

$sides: (top, bottom, left, right);

@each $unit, $spacing in $spacing-units {
	@each $side in $sides {
		.ontario-margin-#{$side}-#{$unit}-\! {
			margin-#{$side}: #{$spacing};
		}

		.ontario-padding-#{$side}-#{$unit}-\! {
			padding-#{$side}: #{$spacing};
		}
	}
}

/*
*  Padding overrides
*/

// 0
.ontario-padding-top-0-\! {
  padding-top: spacing.$spacing-0 !important;
}

.ontario-padding-bottom-0-\! {
  padding-bottom: spacing.$spacing-0 !important;
}

.ontario-padding-right-0-\! {
  padding-right: spacing.$spacing-0 !important;
}

.ontario-padding-left-0-\! {
  padding-left: spacing.$spacing-0 !important;
}

// 4
.ontario-padding-top-4-\! {
  padding-top: spacing.$spacing-1 !important;
}

.ontario-padding-bottom-4-\! {
  padding-bottom: spacing.$spacing-1 !important;
}

.ontario-padding-right-4-\! {
  padding-right: spacing.$spacing-1 !important;
}

.ontario-padding-left-4-\! {
  padding-left: spacing.$spacing-1 !important;
}

// 8
.ontario-padding-top-8-\! {
  padding-top: spacing.$spacing-2 !important;
}

.ontario-padding-bottom-8-\! {
  padding-bottom: spacing.$spacing-2 !important;
}

.ontario-padding-right-8-\! {
  padding-right: spacing.$spacing-2 !important;
}

.ontario-padding-left-8-\! {
  padding-left: spacing.$spacing-2 !important;
}

// 12
.ontario-padding-top-12-\! {
  padding-top: spacing.$spacing-3 !important;
}

.ontario-padding-bottom-12-\! {
  padding-bottom: spacing.$spacing-3 !important;
}

.ontario-padding-right-12-\! {
  padding-right: spacing.$spacing-3 !important;
}

.ontario-padding-left-12-\! {
  padding-left: spacing.$spacing-3 !important;
}

// 16
.ontario-padding-top-16-\! {
  padding-top: spacing.$spacing-4 !important;
}

.ontario-padding-bottom-16-\! {
  padding-bottom: spacing.$spacing-4 !important;
}

.ontario-padding-right-16-\! {
  padding-right: spacing.$spacing-4 !important;
}

.ontario-padding-left-16-\! {
  padding-left: spacing.$spacing-4 !important;
}

// 24
.ontario-padding-top-24-\! {
  padding-top: spacing.$spacing-5 !important;
}

.ontario-padding-bottom-24-\! {
  padding-bottom: spacing.$spacing-5 !important;
}

.ontario-padding-right-24-\! {
  padding-right: spacing.$spacing-5 !important;
}

.ontario-padding-left-24-\! {
  padding-left: spacing.$spacing-5 !important;
}

// 32
.ontario-padding-top-32-\! {
  padding-top: spacing.$spacing-6 !important;
}

.ontario-padding-bottom-32-\! {
  padding-bottom: spacing.$spacing-6 !important;
}

.ontario-padding-right-32-\! {
  padding-right: spacing.$spacing-6 !important;
}

.ontario-padding-left-32-\! {
  padding-left: spacing.$spacing-6 !important;
}

// 40
.ontario-padding-top-40-\! {
  padding-top: spacing.$spacing-7 !important;
}

.ontario-padding-bottom-40-\! {
  padding-bottom: spacing.$spacing-7 !important;
}

.ontario-padding-right-40-\! {
  padding-right: spacing.$spacing-7 !important;
}

.ontario-padding-left-40-\! {
  padding-left: spacing.$spacing-7 !important;
}

// 48
.ontario-padding-top-48-\! {
  padding-top: spacing.$spacing-8 !important;
}

.ontario-padding-bottom-48-\! {
  padding-bottom: spacing.$spacing-8 !important;
}

.ontario-padding-right-48-\! {
  padding-right: spacing.$spacing-8 !important;
}

.ontario-padding-left-48-\! {
  padding-left: spacing.$spacing-8 !important;
}

// 64
.ontario-padding-top-64-\! {
  padding-top: spacing.$spacing-9 !important;
}

.ontario-padding-bottom-64-\! {
  padding-bottom: spacing.$spacing-9 !important;
}

.ontario-padding-right-64-\! {
  padding-right: spacing.$spacing-9 !important;
}

.ontario-padding-left-64-\! {
  padding-left: spacing.$spacing-9 !important;
}

// 80
.ontario-padding-top-80-\! {
  padding-top: spacing.$spacing-10 !important;
}

.ontario-padding-bottom-80-\! {
  padding-bottom: spacing.$spacing-10 !important;
}

.ontario-padding-right-80-\! {
  padding-right: spacing.$spacing-10 !important;
}

.ontario-padding-left-80-\! {
  padding-left: spacing.$spacing-10 !important;
}


/////////////////////////
/// Margin overrides ///
/////////////////////////

// 0
.ontario-margin-top-0-\! {
  margin-top: spacing.$spacing-0 !important;
}

.ontario-margin-bottom-0-\! {
  margin-bottom: spacing.$spacing-0 !important;
}

.ontario-margin-right-0-\! {
  margin-right: spacing.$spacing-0 !important;
}

.ontario-margin-left-0-\! {
  margin-left: spacing.$spacing-0 !important;
}

// 4
.ontario-margin-top-4-\! {
  margin-top: spacing.$spacing-1 !important;
}

.ontario-margin-bottom-4-\! {
  margin-bottom: spacing.$spacing-1 !important;
}

.ontario-margin-right-4-\! {
  margin-right: spacing.$spacing-1 !important;
}

.ontario-margin-left-4-\! {
  margin-left: spacing.$spacing-1 !important;
}

// 8
.ontario-margin-top-8-\! {
  margin-top: spacing.$spacing-2 !important;
}

.ontario-margin-bottom-8-\! {
  margin-bottom: spacing.$spacing-2 !important;
}

.ontario-margin-right-8-\! {
  margin-right: spacing.$spacing-2 !important;
}

.ontario-margin-left-8-\! {
  margin-left: spacing.$spacing-2 !important;
}

// 12
.ontario-margin-top-12-\! {
  margin-top: spacing.$spacing-3 !important;
}

.ontario-margin-bottom-12-\! {
  margin-bottom: spacing.$spacing-3 !important;
}

.ontario-margin-right-12-\! {
  margin-right: spacing.$spacing-3 !important;
}

.ontario-margin-left-12-\! {
  margin-left: spacing.$spacing-3 !important;
}

// 16
.ontario-margin-top-16-\! {
  margin-top: spacing.$spacing-4 !important;
}

.ontario-margin-bottom-16-\! {
  margin-bottom: spacing.$spacing-4 !important;
}

.ontario-margin-right-16-\! {
  margin-right: spacing.$spacing-4 !important;
}

.ontario-margin-left-16-\! {
  margin-left: spacing.$spacing-4 !important;
}

// 24
.ontario-margin-top-24-\! {
  margin-top: spacing.$spacing-5 !important;
}

.ontario-margin-bottom-24-\! {
  margin-bottom: spacing.$spacing-5 !important;
}

.ontario-margin-right-24-\! {
  margin-right: spacing.$spacing-5 !important;
}

.ontario-margin-left-24-\! {
  margin-left: spacing.$spacing-5 !important;
}

// 32
.ontario-margin-top-32-\! {
  margin-top: spacing.$spacing-6 !important;
}

.ontario-margin-bottom-32-\! {
  margin-bottom: spacing.$spacing-6 !important;
}

.ontario-margin-right-32-\! {
  margin-right: spacing.$spacing-6 !important;
}

.ontario-margin-left-32-\! {
  margin-left: spacing.$spacing-6 !important;
}

// 40
.ontario-margin-top-40-\! {
  margin-top: spacing.$spacing-7 !important;
}

.ontario-margin-bottom-40-\! {
  margin-bottom: spacing.$spacing-7 !important;
}

.ontario-margin-right-40-\! {
  margin-right: spacing.$spacing-7 !important;
}

.ontario-margin-left-40-\! {
  margin-left: spacing.$spacing-7 !important;
}

// 48
.ontario-margin-top-48-\! {
  margin-top: spacing.$spacing-8 !important;
}

.ontario-margin-bottom-48-\! {
  margin-bottom: spacing.$spacing-8 !important;
}

.ontario-margin-right-48-\! {
  margin-right: spacing.$spacing-8 !important;
}

.ontario-margin-left-48-\! {
  margin-left: spacing.$spacing-8 !important;
}

// 64
.ontario-margin-top-64-\! {
  margin-top: spacing.$spacing-9 !important;
}

.ontario-margin-bottom-64-\! {
  margin-bottom: spacing.$spacing-9 !important;
}

.ontario-margin-right-64-\! {
  margin-right: spacing.$spacing-9 !important;
}

.ontario-margin-left-64-\! {
  margin-left: spacing.$spacing-9 !important;
}

// 80
.ontario-margin-top-80-\! {
  margin-top: spacing.$spacing-10 !important;
}

.ontario-margin-bottom-80-\! {
  margin-bottom: spacing.$spacing-10 !important;
}

.ontario-margin-right-80-\! {
  margin-right: spacing.$spacing-10 !important;
}

.ontario-margin-left-80-\! {
  margin-left: spacing.$spacing-10 !important;
}
