Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"onchange": "^7.0.2",
"prettier": "^2.8.7",
"react-test-renderer": "18.3.1",
"sass-migrator": "^2.3.1",
"storybook": "^8.3.6",
"style-loader": "^4.0.0",
"svgo": "^1.3.2",
Expand Down
4 changes: 3 additions & 1 deletion packages/gamut-styles/core.scss
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
@import "core/index";
@use "core/index";

@forward "utils";
36 changes: 19 additions & 17 deletions packages/gamut-styles/core/_reboot.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../utils";

// https://raw.githubusercontent.com/twbs/bootstrap/v4-dev/scss/_reboot.scss

// stylelint-disable at-rule-no-vendor-prefix, declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
Expand Down Expand Up @@ -61,12 +63,12 @@ section {

body {
margin: 0; // 1
font-family: $font-family-base;
font-weight: $font-weight-base;
line-height: $line-height-base;
color: $color-body;
font-family: utils.$font-family-base;
font-weight: utils.$font-weight-base;
line-height: utils.$line-height-base;
color: utils.$color-body;
text-align: left; // 3
background-color: $bg-body; // 2
background-color: utils.$bg-body; // 2
}

// Suppress the focus outline on elements that cannot be accessed via keyboard.
Expand Down Expand Up @@ -105,7 +107,7 @@ h4,
h5,
h6 {
margin-top: 0;
margin-bottom: $margin-bottom-headings;
margin-bottom: utils.$margin-bottom-headings;
}
// stylelint-enable selector-list-comma-newline-after

Expand All @@ -115,7 +117,7 @@ h6 {
// bottom margin to use `rem` units instead of `em`.
p {
margin-top: 0;
margin-bottom: $margin-bottom-paragraph;
margin-bottom: utils.$margin-bottom-paragraph;
}

// Abbreviations
Expand Down Expand Up @@ -155,7 +157,7 @@ ul ol {
}

dt {
font-weight: $font-weight-dt;
font-weight: utils.$font-weight-dt;
}

dd {
Expand All @@ -174,12 +176,12 @@ dfn {
// stylelint-disable font-weight-notation
b,
strong {
font-weight: $font-weight-bold; // Add the correct font weight in Chrome, Edge, and Safari
font-weight: utils.$font-weight-bold; // Add the correct font weight in Chrome, Edge, and Safari
}
// stylelint-enable font-weight-notation

small {
font-size: $font-size-small; // Add the correct font size in all browsers
font-size: utils.$font-size-small; // Add the correct font size in all browsers
}

//
Expand Down Expand Up @@ -207,13 +209,13 @@ sup {
//

a {
color: $color-link;
text-decoration: $decoration-link;
color: utils.$color-link;
text-decoration: utils.$decoration-link;
background-color: transparent; // Remove the gray background on active links in IE 10.
-webkit-text-decoration-skip: objects; // Remove gaps in links underline in iOS 8+ and Safari 8+.

&:hover {
text-decoration: $hover-decoration-link;
text-decoration: utils.$hover-decoration-link;
}
}

Expand Down Expand Up @@ -295,9 +297,9 @@ table {
}

caption {
padding-top: $spacer;
padding-bottom: $spacer;
color: $spacer;
padding-top: utils.$spacer;
padding-bottom: utils.$spacer;
color: utils.$spacer;
text-align: left;
caption-side: bottom;
}
Expand All @@ -315,7 +317,7 @@ th {
label {
// Allow labels to use `margin` for spacing.
display: inline-block;
margin-bottom: $margin-bottom-label;
margin-bottom: utils.$margin-bottom-label;
}

// Remove the default `border-radius` that macOS Chrome adds.
Expand Down
24 changes: 13 additions & 11 deletions packages/gamut-styles/core/_typography.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../utils";

// https://raw.githubusercontent.com/twbs/bootstrap/v4-dev/scss/_type.scss

h1,
Expand All @@ -6,31 +8,31 @@ h3,
h4,
h5,
h6 {
margin-bottom: $margin-bottom-headings;
font-weight: $font-weight-headings;
line-height: $line-height-headings;
margin-bottom: utils.$margin-bottom-headings;
font-weight: utils.$font-weight-headings;
line-height: utils.$line-height-headings;
}

h1 {
font-size: $font-size-h1;
font-size: utils.$font-size-h1;
}
h2 {
font-size: $font-size-h2;
font-size: utils.$font-size-h2;
}
h3 {
font-size: $font-size-h3;
font-size: utils.$font-size-h3;
}
h4 {
font-size: $font-size-h4;
font-size: utils.$font-size-h4;
}
h5 {
font-size: $font-size-h5;
font-size: utils.$font-size-h5;
}
h6 {
font-size: $font-size-h6;
font-size: utils.$font-size-h6;
}

small {
font-size: $font-size-small;
font-weight: $font-weight-normal;
font-size: utils.$font-size-small;
font-weight: utils.$font-weight-normal;
}
8 changes: 4 additions & 4 deletions packages/gamut-styles/core/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../utils";
@import "reboot";
@import "fonts";
@import "typography";
@use "../utils";
@use "reboot";
@use "fonts";
@use "typography";
2 changes: 1 addition & 1 deletion packages/gamut-styles/utils.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import "utils/index";
@forward "utils/index";
6 changes: 3 additions & 3 deletions packages/gamut-styles/utils/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// import order is unfortunately important here
// variables needs to access functions, and mixins needs to access variables
@import "functions/index";
@import "variables/index";
@import "mixins/index";
@forward "functions/index";
@forward "variables/index";
@forward "mixins/index";
12 changes: 6 additions & 6 deletions packages/gamut-styles/utils/mixins/index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "font-smoothing";
@import "no-select";
@import "responsive";
@import "shadow";
@import "sr-only";
@import "legacy";
@forward "font-smoothing";
@forward "no-select";
@forward "responsive";
@forward "shadow";
@forward "sr-only";
@forward "legacy";
8 changes: 5 additions & 3 deletions packages/gamut-styles/utils/mixins/legacy.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "responsive";

// Legacy Helper mixins

// these variables should be located in ../variables
Expand All @@ -8,19 +10,19 @@ $bp-tablet: 736px;
$bp-desktop: 960px;

@mixin device-phone {
@include screen-size-between($bp-phone, $bp-tablet - 1) {
@include responsive.screen-size-between($bp-phone, $bp-tablet - 1) {
@content;
}
}

@mixin device-tablet {
@include screen-size-between($bp-tablet, $bp-desktop - 1) {
@include responsive.screen-size-between($bp-tablet, $bp-desktop - 1) {
@content;
}
}

@mixin device-desktop {
@include screen-size-gte($bp-desktop) {
@include responsive.screen-size-gte($bp-desktop) {
@content;
}
}
Expand Down
6 changes: 4 additions & 2 deletions packages/gamut-styles/utils/variables/_base.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@use "colors";

$base-unit: 1rem;
$spacer: $base-unit;
$box-shadow: 0 1px 4px 0 $color-shadow;
$box-shadow-hovered: 0 4px 10px 0 $color-shadow;
$box-shadow: 0 1px 4px 0 colors.$color-shadow;
$box-shadow-hovered: 0 4px 10px 0 colors.$color-shadow;
$height-header: 4rem;
57 changes: 29 additions & 28 deletions packages/gamut-styles/utils/variables/_colors.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:color";
// NOTE: When updating, make sure you also update the gamut-styles/variables/index.js file

// =======================================
Expand Down Expand Up @@ -41,18 +42,18 @@ $color-shadow: rgba($color-black, 0.15);

$platform-mint-500: #37c3be;

$platform-mint-600: mix($color-black, $platform-mint-500, 20%);
$platform-mint-700: mix($color-black, $platform-mint-500, 40%);
$platform-mint-600: color.mix($color-black, $platform-mint-500, 20%);
$platform-mint-700: color.mix($color-black, $platform-mint-500, 40%);

$platform-purple-500: #69639a;

$platform-purple-200: mix($color-white, $platform-purple-500, 60%);
$platform-purple-300: mix($color-white, $platform-purple-500, 40%);
$platform-purple-400: mix($color-white, $platform-purple-500, 20%);
$platform-purple-600: mix($color-black, $platform-purple-500, 20%);
$platform-purple-700: mix($color-black, $platform-purple-500, 40%);
$platform-purple-800: mix($color-black, $platform-purple-500, 60%);
$platform-purple-900: mix($color-black, $platform-purple-500, 80%);
$platform-purple-200: color.mix($color-white, $platform-purple-500, 60%);
$platform-purple-300: color.mix($color-white, $platform-purple-500, 40%);
$platform-purple-400: color.mix($color-white, $platform-purple-500, 20%);
$platform-purple-600: color.mix($color-black, $platform-purple-500, 20%);
$platform-purple-700: color.mix($color-black, $platform-purple-500, 40%);
$platform-purple-800: color.mix($color-black, $platform-purple-500, 60%);
$platform-purple-900: color.mix($color-black, $platform-purple-500, 80%);

// =======================================
// EDITOR COLORS
Expand Down Expand Up @@ -176,75 +177,75 @@ $deprecated-color-black: #000000;

$deprecated-gamut-purple-500: #69639a;

$deprecated-gamut-purple-100: mix(
$deprecated-gamut-purple-100: color.mix(
$color-white,
$deprecated-gamut-purple-500,
80%
);
$deprecated-gamut-purple-200: mix(
$deprecated-gamut-purple-200: color.mix(
$color-white,
$deprecated-gamut-purple-500,
60%
);
$deprecated-gamut-purple-300: mix(
$deprecated-gamut-purple-300: color.mix(
$color-white,
$deprecated-gamut-purple-500,
40%
);
$deprecated-gamut-purple-400: mix(
$deprecated-gamut-purple-400: color.mix(
$color-white,
$deprecated-gamut-purple-500,
20%
);
$deprecated-gamut-purple-600: mix(
$deprecated-gamut-purple-600: color.mix(
$color-black,
$deprecated-gamut-purple-500,
20%
);
$deprecated-gamut-purple-700: mix(
$deprecated-gamut-purple-700: color.mix(
$color-black,
$deprecated-gamut-purple-500,
40%
);
$deprecated-gamut-purple-800: mix(
$deprecated-gamut-purple-800: color.mix(
$color-black,
$deprecated-gamut-purple-500,
60%
);
$deprecated-gamut-purple-900: mix(
$deprecated-gamut-purple-900: color.mix(
$color-black,
$deprecated-gamut-purple-500,
80%
);

$deprecated-gamut-royal-blue-500: #4b35ef;

$deprecated-gamut-royal-blue-600: mix(
$deprecated-gamut-royal-blue-600: color.mix(
$color-black,
$deprecated-gamut-royal-blue-500,
20%
);
$deprecated-gamut-royal-blue-700: mix(
$deprecated-gamut-royal-blue-700: color.mix(
$color-black,
$deprecated-gamut-royal-blue-500,
40%
);
$deprecated-gamut-royal-blue-800: mix(
$deprecated-gamut-royal-blue-800: color.mix(
$color-black,
$deprecated-gamut-royal-blue-500,
60%
);

$deprecated-gamut-mint-500: #37c3be;

$deprecated-gamut-mint-100: mix($color-white, $deprecated-gamut-mint-500, 80%);
$deprecated-gamut-mint-200: mix($color-white, $deprecated-gamut-mint-500, 60%);
$deprecated-gamut-mint-300: mix($color-white, $deprecated-gamut-mint-500, 40%);
$deprecated-gamut-mint-400: mix($color-white, $deprecated-gamut-mint-500, 20%);
$deprecated-gamut-mint-600: mix($color-black, $deprecated-gamut-mint-500, 20%);
$deprecated-gamut-mint-700: mix($color-black, $deprecated-gamut-mint-500, 40%);
$deprecated-gamut-mint-800: mix($color-black, $deprecated-gamut-mint-500, 60%);
$deprecated-gamut-mint-900: mix($color-black, $deprecated-gamut-mint-500, 80%);
$deprecated-gamut-mint-100: color.mix($color-white, $deprecated-gamut-mint-500, 80%);
$deprecated-gamut-mint-200: color.mix($color-white, $deprecated-gamut-mint-500, 60%);
$deprecated-gamut-mint-300: color.mix($color-white, $deprecated-gamut-mint-500, 40%);
$deprecated-gamut-mint-400: color.mix($color-white, $deprecated-gamut-mint-500, 20%);
$deprecated-gamut-mint-600: color.mix($color-black, $deprecated-gamut-mint-500, 20%);
$deprecated-gamut-mint-700: color.mix($color-black, $deprecated-gamut-mint-500, 40%);
$deprecated-gamut-mint-800: color.mix($color-black, $deprecated-gamut-mint-500, 60%);
$deprecated-gamut-mint-900: color.mix($color-black, $deprecated-gamut-mint-500, 80%);

$deprecated-gamut-purple: $deprecated-gamut-purple-500;
$deprecated-gamut-royal-blue: $deprecated-gamut-royal-blue-500;
Expand Down
Loading