weui icon indicating copy to clipboard operation
weui copied to clipboard

Could you guys add support prefix in generated code?

Open anhtran opened this issue 4 years ago • 2 comments

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 avatar Mar 20 '20 08:03 anhtran

@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 avatar Apr 07 '20 07:04 BearJ

@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.

anhtran avatar Apr 07 '20 08:04 anhtran