Skip to content

:is() with a [] selector causes removal of is:() #775

@mathieulesniak

Description

@mathieulesniak

Playground link

Input:

.tab {
  &:is(input[type="radio"]) {
    display: none;
  }
}

.tab {
  &:is(input) {
    display:none
  }
}

Expected:

.tab:is(input[type=radio]){display:none}.tab:is(input){display:none}

Actual:

.tabinput[type=radio]{display:none}.tab:is(input){display:none}

When mixing is: with a selector containing [] the :is( is removed, as the closing parenthesis.
Came across this behaviour when implementing a tabbed navigation with DaisyUI (repo tab code, implementation) . Simplified the playground to show the bug, this is not the actual DaisyUI code.

Metadata

Metadata

Assignees

No one assigned

    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