Skip to content

Commit adb7cd1

Browse files
joshblacktw15egankodiakhq[bot]
authored
feat(elements): update colors, layout, and motion packages with experimental Sass Modules (#7546)
* refactor(colors): move Sass Modules to colors/index.scss * feat(layout): add support for sass modules * feat(motion): add support for sass modules * docs(migration): add initial 11.x docs for sass modules * chore(components): update sass check to ignore vendor files * chore(colors): update modules test to new location Co-authored-by: TJ Egan <tw15egan@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 9e4485a commit adb7cd1

File tree

19 files changed

+516
-2268
lines changed

19 files changed

+516
-2268
lines changed

docs/migration/11.x-layout.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Layout
2+
3+
**Note: everything in this file is a work-in-progress and will be changed.**
4+
5+
## Changes
6+
7+
| v10 | v11 |
8+
| --------------------------------- | ------------------------- |
9+
| `$carbon--base-font-size` | `$base-font-size` |
10+
| `carbon--rem` | `rem` |
11+
| `carbon--em` | `em` |
12+
| `$carbon--grid-gutter` | `$grid-gutter` |
13+
| `$carbon--grid-gutter--condensed` | `$grid-gutter--condensed` |
14+
| `$carbon--grid-breakpoints` | `$grid-breakpoints` |
15+
| `carbon--breakpoint-next` | `breakpoint-next` |
16+
| `carbon--breakpoint-prev` | `breakpoint-prev` |
17+
| `carbon--is-smallest-breakpoint` | `is-smallest-breakpoint` |
18+
| `carbon--largest-breakpoint-name` | `largest-breakpoint-name` |
19+
| `carbon--breakpoint-infix` | `breakpoint-infix` |
20+
| `carbon--breakpoint-up` | `breakpoint-up` |
21+
| `carbon--breakpoint-down` | `breakpoint-down` |
22+
| `carbon--breakpoint-between` | `breakpoint-between` |
23+
| `carbon--largest-breakpoint` | `largest-breakpoint` |
24+
| `carbon--breakpoint` | `breakpoint` |

docs/migration/11.x-motion.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Motion
2+
3+
**Note: everything in this file is a work-in-progress and will be changed.**
4+
5+
## Changes
6+
7+
| v10 | v11 |
8+
| -------------------------- | ---------- |
9+
| `$carbon--easings` | `$easings` |
10+
| `@function carbon--motion` | `motion` |
11+
| `@mixin carbon--motion` | `motion` |

packages/colors/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
scss
2+
index.scss

packages/colors/__tests__/__snapshots__/modules-test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`modules.scss Public API 1`] = `
3+
exports[`@carbon/colors Public API 1`] = `
44
Object {
55
"black": "#000000",
66
"black-100": "#000000",

packages/colors/__tests__/modules-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ const { SassRenderer } = require('@carbon/test-utils/scss');
1313

1414
const { render } = SassRenderer.create(__dirname);
1515

16-
describe('modules.scss', () => {
16+
describe('@carbon/colors', () => {
1717
test('Public API', async () => {
1818
const { getValue } = await render(`
1919
@use 'sass:meta';
20-
@use '../scss/module';
20+
@use '../index.scss' as colors;
2121
22-
$_: get-value(meta.module-variables('module'));
22+
$_: get-value(meta.module-variables('colors'));
2323
`);
2424

2525
const variables = getValue(0);

0 commit comments

Comments
 (0)