Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Support for transparent CSS value is missing #319

Open
mkgl opened this issue Aug 28, 2018 · 0 comments
Open

Support for transparent CSS value is missing #319

mkgl opened this issue Aug 28, 2018 · 0 comments

Comments

@mkgl
Copy link

mkgl commented Aug 28, 2018

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) ;)

mkgl added a commit to mkgl/sass-compiler that referenced this issue Aug 28, 2018
…omponents, alpha, adjust-color) vaadin#319

* gracefully return values as per http://www.w3.org/TR/css3-color/#transparent-def whenever possible
mkgl added a commit to mkgl/sass-compiler that referenced this issue Aug 28, 2018
mkgl added a commit to mkgl/sass-compiler that referenced this issue Aug 28, 2018
* Consider the alpha channel if transparent is given as input (was previously ignored, and would return 'black')
* Return literal 'transparent' untouched if it was given as input, without parameters
mkgl added a commit to mkgl/sass-compiler that referenced this issue Aug 28, 2018
…omponents, alpha, adjust-color) vaadin#319

* gracefully return values as per http://www.w3.org/TR/css3-color/#transparent-def whenever possible
mkgl added a commit to mkgl/sass-compiler that referenced this issue Aug 28, 2018
mkgl added a commit to mkgl/sass-compiler that referenced this issue Aug 28, 2018
* Consider the alpha channel if transparent is given as input (was previously ignored, and would return 'black')
* Return literal 'transparent' untouched if it was given as input, without parameters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant