Skip to content

Commit e2018cd

Browse files
committed
Fix Spotify focus boxes for row and tracks
1 parent 5ded872 commit e2018cd

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

‎.claude/launch.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.0.1",
3+
"configurations": [
4+
{
5+
"name": "dev",
6+
"runtimeExecutable": "bun",
7+
"runtimeArgs": ["run", "dev"],
8+
"port": 3000
9+
}
10+
]
11+
}

‎app/(writing)/content/agent-md.mdx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ export const metadata = {
77
},
88
};
99

10-
> This blog post was partly inspired by a [similar version](https://edede.ca/snippets/9a19b7c891ddcef1637721c39521d0b2) by a friend and former coworker
11-
1210
## Safety
1311

1412
- Do not commit secrets or credentials

‎app/components/HorizontalScroller.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ const styles = stylex.create({
9393
list: {
9494
display: "flex",
9595
listStyleType: "none",
96+
// Draw the focus outline inside the list so it isn't cut off when the list spans the full viewport
97+
outlineOffset: "-2px",
9698
position: "relative",
9799
scrollbarWidth: "none",
98100
overflowX: "auto",

‎app/components/SpotifyTopTracks.tsx‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,14 @@ const styles = stylex.create({
102102
flexDirection: "column",
103103
textDecorationLine: "none",
104104
},
105+
// The scroller clips vertically, so pad the top and bottom to leave room for each link's
106+
// focus outline, offsetting with negative margins to keep the row's position unchanged
105107
row: {
106108
gap: "1rem",
107109
display: "flex",
110+
marginBottom: "-0.25rem",
111+
marginTop: "-0.25rem",
112+
paddingBottom: "0.25rem",
108113
paddingLeft: {
109114
default: "1.25rem",
110115
"@media (min-width: 1024px)": "2.5rem",
@@ -113,6 +118,7 @@ const styles = stylex.create({
113118
default: "1.25rem",
114119
"@media (min-width: 1024px)": "2.5rem",
115120
},
121+
paddingTop: "0.25rem",
116122
},
117123
section: {
118124
marginTop: "1.25rem",

0 commit comments

Comments
 (0)