Skip to content

Conflicting className precedence rules #1010

@jasonlimantoro

Description

@jasonlimantoro

Given

<button class="rounded-lg p-4 inline-block p-0 default ripple">No?</button>

which has a conflicting className: p-4 and p-0

Expected

The button should have a padding of 0, following the CSS rules, i.e. the one that's defined later takes precedence.

Actual

The button has a padding of 4 (p-4 is taking effect).

Side notes

Interestingly, if I swap the class name position from Chrome devtools, i.e.

<button class="rounded-lg p-0 inline-block p-4 default ripple">No?</button>

The button still has a padding of 4.

Is this the expected behavior?

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