Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

on style cascading #7

@thien-do

Description

@thien-do

Can you guess what's the color of this without looking at browser:

<div className="bg-red bg-blue" />

It depends on CSS's definition order, which is not guaranteed by Tailwind (and that's a good thing).

What should be done is to be sure one type of attribute can only be set at most once. In other words, use JS or whatever to ensure there is only one "bg-foo" at the final result

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