Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(elements): update colors, layout, and motion packages with experimental Sass Modules #7546

Merged
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
24 changes: 24 additions & 0 deletions docs/migration/11.x-layout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Layout

**Note: everything in this file is a work-in-progress and will be changed.**

## Changes

| v10 | v11 |
| --------------------------------- | ------------------------- |
| `$carbon--base-font-size` | `$base-font-size` |
| `carbon--rem` | `rem` |
| `carbon--em` | `em` |
| `$carbon--grid-gutter` | `$grid-gutter` |
| `$carbon--grid-gutter--condensed` | `$grid-gutter--condensed` |
| `$carbon--grid-breakpoints` | `$grid-breakpoints` |
| `carbon--breakpoint-next` | `breakpoint-next` |
| `carbon--breakpoint-prev` | `breakpoint-prev` |
| `carbon--is-smallest-breakpoint` | `is-smallest-breakpoint` |
| `carbon--largest-breakpoint-name` | `largest-breakpoint-name` |
| `carbon--breakpoint-infix` | `breakpoint-infix` |
| `carbon--breakpoint-up` | `breakpoint-up` |
| `carbon--breakpoint-down` | `breakpoint-down` |
| `carbon--breakpoint-between` | `breakpoint-between` |
| `carbon--largest-breakpoint` | `largest-breakpoint` |
| `carbon--breakpoint` | `breakpoint` |
11 changes: 11 additions & 0 deletions docs/migration/11.x-motion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Motion

**Note: everything in this file is a work-in-progress and will be changed.**

## Changes

| v10 | v11 |
| -------------------------- | ---------- |
| `$carbon--easings` | `$easings` |
| `@function carbon--motion` | `motion` |
| `@mixin carbon--motion` | `motion` |
1 change: 1 addition & 0 deletions packages/colors/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
scss
index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`modules.scss Public API 1`] = `
exports[`@carbon/colors Public API 1`] = `
Object {
"black": "#000000",
"black-100": "#000000",
Expand Down
6 changes: 3 additions & 3 deletions packages/colors/__tests__/modules-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ const { SassRenderer } = require('@carbon/test-utils/scss');

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

describe('modules.scss', () => {
describe('@carbon/colors', () => {
test('Public API', async () => {
const { getValue } = await render(`
@use 'sass:meta';
@use '../scss/module';
@use '../index.scss' as colors;

$_: get-value(meta.module-variables('module'));
$_: get-value(meta.module-variables('colors'));
`);

const variables = getValue(0);
Expand Down
Loading