Skip to content

Allow Conditions like possible in SASS or SCSS ;) #147

@kaystrobach

Description

@kaystrobach

Hi Guys,

i really like the simple approach behind less and would like to have conditions like they are possible in scss or sas:

f.e. you ask the user in a cms to setup a color:

And then you need to calculate the textcolor from this color, you will need something like a condition to ensure, that the contrast is still big enough to read the text.

footer-container {

@if lightness($main-color) < 10% {
    color: lighten($main-color,15%);
} @else {
    color: darken($main-color,20%);
}

}

Thanks in advance
Kay

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions