Skip to content

CSS invert and SASS invert are conflicting. #3507

@ByPikod

Description

@ByPikod
.input {

    --self-background: var(--input-background);
    --self-forecolor: var(--input-forecolor);

    background: var(--self-background);
    color: var(--self-forecolor);

    padding: var(--input-padding);
    transition: all 0.2s;
    border-radius: var(--input-border-radius);

    outline: none;
    border: none;
    
    &:focus {
        --self-background: var(--input-hover-background);
        --self-forecolor: var(--input-hover-forecolor);
    }

    &::placeholder {
        color: invert(var(--self-forecolor));
    }

}

image

That might be a misunderstanding of mine since I am just learning SASS. But seems like, CSS invert and SASS invert are conflicting.

Here is a workaround I found:

&::placeholder {
     color: #{"invert(var(--self-forecolor))"};
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions