Merge pull request #17011 from webpack/issue-16155

test: added test case
This commit is contained in:
Sean Larkin 2023-04-17 08:14:07 -07:00 committed by GitHub
commit 8ce07a13b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 0 deletions

View File

@ -65,6 +65,9 @@ it("should allow to create css modules", done => {
VARS: prod
? "--my-app-491-DJ my-app-491-ms undefined my-app-491-cU"
: "--./style.module.css-LOCAL-COLOR ./style.module.css-VARS undefined ./style.module.css-globalVarsUpperCase",
inSupportScope: prod
? "my-app-491-FO"
: "./style.module.css-inSupportScope",
});
} catch (e) {
return done(e);

View File

@ -68,6 +68,9 @@ it("should allow to create css modules", done => {
VARS: prod
? "--my-app-491-DJ my-app-491-ms undefined my-app-491-cU"
: "--./style.module.css-LOCAL-COLOR ./style.module.css-VARS undefined ./style.module.css-globalVarsUpperCase",
inSupportScope: prod
? "my-app-491-FO"
: "./style.module.css-inSupportScope",
});
} catch (e) {
return done(e);

View File

@ -219,3 +219,9 @@
COLOR: VAR(--GLOBAR-COLOR);
--GLOBAR-COLOR: red;
}
@supports (top: env(safe-area-inset-top, 0)) {
.inSupportScope {
color: red;
}
}

View File

@ -31,4 +31,5 @@ export default {
supportsInMedia: style.displayFlexInSupportsInMedia,
displayFlexInSupportsInMediaUpperCase: style.displayFlexInSupportsInMediaUpperCase,
VARS: `${style["LOCAL-COLOR"]} ${style.VARS} ${style["GLOBAL-COLOR"]} ${style.globalVarsUpperCase}`,
inSupportScope: style.inSupportScope,
};