-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Convert initial set of components to Sass Modules in @carbon/styles
#8555
Comments
This was referenced May 17, 2021
Some of the steps I've been following:
@use 'example-component';
@include example-component.example-component;
+@use '../../config' as *;
+@use '../../type';
...
.#{$prefix}--component {
- @include type-style('body-short-01');
+ @include type.type-style('body-short-01');
} Component reset -@import '../../globals/scss/css--reset';
+@use '../../utilities/component-reset'; Tokens -@import '../../globals/scss/vars';
+@use '../../theme' as *;
-@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 *; spacing -@import '../../globals/scss/vars';
+@use '../../spacing' as *; rem +@use '../../utilities/convert';
...
-margin: rem(24px);
+margin: convert.rem(24px); Some style guide ideas: Ordering of imports When bringing in imports, the order should be:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue is for converting an initial set of components to Sass Modules to be authored in
@carbon/styles
. This work should involve any explorations needed for what is the ideal setup for authoring component files with sass modules and, ideally, should incorporate whatever we think is necessary in terms of tests.These components include (but can change):
The text was updated successfully, but these errors were encountered: