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

refactor: added &{} rules for styles below nested rules to follow [email protected] ruleset. #17141

Merged
merged 12 commits into from
Aug 29, 2024
Merged
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion config/jest-config-carbon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"jest-circus": "^28.1.0",
"jest-environment-jsdom": "^28.1.0",
"jest-watch-typeahead": "^2.0.0",
"sass": "^1.51.0"
"sass": "^1.77.7"
},
"devDependencies": {
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/class-prefix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@vitejs/plugin-react": "4.0.0",
"sass": "^1.51.0",
"sass": "^1.77.7",
"vite": "^4.3.8"
}
}
2 changes: 1 addition & 1 deletion examples/codesandbox-styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dev": "vite"
},
"devDependencies": {
"sass": "^1.51.0",
"sass": "^1.77.7",
"vite": "^4.3.8"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@vitejs/plugin-react": "4.0.0",
"sass": "^1.51.0",
"sass": "^1.77.7",
"vite": "^4.3.8"
}
}
2 changes: 1 addition & 1 deletion examples/id-prefix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@vitejs/plugin-react": "4.0.0",
"sass": "^1.51.0",
"sass": "^1.77.7",
"vite": "^4.3.8"
}
}
2 changes: 1 addition & 1 deletion examples/light-dark-mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
},
"devDependencies": {
"eslint": "8.40.0",
"sass": "^1.51.0"
"sass": "^1.77.7"
}
}
2 changes: 1 addition & 1 deletion examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"devDependencies": {
"eslint": "8.40.0",
"eslint-config-next": "13.4.7",
"sass": "^1.51.0"
"sass": "^1.77.7"
}
}
2 changes: 1 addition & 1 deletion examples/v10-token-compat-in-v11/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@vitejs/plugin-react": "4.0.0",
"sass": "^1.51.0",
"sass": "^1.77.7",
"vite": "^4.3.8"
}
}
2 changes: 1 addition & 1 deletion examples/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@vitejs/plugin-react": "4.0.0",
"sass": "^1.51.0",
"sass": "^1.77.7",
"vite": "^4.3.8"
}
}
2 changes: 1 addition & 1 deletion packages/carbon-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@carbon/test-utils": "^10.30.0",
"fs-extra": "^11.0.0",
"rimraf": "^5.0.0",
"sass": "^1.51.0"
"sass": "^1.77.7"
},
"sideEffects": [
"index.scss",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"remark": "^10.0.1",
"replace-in-file": "^7.0.0",
"rollup": "^2.79.1",
"sass": "^1.51.0",
"sass": "^1.77.7",
"sassdoc": "^2.7.3",
"typescript-config-carbon": "^0.2.0",
"yargs": "^17.0.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"rimraf": "^5.0.0",
"rollup": "^2.79.1",
"rollup-plugin-strip-banner": "^3.0.0",
"sass": "^1.51.0",
"sass": "^1.77.7",
"sass-loader": "^14.0.0",
"storybook": "^7.1.0",
"storybook-addon-accessibility-checker": "^3.1.61-rc.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"postcss": "^8.4.14",
"postcss-flexbugs-fixes": "^5.0.2",
"rimraf": "^5.0.0",
"sass": "^1.51.0"
"sass": "^1.77.7"
},
"sideEffects": [
"index.scss",
Expand Down
12 changes: 10 additions & 2 deletions packages/styles/scss/components/accordion/_accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ $content-padding: 0 0 0 $spacing-05 !default;

@include component-reset.reset;

inline-size: 100%;
list-style: none;
&{
inline-size: 100%;
list-style: none;
}
}

.#{$prefix}--accordion__item {
Expand Down Expand Up @@ -83,6 +85,7 @@ $content-padding: 0 0 0 $spacing-05 !default;
.#{$prefix}--accordion__heading {
@include button-reset.reset;

&{
position: relative;
display: flex;
flex-direction: $flex-direction;
Expand All @@ -95,6 +98,7 @@ $content-padding: 0 0 0 $spacing-05 !default;
min-block-size: layout.size('height');
padding-inline-end: layout.density('padding-inline');
transition: background-color motion(standard, productive) $duration-fast-02;
}

&:hover {
background-color: $layer-hover;
Expand Down Expand Up @@ -143,6 +147,7 @@ $content-padding: 0 0 0 $spacing-05 !default;
.#{$prefix}--accordion__arrow {
@include focus-outline('reset');

&{
flex: 0 0 1rem;
block-size: 1rem;
fill: $icon-primary;
Expand All @@ -151,15 +156,18 @@ $content-padding: 0 0 0 $spacing-05 !default;
// <16px and cause the icon to render in the incorrect artboard size
transform: rotate(-270deg) #{'/*rtl:ignore*/'};
transition: all $duration-fast-02 motion(standard, productive);
}
}

.#{$prefix}--accordion__title {
@include type-style('body-01');

&{
z-index: 1;
inline-size: 100%;
padding-inline-start: $spacing-05;
text-align: start;
}
}

.#{$prefix}--accordion__wrapper {
Expand Down
2 changes: 1 addition & 1 deletion packages/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"prettier": "^2.8.8",
"react": "^18.2.0",
"resolve": "^1.12.0",
"sass": "^1.51.0"
"sass": "^1.77.7"
},
"devDependencies": {
"react-dom": "^18.2.0"
Expand Down
2 changes: 1 addition & 1 deletion www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"prop-types": "^15.7.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass": "^1.51.0"
"sass": "^1.77.7"
},
"devDependencies": {
"fast-glob": "^3.2.7",
Expand Down
38 changes: 19 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,7 @@ __metadata:
remark: "npm:^10.0.1"
replace-in-file: "npm:^7.0.0"
rollup: "npm:^2.79.1"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
sassdoc: "npm:^2.7.3"
typescript-config-carbon: "npm:^0.2.0"
yargs: "npm:^17.0.1"
Expand Down Expand Up @@ -2085,7 +2085,7 @@ __metadata:
rimraf: "npm:^5.0.0"
rollup: "npm:^2.79.1"
rollup-plugin-strip-banner: "npm:^3.0.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
sass-loader: "npm:^14.0.0"
storybook: "npm:^7.1.0"
storybook-addon-accessibility-checker: "npm:^3.1.61-rc.3"
Expand Down Expand Up @@ -2140,7 +2140,7 @@ __metadata:
postcss: "npm:^8.4.14"
postcss-flexbugs-fixes: "npm:^5.0.2"
rimraf: "npm:^5.0.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
peerDependencies:
sass: ^1.33.0
peerDependenciesMeta:
Expand All @@ -2157,7 +2157,7 @@ __metadata:
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
resolve: "npm:^1.12.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
peerDependencies:
react-dom: ^16.9.0 || ^17.0.1
languageName: unknown
Expand Down Expand Up @@ -9958,7 +9958,7 @@ __metadata:
chalk: "npm:1.1.3"
fs-extra: "npm:^11.0.0"
rimraf: "npm:^5.0.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
peerDependencies:
sass: ^1.33.0
languageName: unknown
Expand Down Expand Up @@ -10300,7 +10300,7 @@ __metadata:
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
vite: "npm:^4.3.8"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -10601,7 +10601,7 @@ __metadata:
resolution: "codesandbox-styles@workspace:examples/codesandbox-styles"
dependencies:
"@carbon/styles": "npm:^1.62.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
vite: "npm:^4.3.8"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -11666,7 +11666,7 @@ __metadata:
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
vite: "npm:^4.3.8"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -13841,7 +13841,7 @@ __metadata:
next: "npm:14.1.1"
react: "npm:18.2.0"
react-dom: "npm:18.2.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
languageName: unknown
linkType: soft

Expand All @@ -13855,7 +13855,7 @@ __metadata:
next: "npm:14.1.1"
react: "npm:18.2.0"
react-dom: "npm:18.2.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -16040,7 +16040,7 @@ __metadata:
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
vite: "npm:^4.3.8"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -17359,7 +17359,7 @@ __metadata:
jest-watch-typeahead: "npm:^2.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -24511,16 +24511,16 @@ __metadata:
languageName: node
linkType: hard

"sass@npm:^1.51.0":
version: 1.62.1
Comment on lines -24561 to -24562
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something between these version is why the type test snapshot is changing, though I couldn't pin down exactly what in the changelog https://github.com/sass/dart-sass/blob/main/CHANGELOG.md#1621

resolution: "sass@npm:1.62.1"
"sass@npm:^1.77.7":
version: 1.77.8
resolution: "sass@npm:1.77.8"
dependencies:
chokidar: "npm:>=3.0.0 <4.0.0"
immutable: "npm:^4.0.0"
source-map-js: "npm:>=0.6.2 <2.0.0"
bin:
sass: sass.js
checksum: 10/4e9f3db604b4a9d50bc0986b1a748cff1986d8545d744c06cac2357057817c8951c605a06f6742df7cc47f98cdb9801cbfa819f3337e7c9a70be2ab1f7d5b343
checksum: 10/4bf6e3007fef62dd6dfc657c89c2890872a6b5dc43e2dc4d61bcf9ae1bdc2dd95b59454a3cbd3c8363c98b673b028e1578b26135190d0f2a8a184a38ab41e99b
languageName: node
linkType: hard

Expand Down Expand Up @@ -27766,7 +27766,7 @@ __metadata:
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
vite: "npm:^4.3.8"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -28052,7 +28052,7 @@ __metadata:
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
vite: "npm:^4.3.8"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -28617,7 +28617,7 @@ __metadata:
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
rimraf: "npm:^5.0.0"
sass: "npm:^1.51.0"
sass: "npm:^1.77.7"
semver: "npm:^7.3.5"
languageName: unknown
linkType: soft
Expand Down
Loading