We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This issue is for updating the Skeleton component to Sass Modules in the @carbon/styles package. In this refactor, we will:
@carbon/styles
packages/styles/scss/components/search/_{component}.scss
packages/styles/scss/components/{component}/
_index.scss
packages/styles/scss/components/{component}/_index.scss
packages/styles/scss/components/__tests__/{component}-test.js
The _index.scss should:
@forward
_{component}.scss
The search-test.js file should test the following:
search-test.js
{component}/_index.scss
The _{component}.scss will then need to be refactored to use the new import paths and conventions. You can find common recipes here: #8899 (comment)
packages/components
packages/styles/scss/components/<component>/_index.scss
*.scss
_<component>.scss
import-once
exports
@use '<component>';
@use 'example-component'; @include example-component.example-component;
@import
@use
css--reset
utilities/component-reset
_motion.scss
rem
em
../utilities/convert
carbon--spacing
spacing
carbon--breakpoint
breakpoint
scss/components/_index.scss
calc()
$prefix
+@use '../../config' as *;
type-style
+@use '../../type'; ... .#{$prefix}--component { - @include type-style('body-short-01'); + @include type.type-style('body-short-01'); }
Button reset
-@import '../../globals/scss/helper-mixins'; +@use '../../utilities/button-reset';
Component reset
-@import '../../globals/scss/css--reset'; +@use '../../utilities/component-reset';
Tokens
-@import '../../globals/scss/vars'; +@use '../../theme' as *;
duration--*
-@import '../../globals/scss/vars'; @use '../../motion' as *; ... .#{$prefix}--my-component { - transition: color $duration--fast-01 motion(standard, productive); + transition: color $duration-fast-01 motion(standard, productive); }
helper mixins
-@import '../../globals/scss/helper-mixins'; // Focus outline +@use '../../utilities/focus-outline' as *;
-@import '../../globals/scss/vars'; +@use '../../spacing' as *;
+@use '../../utilities/convert' as *;
The text was updated successfully, but these errors were encountered:
jnm2377
Successfully merging a pull request may close this issue.
This issue is for updating the Skeleton component to Sass Modules in the
@carbon/styles
package. In this refactor, we will:packages/styles/scss/components/search/_{component}.scss
packages/styles/scss/components/{component}/
_index.scss
atpackages/styles/scss/components/{component}/_index.scss
packages/styles/scss/components/__tests__/{component}-test.js
The
_index.scss
should:@forward
the mixin and any variables from_{component}.scss
_{component}.scss
by calling the mixinThe
search-test.js
file should test the following:{component}/_index.scss
fileThe
_{component}.scss
will then need to be refactored to use the new import paths and conventions. You can find common recipes here: #8899 (comment)Reference
Migration process
packages/components
_index.scss
file for this component over inpackages/styles/scss/components/<component>/_index.scss
*.scss
files, ignore the JS/HBS/md files for the most part, into this folder_<component>.scss
file with the following changes:import-once
importexports
mixin that is used_index.scss
to@use '<component>';
and include the mixin afterwards@import
to@use
css--reset
->utilities/component-reset
_motion.scss
and have a name changerem
andem
helpers come from../utilities/convert
carbon--spacing
->spacing
carbon--breakpoint
->breakpoint
scss/components/_index.scss
entrypointcalc()
Common migrations
$prefix
+@use '../../config' as *;
type-style
Button reset
Component reset
Tokens
duration--*
helper mixins
spacing
rem
+@use '../../utilities/convert' as *;
The text was updated successfully, but these errors were encountered: