Skip to content

Commit

Permalink
Ratings: Use subgrid if available to ensure rating bar alignment
Browse files Browse the repository at this point in the history
See #47
  • Loading branch information
ryelle committed May 9, 2024
1 parent 8132ba9 commit faeea74
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,20 @@
inset: 0 auto 0 0;
background-color: var(--wp--custom--wporg-ratings-stars--color--fill);
}

@supports (grid-template-columns: subgrid) {
.wp-block-wporg-ratings-bars {
display: grid;
gap: 4px var(--wp--preset--spacing--10);
grid-template-columns: auto 1fr auto;

.wporg-ratings-bars__bar,
.wporg-ratings-bars__bar a {
display: grid;
grid-column: span 3;
grid-template-columns: subgrid;
margin-bottom: unset;
gap: unset;
}
}
}

0 comments on commit faeea74

Please sign in to comment.