Skip to content

Incorrect button border radiuses when only a single button in a toolbar group #1560

@Toutouwai

Description

@Toutouwai

When there is only a single button in a toolbar group the bottom left and bottom right border radiuses are missing.

Image

This is because the :first-child and :last-child style rules specify all four corners, and one is overriding the other:

.leaflet-pm-toolbar
.button-container:last-child
a.leaflet-buttons-control-button {
border-radius: 0 0 2px 2px;
}
.leaflet-pm-toolbar
.button-container:first-child
a.leaflet-buttons-control-button {
border-radius: 2px 2px 0 0;
}

The issue is resolved if the rules only specify the corners that are changed from the default.

.leaflet-pm-toolbar
  .button-container:last-child
  a.leaflet-buttons-control-button {
  border-bottom-left-radius: 2px;
  border-bottom-right-radius: 2px;
}

.leaflet-pm-toolbar
  .button-container:first-child
  a.leaflet-buttons-control-button {
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
}

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