From ab72486f62d0f7e2397e3f0953fbcc4c46f5ef25 Mon Sep 17 00:00:00 2001 From: Cole Bemis Date: Fri, 3 Sep 2021 15:16:27 -0700 Subject: [PATCH] Bump @primer/primitives (#1567) * Bump @primer/primitives to 4.7.0 * Output dark high contrast theme variables * Remove modes-v2.scss * Create little-vans-grin.md * Create many-bananas-design.md * Create late-hounds-scream.md * Reduce severity of `no-deprecated-colors`lint rule --- .changeset/late-hounds-scream.md | 5 +++++ .changeset/little-vans-grin.md | 5 +++++ .changeset/many-bananas-design.md | 5 +++++ package.json | 2 +- src/base/modes-v2.scss | 27 --------------------------- src/base/modes.scss | 5 +++++ stylelint.config.cjs | 3 ++- yarn.lock | 8 ++++---- 8 files changed, 27 insertions(+), 33 deletions(-) create mode 100644 .changeset/late-hounds-scream.md create mode 100644 .changeset/little-vans-grin.md create mode 100644 .changeset/many-bananas-design.md delete mode 100644 src/base/modes-v2.scss diff --git a/.changeset/late-hounds-scream.md b/.changeset/late-hounds-scream.md new file mode 100644 index 00000000..5c3f2052 --- /dev/null +++ b/.changeset/late-hounds-scream.md @@ -0,0 +1,5 @@ +--- +"@primer/css": minor +--- + +Remove `base/modes-v2.scss` file diff --git a/.changeset/little-vans-grin.md b/.changeset/little-vans-grin.md new file mode 100644 index 00000000..cefc0e08 --- /dev/null +++ b/.changeset/little-vans-grin.md @@ -0,0 +1,5 @@ +--- +"@primer/css": minor +--- + +Bumps `@primer/primitives` to [v4.7.0](https://github.com/primer/primitives/releases/tag/v4.7.0) which includes new [functional color system variables] diff --git a/.changeset/many-bananas-design.md b/.changeset/many-bananas-design.md new file mode 100644 index 00000000..7ab6e329 --- /dev/null +++ b/.changeset/many-bananas-design.md @@ -0,0 +1,5 @@ +--- +"@primer/css": minor +--- + +Output `dark_high_contrast` theme variables from `base/modes.scss` diff --git a/package.json b/package.json index 3aa961eb..f1a48b8d 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "release": "changeset publish" }, "dependencies": { - "@primer/primitives": "^4.3.5" + "@primer/primitives": "4.7.0" }, "devDependencies": { "@changesets/changelog-github": "0.4.0", diff --git a/src/base/modes-v2.scss b/src/base/modes-v2.scss deleted file mode 100644 index 6c80ea4d..00000000 --- a/src/base/modes-v2.scss +++ /dev/null @@ -1,27 +0,0 @@ -// EXPERIMENTAL. DO NOT USE. - -@import '../support/mixins/color-modes.scss'; - -@import '@primer/primitives/dist/scss/colors_v2/_light.scss'; -@import '@primer/primitives/dist/scss/colors_v2/_dark.scss'; -@import '@primer/primitives/dist/scss/colors_v2/_dark_dimmed.scss'; -@import '@primer/primitives/dist/scss/colors_v2/_dark_high_contrast.scss'; - -// Outputs the CSS variables -// Use :root (html element) to define a default - -@include color-mode-theme(light, true) { - @include primer-colors_v2-light; -} - -@include color-mode-theme(dark) { - @include primer-colors_v2-dark; -} - -@include color-mode-theme(dark_dimmed) { - @include primer-colors_v2-dark_dimmed; -} - -@include color-mode-theme(dark_high_contrast) { - @include primer-colors_v2-dark_high_contrast; -} diff --git a/src/base/modes.scss b/src/base/modes.scss index 789eb170..e90f5209 100644 --- a/src/base/modes.scss +++ b/src/base/modes.scss @@ -5,6 +5,7 @@ @import "@primer/primitives/dist/scss/colors/_light.scss"; @import "@primer/primitives/dist/scss/colors/_dark.scss"; @import "@primer/primitives/dist/scss/colors/_dark_dimmed.scss"; +@import "@primer/primitives/dist/scss/colors/_dark_high_contrast.scss"; // Outputs the CSS variables // Use :root (html element) to define a default @@ -21,6 +22,10 @@ @include primer-colors-dark_dimmed; } +@include color-mode-theme(dark_high_contrast) { + @include primer-colors-dark_high_contrast; +} + // Color mode boundaries // Enables nesting of different color modes diff --git a/stylelint.config.cjs b/stylelint.config.cjs index 3301ecff..5383bdb8 100644 --- a/stylelint.config.cjs +++ b/stylelint.config.cjs @@ -14,6 +14,7 @@ module.exports = { 'primer/typography': true, 'primer/box-shadow': true, 'primer-css/TODO': [true, {currentVersion, severity: 'error'}], - 'primer/no-undefined-vars': [true, {files: 'node_modules/@primer/primitives/dist/scss/colors*/*.scss'}] + 'primer/no-undefined-vars': [true, {files: 'node_modules/@primer/primitives/dist/scss/colors*/*.scss'}], + 'primer/no-deprecated-colors': [true, {severity: 'warning'}] } } diff --git a/yarn.lock b/yarn.lock index 41bd377b..559f89ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -880,10 +880,10 @@ "@nodelib/fs.scandir" "2.1.4" fastq "^1.6.0" -"@primer/primitives@^4.3.5": - version "4.6.7" - resolved "https://registry.yarnpkg.com/@primer/primitives/-/primitives-4.6.7.tgz#4909d5267772a98d422ac76abd393676f5bd6e0f" - integrity sha512-tP9fgLD+M+jtyn8f9EpbMA3qCUrL11iT7R6DKmm6tvqBOSFNRvb0KiQypZdQRwbEvlDrGzj90wr4DSi/2MZVXg== +"@primer/primitives@4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@primer/primitives/-/primitives-4.7.0.tgz#7533d7c67f994e73d35f7ed72a0a224671cfa70a" + integrity sha512-0tvy4e412UvwdhOIcLQU7N3TRA/SFzCcIBB0oReIwnaR+tIeSHqxoPaoHA3WZPjZpSOcvJiURmA5EXcZnFkGmg== "@sinonjs/commons@^1.7.0": version "1.8.2"