Let's say I have the following code:
/* test.css */
.roundedBorder {
border-radius: 5px;
}
.redBorder {
border: 1px solid red;
}
.roundedAndRedBorder {
composes: roundedBorder;
composes: redBorder;
}
/* test.js */
import styles from './test.css'
console.log(styles)
When I run the code with style loader and css loader, the output is:
{
"roundedBorder": "test__roundedBorder",
"redBorder": "test__redBorder",
"roundedAndRedBorder": "test__roundedAndRedBorder test__roundedBorder test__redBorder"
}
and the style element added into DOM is:
<style type="text/css">
.test__roundedBorder {
border-radius: 5px;
}
.test__redBorder {
border: 1px solid red;
}
.test__roundedAndRedBorder {
}
</style>
The class roundedAndRedBorder is used here only to compose the two other classes. Therefore, I think we should not have the class test__roundedAndRedBorder in the output. What do you think?
Let's say I have the following code:
When I run the code with style loader and css loader, the output is:
{ "roundedBorder": "test__roundedBorder", "redBorder": "test__redBorder", "roundedAndRedBorder": "test__roundedAndRedBorder test__roundedBorder test__redBorder" }and the style element added into DOM is:
The class roundedAndRedBorder is used here only to compose the two other classes. Therefore, I think we should not have the class test__roundedAndRedBorder in the output. What do you think?