weui
weui copied to clipboard
Could you guys add support prefix in generated code?
For example:
@weuiPrefix: kbt;
.setColor(~"--@{weuiPrefix}-BTN-DISABLED-FONT-COLOR", rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.2));
// button
button,
input {
&.@{weuiPrefix}-btn {
border-width: 0;
outline: 0;
-webkit-appearance: none;
&:focus {
outline: 0;
}
}
&.@{weuiPrefix}-btn_inline,
&.@{weuiPrefix}-btn_mini {
width: auto;
}
}
@anhtran Hello, could you tell us more reason ? Because if used the prefix variable, the project has no changed for weui.css and it is inconvenient for development.
@BearJ Yep, I agree with you that many IDEs cannot detect the CSS classes well when using the variables in class name. Actually I want to personalize the project and combine using with Ant Design and Bootstrap. Shorter class name or prefix is good for me in implementation.
In fact, I wrote a Gulp script to replace prefix, this method may not be native but working.
Thank you for your answers.