From 4b8cb70c22bd9e466c4befe61269db5938a90bdb Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Sun, 5 Apr 2026 20:28:38 +0200 Subject: [PATCH] refactor(web): move FileViewer code styles to CSS module Extract the wall of Tailwind arbitrary selectors into file-viewer.module.css with snake_case class names. The scoped - ); + const rule = selectors.join(","); + return ; })(); return (
{ - // Handle clicks on line number elements (data-line-number) const target = e.target as HTMLElement; const lineEl = target.closest("[data-line-number]"); if (lineEl) { @@ -312,16 +312,7 @@ function CodeBlock({ selectedRange, onLineClick, children }: CodeBlockProps) { }} > {highlightStyle} -
.line]:block [&_code>.line]:min-w-full [&_code>.line]:pr-4", - "[&_code>.line:first-child]:pt-2 [&_code>.line:last-child]:pb-2", - "[&_code>.line::before]:inline-block [&_code>.line::before]:w-12 [&_code>.line::before]:mr-4 [&_code>.line::before]:text-right [&_code>.line::before]:select-none [&_code>.line::before]:cursor-pointer [&_code>.line::before]:content-[attr(data-line-number)]", - "[&_code>.line::before]:opacity-40", - )} - > +
{children}