Success! Looks like we've fixed this one. According to our records the fix was applied for
SDKTOOLS-1302
in
6.0.3.
-
Sencha Premium Member
Cmd v6.0.1.76 Fashion - CSS Nested rules and parent reference not working as expected
Hi,
We are in the process of updating Sencha Cmd and SDK to the latest version 6.0.1 but are having some trouble with the Fashion compiler.
It looks like nested css rules using the parent reference selector are not compiled correctly.
Please consider this test code:
Code:
.test-message, .test-message2 {
border: 1px solid black;
padding: 10px;
color: black;
&.success {
color: green;
}
&.error {
color: red;
}
}
.test-message3 {
@extend .test-message;
color: orange;
}
If we add this to Main.scss of a new v6.0.1 Ext.js application (Cmd v6.0.1.76, SDK v6.0.1.250), the compiled CSS will show:
Code:
/* http://localhost:1841/test1/classic/sass/src/view/main/Main.scss:92 */
.test-message,
.test-message2,
.test-message3 {
border: 1px solid black;
padding: 10px;
color: black;
}
/* http://localhost:1841/test1/classic/sass/src/view/main/Main.scss:98 */
.test-message.success {
color: green;
}
/* http://localhost:1841/test1/classic/sass/src/view/main/Main.scss:101 */
.test-message.error {
color: red;
}
/* http://localhost:1841/test1/classic/sass/src/view/main/Main.scss:106 */
.test-message3 {
color: orange;
}
As you can see, the nested rules &.success and &.error are not expanded for the test-message2 and the test-message3 classes. This is unexpected and breaks our application's theme.
The same code compiled using the previous Sencha Cmd v6.0.0.202 or regular SASS (v3.4.18) will give the expected result:
Code:
.test-message,
.test-message3,
.test-message2 {
border: 1px solid black;
padding: 10px;
color: black;
}
.test-message.success, .success.test-message3, .test-message2.success {
color: green;
}
.test-message.error, .error.test-message3, .test-message2.error {
color: red;
}
.test-message3 {
color: orange;
}
Is this a bug in the Fashion compiler?
Regards,
IcoFisher
-
Sencha - Support Team
Thanks for the report, I've opened a bug in our tracking system.
Regards,
Bryan
-
Sencha Premium Member
Thank you. A ticket was already opened, the ticket id is SDKTOOLS-1302.
Sencha Cmd 6.0.2.14 gives the same results.
Regards,
IcoFisher.
-
Sencha Premium Member
Any progress on this? It's preventing us from upgrading from 6.0.0 to 6.0.1.
-
-
Sencha - Support Team