-
Notifications
You must be signed in to change notification settings - Fork 18
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
Using @value in composes failing #83
Comments
I have the exact same issue. I had to compose directly from the path: .myclass{
composes: smallText from './';
} and in the case of inheriting the variable name @value myColor from './theme.css';
.myclass{
background: myColor;
} |
I ran into this with Kinda of a PITA, but it worked out ok. |
yep, same... /* colors.css */
@value primary: rgba(255,215,237,1);
.primaryColor {
color: primary;
fill: primary;
} then: /* styles.css */
@value colors: "../colors.css";
@value primary, secondary from colors;
/* the following works */
.header {
background-color: primary;
}
/* the following results in error */
.header {
composes: primaryColor from colors;
} Error message: EDIT: Solution: @value primary, secondary from "../colors.css";
.header {
composes: primaryColor from "../colors.css";
background-color: secondary;
} |
//theme.css
.smallText {
font-size: 10px;
}
//style.css
@value theme: 'theme.css';
.myClass {
composes: smallText from theme;
}
The above example results in a "Module build failed: referenced class name "smallText" in composes not found"
Using webpack
Assigning the import to a value first works fine:
//style.css
@value theme: 'theme.css';
@value smallText from theme;
.myClass {
composes: smallText
}
The text was updated successfully, but these errors were encountered: