Skip to content
Open
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
6 changes: 4 additions & 2 deletions apps/web/src/components/EnvironmentMachineIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import type { EnvironmentMachineKind } from "@t3tools/contracts";
import { msg } from "gt-react";
import { CloudIcon, LaptopIcon, MonitorIcon, ServerIcon, type LucideProps } from "lucide-react";
import type { FunctionComponent, SVGProps } from "react";
import { cn } from "~/lib/utils";
import { LinuxIcon } from "./Icons";

function LucideLike(props: SVGProps<SVGSVGElement>) {
function LucideLike({ className, ...props }: SVGProps<SVGSVGElement>) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -13,10 +14,11 @@ function LucideLike(props: SVGProps<SVGSVGElement>) {
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="1.75"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
{...props}
className={cn("lucide", className)}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const TimelinePendingApprovalRow = memo(function TimelinePendingApprovalR
<ToolActivityIconView
icon={undefined}
fallbackName={presentation.icon}
className="block size-4 shrink-0 stroke-2 text-icon-muted"
className="block size-4 shrink-0 text-icon-muted"
muted
/>
}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/chat/TimelineToolActivityIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ function BrowserAppIcon({ className }: { className: string }) {
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="1.9"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className={className}
className={cn("lucide", className)}
aria-hidden
>
<path d="M8.5 19H7.2C4.4 19 3 17.5 3 14.6V7.4C3 4.5 4.5 3 7.4 3h8.2C18.5 3 20 4.5 20 7.4v2.4" />
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/chat/TimelineUserMessageRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ export function FoldedMessageHeader(props: {
onClick={props.onToggle}
className="flex w-full min-w-0 items-center gap-1.5 rounded-2xl px-3 py-2 text-left text-sm focus-visible:outline-2 focus-visible:outline-ring"
>
<Icon className="size-4 shrink-0 stroke-2 text-muted-foreground" />
<Icon className="size-4 shrink-0 text-muted-foreground" />
<span
className={cn(
"shrink-0 text-muted-foreground",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/chat/TimelineWorkEntryRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ function WorkEntryLogRow(props: WorkEntryRowProps) {
<ToolActivityIconView
icon={entryToolIcon}
fallbackName={entryIconName}
className="block size-4 shrink-0 stroke-2"
className="block size-4 shrink-0"
muted
/>
</span>
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/components/chat/TimelineWorkGroupRows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ function LiveActivityContent({
<ToolActivityIconView
icon={toolIcon}
fallbackName={iconName}
className="block size-4 shrink-0 stroke-2"
className="block size-4 shrink-0"
muted={!highlighted}
/>
</span>
Expand Down Expand Up @@ -628,7 +628,7 @@ export function LiveWorkEntryTimelineRow({
<ToolActivityIconView
icon={undefined}
fallbackName="brain"
className="block size-4 shrink-0 stroke-2"
className="block size-4 shrink-0"
muted
/>
</span>
Expand Down Expand Up @@ -728,7 +728,7 @@ function WorkGroupHeader(props: {
<ToolActivityIconView
icon={props.toolIcon}
fallbackName={props.iconName}
className="size-4 shrink-0 stroke-2 text-icon-muted"
className="size-4 shrink-0 text-icon-muted"
muted
/>
}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/chat/WorktreeSetupCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function Elapsed({
}

function StageIcon({ status }: { status: WorktreeSetupStage["status"] }) {
const className = "size-4 shrink-0 stroke-2";
const className = "size-4 shrink-0";
switch (status) {
case "done":
return <CheckIcon aria-hidden className={className} />;
Expand Down
6 changes: 1 addition & 5 deletions apps/web/src/components/desktopUpdate.toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ function ReleaseNotesLink({
type="button"
>
<T>Read more</T>
<ArrowRightIcon
aria-hidden
className="ml-1 inline size-3 -rotate-45 align-[-0.125em]"
strokeWidth={2.25}
/>
<ArrowRightIcon aria-hidden className="ml-1 inline size-3 -rotate-45 align-[-0.125em]" />
</button>
);
}
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/components/settings/SettingsScopeSentence.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ function ScopeMenu({
<span className="min-w-0 truncate">{label}</span>
<ChevronDownIcon
aria-hidden
strokeWidth={1.75}
className="-me-0.5 size-3.5 shrink-0 text-muted-foreground opacity-70"
/>
</Trigger>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/settings/settingsLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export function SettingsSearchTarget({

// Settings pickers reuse composer controls but match the bordered selects beside them.
export const SETTINGS_PICKER_TRIGGER_CLASSNAME =
"min-w-0 max-w-none shrink-0 border-input bg-background font-normal text-foreground shadow-xs/5 hover:bg-accent/50 dark:bg-input/32 [&_svg[data-composer-control-chevron]]:stroke-[1.75] [&_svg[data-composer-control-chevron]]:opacity-70";
"min-w-0 max-w-none shrink-0 border-input bg-background font-normal text-foreground shadow-xs/5 hover:bg-accent/50 dark:bg-input/32 [&_svg[data-composer-control-chevron]]:opacity-70";

export function PolicyTooltip({ children }: { readonly children: string }) {
const gt = useGT();
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/ui/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ function MenuCheckboxItem({
className={cn("col-start-1", variant === "icon" && "-mx-0.5")}
>
<svg
className={variant === "icon" ? "size-3.5" : undefined}
className={cn("lucide", variant === "icon" && "size-3.5")}
fill="none"
height="24"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.75"
strokeWidth="2"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
Expand Down
10 changes: 4 additions & 6 deletions apps/web/src/components/ui/toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ function ToastExpandableSection({
type="button"
>
{open ? (
<ChevronUpIcon className="size-3.5 shrink-0 opacity-80" strokeWidth={2.25} />
<ChevronUpIcon className="size-3.5 shrink-0 opacity-80" />
) : (
<ChevronDownIcon className="size-3.5 shrink-0 opacity-80" strokeWidth={2.25} />
<ChevronDownIcon className="size-3.5 shrink-0 opacity-80" />
)}
{open ? collapseLabel : expandLabel}
</button>
Expand Down Expand Up @@ -286,13 +286,11 @@ function ToastDescriptionAndExpandable({
<ChevronUpIcon
aria-hidden
className="size-3.5 h-lh shrink-0 text-muted-foreground opacity-80"
strokeWidth={2.25}
/>
) : (
<ChevronDownIcon
aria-hidden
className="size-3.5 h-lh shrink-0 text-muted-foreground opacity-80"
strokeWidth={2.25}
/>
)}
</TooltipTrigger>
Expand Down Expand Up @@ -692,7 +690,7 @@ function Toasts({ position }: { position: ToastPosition }) {
}
type="button"
>
<XIcon className="size-3" strokeWidth={2.25} />
<XIcon className="size-3" />
</button>
</div>
<Toast.Content
Expand Down Expand Up @@ -793,7 +791,7 @@ function AnchoredToasts() {
}
type="button"
>
<XIcon className="size-3" strokeWidth={2.25} />
<XIcon className="size-3" />
</button>
</div>
<Toast.Content
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/contextMenuFallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ function createIconElement(name: string, tone: "neutral" | "destructive"): SVGSV
svg.setAttribute(
"class",
tone === "destructive"
? "size-4.5 shrink-0 sm:size-4"
: "size-4.5 shrink-0 text-muted-foreground sm:size-4",
? "lucide size-4.5 shrink-0 sm:size-4"
: "lucide size-4.5 shrink-0 text-muted-foreground sm:size-4",
);
for (const node of paths) {
const child = document.createElementNS(SVG_NS, node.tag);
Expand Down
46 changes: 42 additions & 4 deletions apps/web/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -1724,11 +1724,49 @@ body {
font-variant-ligatures: none;
}

/* Lighter default icon stroke. In the base layer so stroke-* utilities still win; any
CSS beats lucide's stroke-width="2" attribute. */
/* Small lucide icons draw a line of --icon-stroke; a hand-built svg joins with class lucide and
stroke-width="2". A strokeWidth prop other than 2, or stroke-1, stroke-2 or an arbitrary
stroke width class on the icon, scales instead. Any other stroke width, including one set
from a parent selector, draws unscaled. Base layer, so utilities win. */
@layer base {
:where(svg.lucide[stroke-width="2"]) {
stroke-width: 1.75;
:root {
--icon-stroke: 1.05px;
}

:where(
svg.lucide[stroke-width="2"]:not(
[class*="stroke-1"],
[class*="stroke-2"],
[class*="stroke-["],
Comment thread
maria-rcks marked this conversation as resolved.
Resolved
[class*="stroke-width"]
)
) {
stroke-width: var(--icon-stroke);
--icon-vector-effect: non-scaling-stroke;
}

/* With a size class of 20px or more the line grows with the icon (size / 16), so large icons
are not hairlines. Scaled, the length is in grid units; 1.5 of them equal the line at 16px. */
:where(
svg.lucide[stroke-width="2"]:is(
[class*="size-5"],
[class*="size-6"],
Comment thread
maria-rcks marked this conversation as resolved.
Resolved
[class*="size-7"],
[class*="size-8"],
[class*="size-9"],
[class*="size-10"],
[class*="size-11"],
[class*="size-12"]
Comment thread
maria-rcks marked this conversation as resolved.
Resolved
)
) {
stroke-width: calc(var(--icon-stroke) * 1.5);
--icon-vector-effect: none;
}

/* The effect reaches the shapes through a variable: a child selector under the attribute
selectors above makes Chromium restyle a whole subtree on any ancestor class change. */
:where(svg.lucide) > * {
vector-effect: var(--icon-vector-effect);
}
}

Expand Down
Loading