@mixin auro_inset($auro-inset-spacing-options: none, xxxs, xxs, xs, sm, md, lg, xl, xxl, xxxl) { ... }
Description
This mixin is designed to return a series of pre-defined selectors based on the inset spacing design spec
DO NOT execute mixin, this is already included with the import of the file dependency
Dependency: $npm i alaskaairux/orion-design-tokens
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|
$auro-inset-spacing-options | defines value applied | String | none, xxxs, xxs, xs, sm, md, lg, xl, xxl, xxxl |
---|
Example
.util_insetXxxs {
+ }" data-collapsed="@mixin auro_inset($auro-inset-directions: "", --stretch, --squish, $auro-inset-spacing-options: none, xxxs, xxs, xs, sm, md, lg, xl, xxl, xxxl) { ... }">@mixin auro_inset($auro-inset-directions: "", --stretch, --squish, $auro-inset-spacing-options: none, xxxs, xxs, xs, sm, md, lg, xl, xxl, xxxl) { ... }
Description
This mixin is designed to return a series of pre-defined selectors based on the inset spacing design spec
DO NOT execute mixin, this is already included with the import of the file dependency
Dependency: $npm i alaskaairux/orion-design-tokens
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|
$auro-inset-directions | defines value | String | "", --stretch, --squish |
---|
$auro-inset-spacing-options | defines value applied | String | none, xxxs, xxs, xs, sm, md, lg, xl, xxl, xxxl |
---|
Example
.util_insetXxxs {
padding: 0.125rem;
}
.util_insetXxxs--stretch {
diff --git a/scripts/testBuild.scss b/scripts/testBuild.scss
index 90b66f3..471db5e 100644
--- a/scripts/testBuild.scss
+++ b/scripts/testBuild.scss
@@ -89,13 +89,13 @@ $prefix: true;
/*------------- general spacing -----------------*/
@import "./node_modules/@alaskaairux/orion-design-tokens/dist/tokens/SCSSVariableMap";
-// $auro-spacing-types: inline, stack;
-// $auro-spacing-options: none;
+$auro-spacing-types: inline;
+$auro-spacing-options: sm, md, lg;
@import "./src/utilityMixins/spacingUtility";
/*---------- inset generator ----------------*/
-// $auro-inset-spacing-options: none;
-// $auro-inset-directions:'';
+$auro-inset-spacing-options: sm, md, lg;
+$auro-inset-directions: --stretch;
@import "./src/utilityMixins/insetUtility";
@import './src/utilityClasses/responsive';
diff --git a/src/utilityMixins/_insetUtility.scss b/src/utilityMixins/_insetUtility.scss
index 65b3edf..172294e 100644
--- a/src/utilityMixins/_insetUtility.scss
+++ b/src/utilityMixins/_insetUtility.scss
@@ -19,6 +19,7 @@ $auro-inset-spacing-options: $auro-spacing-options !default;
///
/// **Dependency:** `$npm i alaskaairux/orion-design-tokens`
/// @group utility-layout
+/// @param {String} $auro-inset-directions ["", --stretch, --squish] defines value
/// @param {String} $auro-inset-spacing-options [none, xxxs, xxs, xs, sm, md, lg, xl, xxl, xxxl] defines value applied
/// @example css - Example output css
/// .util_insetXxxs {
@@ -39,7 +40,7 @@ $auro-inset-spacing-options: $auro-spacing-options !default;
/// @import "./node_modules/@alaskaairux/orion-design-tokens/dist/tokens/SCSSVariableMap";
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/utilityMixins/insetUtility";
-@mixin auro_inset($values: $auro-inset-spacing-options) {
+@mixin auro_inset($directions: $auro-inset-directions, $values: $auro-inset-spacing-options) {
@each $value in $values {
$map: map-keys($tokens);
$mapValue: auro_map-deep-get($tokens, #{$map}, $value);
@@ -73,8 +74,8 @@ $auro-inset-spacing-options: $auro-spacing-options !default;
}
@else {
- @for $i from 1 through length($auro-inset-directions) {
- $direction: nth($auro-inset-directions, $i);
+ @for $i from 1 through length($directions) {
+ $direction: nth($directions, $i);
#{$scope}.#{$prefix}util_inset#{auro_capitalize($value)}#{$direction} {
@if $direction == '' {