Skip to content

Mixing style objects and functions messes up specificity resolution #74

@dzearing

Description

@dzearing

Expected:

const Title = styled("h1")(p => ({
  background: "blue"
}));

const Title2 = styled(Title)({
  background: "green"
});

Expected:
Title2 is green

Resulted:
Title2 is blue, because it has 2 class names and one of them loses the specificity war.

Repro:
https://codesandbox.io/s/styled-jss-playground-repro-mo3c8

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