vaadin / sass-compiler

A Java Sass compiler implementation
53 stars 25 forks source link

Support for transparent CSS value is missing #319

Open mkgl opened 6 years ago

mkgl commented 6 years ago

For example when building a Valo theme, one cannot use the transparent CSS value, at least for some exposed valo variables, such as:

$v-textfield-background-color--readonly: transparent;

The Sass compiler just blows.

As a workaround it is possible to use rgba(0, 0, 0, 0), yet the "original" Sass compiler gracefully supports both. See also:

.transparent{
    $transparentcolor: transparent;
    red: red($transparentcolor);
    green: green($transparentcolor);
    blue: blue($transparentcolor);
    alpha: alpha($transparentcolor);
    opacity: opacity($transparentcolor);
    colorA: rgba(0,0,0,0);
    colorB: $transparentcolor;
    colorC: darken($transparentcolor, 50);
    colorD: lighten($transparentcolor, 100);
    colorE: adjust-color($transparentcolor);
    colorF: scale-color($transparentcolor);
}

PR incoming (maybe) ;)