Skip to content

Commit bad6287

Browse files
committed
feat(devtools): enhance seoSubNav styles for improved responsiveness and scrollbar customization
This commit updates the styles for the seoSubNav component, adding responsive design features for smaller screens, including horizontal scrolling and custom scrollbar styles. It also ensures that the seoSubNavLabel maintains proper layout with flex properties, enhancing the overall user experience in the SEO tab.
1 parent 48b5788 commit bad6287

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

packages/devtools/src/styles/use-styles.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,43 @@ const stylesFactory = (theme: DevtoolsStore['settings']['theme']) => {
122122
seoSubNav: css`
123123
display: flex;
124124
flex-direction: row;
125+
flex-wrap: nowrap;
125126
gap: 0;
126127
margin-bottom: 1rem;
127128
border-bottom: 1px solid ${t(colors.gray[200], colors.gray[800])};
129+
min-width: 0;
130+
131+
@media (max-width: 1024px) {
132+
overflow-x: auto;
133+
overflow-y: hidden;
134+
-webkit-overflow-scrolling: touch;
135+
overscroll-behavior-x: contain;
136+
scrollbar-width: thin;
137+
138+
&::after {
139+
content: '';
140+
flex-shrink: 0;
141+
width: max(20px, env(safe-area-inset-right, 0px));
142+
align-self: stretch;
143+
}
144+
145+
&::-webkit-scrollbar {
146+
height: 5px;
147+
}
148+
149+
&::-webkit-scrollbar-track {
150+
background: ${t(colors.gray[100], colors.gray[800])};
151+
border-radius: 4px;
152+
}
153+
154+
&::-webkit-scrollbar-thumb {
155+
background: ${t(colors.gray[300], colors.gray[600])};
156+
border-radius: 4px;
157+
}
158+
}
128159
`,
129160
seoSubNavLabel: css`
161+
flex-shrink: 0;
130162
padding: 0.5rem 1rem;
131163
font-size: 0.875rem;
132164
font-weight: 500;
@@ -137,6 +169,7 @@ const stylesFactory = (theme: DevtoolsStore['settings']['theme']) => {
137169
margin-bottom: -1px;
138170
cursor: pointer;
139171
font-family: inherit;
172+
white-space: nowrap;
140173
&:hover {
141174
color: ${t(colors.gray[800], colors.gray[200])};
142175
}

0 commit comments

Comments
 (0)