Skip to content

Commit

Permalink
Don't show separator lines on first child (#1969)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhunschejones authored May 2, 2023
1 parent 23b6b4d commit 37174d1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/fast-cobras-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/view-components': patch
---

Don't show segmented control item separator on first item
18 changes: 10 additions & 8 deletions app/components/primer/alpha/segmented_control.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}

&::before {
border-color: transparent;
border-color: transparent !important;
}

& + .SegmentedControl-item::before {
Expand All @@ -46,13 +46,15 @@
}

/* Separator lines */
&::before {
position: absolute;
inset: 0 0 0 -1px;
margin-top: var(--control-medium-paddingBlock, 6px);
margin-bottom: var(--control-medium-paddingBlock, 6px);
content: '';
border-left: var(--borderWidth-thin, max(1px, 0.0625rem)) solid var(--color-border-default);
&:not(:first-child) {
&::before {
position: absolute;
inset: 0 0 0 -1px;
margin-top: var(--control-medium-paddingBlock, 6px);
margin-bottom: var(--control-medium-paddingBlock, 6px);
content: '';
border-left: var(--borderWidth-thin, max(1px, 0.0625rem)) solid var(--color-border-default);
}
}

/* Button ----------------------------------------- */
Expand Down

0 comments on commit 37174d1

Please sign in to comment.