Skip to content

Incorrect merging of border declarations #551

@andyjansson

Description

@andyjansson

As originally reported here:

Case 1

Input

.merge-longhand {
  border: 1px solid black;
  border-top-width: 2px;
  border-right-width: 2px;
  border-bottom-width: 2px;
}

Output

.merge-longhand {
  border: 2px solid black;
  border-left: solid black;
  border-width: 1px;
}

Expected

.merge-longhand {
  border: solid black;
  border-width: 2px 2px 2px 1px;
}

Case 2

Input

.merge-longhand {
  border: none;
  border-top: 6px solid #000;
  border-bottom: 1px solid #fff;
}

Output

.merge-longhand {
  border: 6px solid #000;
  border-left: none;
  border-right: none;
}

Expected

.merge-longhand {
  border: none;
  border-top: 6px solid #000;
  border-bottom: 1px solid #fff;
}

Thanks to @apriljunge and @implico for reporting these issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions