Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/actionlist-fix-selection-rendering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/components': patch
---

ActionList: Fix multiple selection svg by overriding global shape-rendering for github.com
1 change: 1 addition & 0 deletions src/ActionList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ const MultiSelectIcon = styled.svg<{selected?: boolean}>`
rect {
fill: ${({selected}) => (selected ? get('colors.accent.fg') : get('colors.canvas.default'))};
stroke: ${({selected}) => (selected ? get('colors.accent.fg') : get('colors.border.default'))};
shape-rendering: auto; // this is a workaround to override global style in github/github, see primer/react#1666
}
path {
fill: ${get('colors.fg.onEmphasis')};
Expand Down
3 changes: 2 additions & 1 deletion src/ActionList2/Selection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export const Selection: React.FC<SelectionProps> = ({selected}) => {
sx={{
rect: {
fill: selected ? 'accent.fg' : 'canvas.default',
stroke: selected ? 'accent.fg' : 'border.default'
stroke: selected ? 'accent.fg' : 'border.default',
shapeRendering: 'auto' // this is a workaround to override global style in github/github, see primer/react#1666
},
path: {
fill: 'fg.onEmphasis',
Expand Down
4 changes: 4 additions & 0 deletions src/__tests__/__snapshots__/Autocomplete.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ Array [
.c6 rect {
fill: #ffffff;
stroke: #d0d7de;
shape-rendering: auto;
}

.c6 path {
Expand Down Expand Up @@ -1386,6 +1387,7 @@ Array [
.c6 rect {
fill: #ffffff;
stroke: #d0d7de;
shape-rendering: auto;
}

.c6 path {
Expand Down Expand Up @@ -2206,6 +2208,7 @@ Array [
.c10 rect {
fill: #ffffff;
stroke: #d0d7de;
shape-rendering: auto;
}

.c10 path {
Expand All @@ -2216,6 +2219,7 @@ Array [
.c6 rect {
fill: #0969da;
stroke: #0969da;
shape-rendering: auto;
}

.c6 path {
Expand Down