Skip to content

Commit

Permalink
fix: Add inline padding to Select (#2062)
Browse files Browse the repository at this point in the history
Co-authored-by: Ricardo Jaime Gil Simões <[email protected]>
Co-authored-by: Chris Swithinbank <[email protected]>
  • Loading branch information
3 people authored Jun 28, 2024
1 parent 3ee1a94 commit 5ac0ac6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-pots-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/starlight': patch
---

Increase theme and language select inline padding
6 changes: 4 additions & 2 deletions packages/starlight/components/Select.astro
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ interface Props {
label {
--sl-label-icon-size: 0.875rem;
--sl-caret-size: 1.25rem;
--sl-inline-padding: 0.5rem;
position: relative;
display: flex;
align-items: center;
Expand Down Expand Up @@ -62,8 +63,9 @@ interface Props {
select {
border: 0;
padding-block: 0.625rem;
padding-inline: calc(var(--sl-label-icon-size) + 0.25rem) calc(var(--sl-caret-size) + 0.25rem);
width: var(--sl-select-width);
padding-inline: calc(var(--sl-label-icon-size) + var(--sl-inline-padding) + 0.25rem) calc(var(--sl-caret-size) + var(--sl-inline-padding) + 0.25rem);
margin-inline: calc(var(--sl-inline-padding) * -1);
width: calc(var(--sl-select-width) + var(--sl-inline-padding) * 2);
background-color: transparent;
text-overflow: ellipsis;
color: inherit;
Expand Down

0 comments on commit 5ac0ac6

Please sign in to comment.