Skip to content

Commit e4b0eb0

Browse files
committed
chore(webview): remove dead CSS classes from the global stylesheet
What: - Drop the `.border-x` / `.border-y` selectors from the `@layer components` border-color rule (`.border`, `.border-r`, `.border-l`, `.border-t`, `.border-b` stay). - Drop `.animate-smooth-bounce` (the `smooth-bounce` keyframe stays: RooHero applies it through an inline `animation` style). - Drop the `.code-block-scrollable` selectors: the two border/transition rules and the five `::-webkit-scrollbar-*` rules plus their comment block. `.scrollable` and its `body:hover` / `body:focus-within` variants stay. - Drop `.custom-markdown > pre` and `.animate-slide-in-right` together with its now-orphaned `slide-in-right` keyframe. Why: - Every removed class has zero references across the tracked tree (`git grep <class> -- . ':!webview-ui/src/index.css'` returns 0 for each). No component, test, visual fixture, or dependency emits them. The `.code-block-scrollable` emitter was deleted upstream when the className was commented out; the stylesheet rules were left behind. - `.animate-smooth-bounce` was never applied: RooHero.tsx:24 sets `animation: "smooth-bounce 1s ease-in-out infinite"` directly, which is why the keyframe must stay and only the wrapper class goes. Impact: - No runtime behavior change. The built stylesheet keeps every live sibling (verified against `src/webview-ui/build/assets/index.css`: `animate-fade-in`, `smooth-bounce`, and `scrollable` are all still emitted; the four removed names are absent). - 63 lines removed, 3 lines added (the shortened selector terminators). - Also normalizes this file's line endings to LF to match the committed blob, which incidentally clears a pre-existing Prettier failure on the file. Deliberately out of scope (kept): `.dropdown-container`. The seats disagree on whether it is dead, and it is a documented toolkit dropdown pattern, so it is deferred to a NEEDS-TEST unit rather than decided here.
1 parent 159c42e commit e4b0eb0

1 file changed

Lines changed: 3 additions & 63 deletions

File tree

‎webview-ui/src/index.css‎

Lines changed: 3 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@
199199
.border-r,
200200
.border-l,
201201
.border-t,
202-
.border-b,
203-
.border-x,
204-
.border-y {
202+
.border-b {
205203
border-color: var(--border);
206204
}
207205

@@ -234,10 +232,6 @@
234232
transform: translateY(0);
235233
}
236234
}
237-
238-
.animate-smooth-bounce {
239-
animation: smooth-bounce 1s ease-in-out infinite;
240-
}
241235
}
242236

243237
/* Form Element Focus States */
@@ -274,21 +268,15 @@ body {
274268
}
275269

276270
body.scrollable,
277-
.scrollable,
278-
body.code-block-scrollable,
279-
.code-block-scrollable {
271+
.scrollable {
280272
border-color: transparent;
281273
transition: border-color 0.7s linear;
282274
}
283275

284276
body:hover.scrollable,
285277
body:hover .scrollable,
286278
body:focus-within.scrollable,
287-
body:focus-within .scrollable,
288-
body:hover.code-block-scrollable,
289-
body:hover .code-block-scrollable,
290-
body:focus-within.code-block-scrollable,
291-
body:focus-within .code-block-scrollable {
279+
body:focus-within .scrollable {
292280
border-color: var(--vscode-scrollbarSlider-background);
293281
transition: none;
294282
}
@@ -323,33 +311,6 @@ body:focus-within .code-block-scrollable {
323311
}
324312
}
325313

326-
/**
327-
* The above scrollbar styling uses some transparent background color magic to accomplish its animation. However this doesn't play nicely with SyntaxHighlighter, so we need to set a background color for the code blocks' horizontal scrollbar. This actually has the unintended consequence of always showing the scrollbar which I prefer since it makes it more obvious that there is more content to scroll to.
328-
*/
329-
330-
.code-block-scrollable::-webkit-scrollbar-track {
331-
background: transparent;
332-
}
333-
334-
.code-block-scrollable::-webkit-scrollbar-thumb {
335-
background-color: var(--vscode-scrollbarSlider-background);
336-
border-radius: 5px;
337-
border: 2px solid transparent;
338-
background-clip: content-box;
339-
}
340-
341-
.code-block-scrollable::-webkit-scrollbar-thumb:hover {
342-
background-color: var(--vscode-scrollbarSlider-hoverBackground);
343-
}
344-
345-
.code-block-scrollable::-webkit-scrollbar-thumb:active {
346-
background-color: var(--vscode-scrollbarSlider-activeBackground);
347-
}
348-
349-
.code-block-scrollable::-webkit-scrollbar-corner {
350-
background-color: transparent;
351-
}
352-
353314
/**
354315
* Add a way to hide scrollbars.
355316
*/
@@ -463,14 +424,6 @@ input[cmdk-input]:focus {
463424
outline: none;
464425
}
465426

466-
/**
467-
* Markdown
468-
*/
469-
470-
.custom-markdown > pre {
471-
background-color: transparent !important;
472-
}
473-
474427
/*
475428
* Use geometric precision for codicons to avoid blurriness
476429
*/
@@ -483,19 +436,6 @@ input[cmdk-input]:focus {
483436
* Custom animations for UI elements
484437
*/
485438

486-
@keyframes slide-in-right {
487-
from {
488-
transform: translateX(100%);
489-
}
490-
to {
491-
transform: translateX(0);
492-
}
493-
}
494-
495-
.animate-slide-in-right {
496-
animation: slide-in-right 0.3s ease-out;
497-
}
498-
499439
@keyframes fade-in {
500440
from {
501441
opacity: 0;

0 commit comments

Comments
 (0)