Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

chg(ui): use 0.5px borders and rings, change surface active style to support (#4678)

Seamus8c3063025ae5
diff --git a/js/app/packages/app/component/Launcher.tsx b/js/app/packages/app/component/Launcher.tsx
index 649ad12e52..4702f881c7 100644
--- a/js/app/packages/app/component/Launcher.tsx
+++ b/js/app/packages/app/component/Launcher.tsx
@@ -737,7 +737,7 @@ export const LauncherInner = (props: LauncherInnerProps) => {
onCleanup(hkGroup.dispose);
return (
- <div class="bg-surface ring-1 ring-edge-muted rounded-xl max-w-[calc(100vw-2rem)]">
+ <div class="bg-surface ring ring-edge-muted rounded-xl max-w-[calc(100vw-2rem)]">
<div class="flex items-center justify-between p-2 px-4 sm:px-6 border-b border-edge-muted">
<h1 class="font-bold text-ink-muted">Create New</h1>
<p class="gap-2 text-ink-extra-muted text-xs items-center hidden touch:hidden md:flex">
diff --git a/js/app/packages/app/component/interactive-onboarding/MobileWebWelcome.tsx b/js/app/packages/app/component/interactive-onboarding/MobileWebWelcome.tsx
index 4f28db6eff..1af2f92ded 100644
--- a/js/app/packages/app/component/interactive-onboarding/MobileWebWelcome.tsx
+++ b/js/app/packages/app/component/interactive-onboarding/MobileWebWelcome.tsx
@@ -71,7 +71,7 @@ export default function MobileWebWelcome(props: MobileWebWelcomeProps) {
<A
href="/login"
onClick={() => analytics.track('login_from_onboarding')}
- class="w-full px-3 py-2.5 text-lg rounded-xs flex items-center justify-between gap-2 border-none bg-transparent text-ink/50 hover:bg-hover/60 ring-1 ring-edge-muted"
+ class="w-full px-3 py-2.5 text-lg rounded-xs flex items-center justify-between gap-2 border-none bg-transparent text-ink/50 hover:bg-hover/60 ring ring-edge-muted"
>
Login
</A>
diff --git a/js/app/packages/app/component/interactive-onboarding/OnboardingLesson.tsx b/js/app/packages/app/component/interactive-onboarding/OnboardingLesson.tsx
index 29b1e987be..24975b2942 100644
--- a/js/app/packages/app/component/interactive-onboarding/OnboardingLesson.tsx
+++ b/js/app/packages/app/component/interactive-onboarding/OnboardingLesson.tsx
@@ -65,7 +65,7 @@ export function OnboardingLessonActions(props: LessonActionsProps) {
type="button"
onClick={onboarding.handleSkipLesson}
class={cn(
- 'w-full px-3 py-2.5 text-lg font-bold rounded-xs flex items-center gap-2 border-none bg-transparent text-ink/60 hover:bg-hover ring-1 ring-edge-muted',
+ 'w-full px-3 py-2.5 text-lg font-bold rounded-xs flex items-center gap-2 border-none bg-transparent text-ink/60 hover:bg-hover ring ring-edge-muted',
props.lesson.definition.centeredButton
? 'justify-center'
: 'justify-between'
diff --git a/js/app/packages/app/component/interactive-onboarding/components-lib.tsx b/js/app/packages/app/component/interactive-onboarding/components-lib.tsx
index c510355082..6f6bf6da01 100644
--- a/js/app/packages/app/component/interactive-onboarding/components-lib.tsx
+++ b/js/app/packages/app/component/interactive-onboarding/components-lib.tsx
@@ -218,7 +218,7 @@ export function ContinueButton(props: ContinueButtonProps) {
'w-full px-3 py-2.5 text-lg font-bold rounded-xs flex items-center gap-2 border-none',
props.centered ? 'justify-center' : 'justify-between',
{
- 'bg-transparent text-ink/40 font-normal ring-1 ring-edge-muted':
+ 'bg-transparent text-ink/40 font-normal ring ring-edge-muted':
props.disabled,
'bg-accent text-surface hover:bg-accent/90': !props.disabled,
}
diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/searchable-multi-select.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/searchable-multi-select.tsx
index d591fd4841..2b7d60d8ea 100644
--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/searchable-multi-select.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/searchable-multi-select.tsx
@@ -272,7 +272,7 @@ export const SearchableMultiSelect = (props: SearchableMultiSelectProps) => {
<Layer depth={2}>
<Combobox.Content
class={cn(
- 'z-action-menu bg-surface ring-1 ring-edge-muted rounded-xl shadow-md w-65 max-w-[90vw] overflow-hidden',
+ 'z-action-menu bg-surface ring ring-edge-muted rounded-xl shadow-md w-65 max-w-[90vw] overflow-hidden',
props.contentClass
)}
>
diff --git a/js/app/packages/app/component/settings/Crm.tsx b/js/app/packages/app/component/settings/Crm.tsx
index 172024dd95..413973cddd 100644
--- a/js/app/packages/app/component/settings/Crm.tsx
+++ b/js/app/packages/app/component/settings/Crm.tsx
@@ -189,7 +189,7 @@ function InlineSelect<T extends string>(props: {
<CaretDownIcon class="size-3 text-ink-muted shrink-0" />
</Select.Trigger>
<Select.Portal>
- <Select.Content class="z-50 bg-surface ring-1 ring-edge rounded shadow-lg min-w-25 p-1">
+ <Select.Content class="z-50 bg-surface ring ring-edge rounded shadow-lg min-w-25 p-1">
<Select.Listbox />
</Select.Content>
</Select.Portal>
diff --git a/js/app/packages/app/component/settings/Team.tsx b/js/app/packages/app/component/settings/Team.tsx
index dd661fe4b5..75e15dad74 100644
--- a/js/app/packages/app/component/settings/Team.tsx
+++ b/js/app/packages/app/component/settings/Team.tsx
@@ -127,7 +127,7 @@ function RoleSelect(props: {
<CaretDownIcon class="size-3 text-ink-muted shrink-0" />
</Select.Trigger>
<Select.Portal>
- <Select.Content class="z-50 bg-surface ring-1 ring-edge rounded shadow-lg min-w-25 p-1">
+ <Select.Content class="z-50 bg-surface ring ring-edge rounded shadow-lg min-w-25 p-1">
<Select.Listbox />
</Select.Content>
</Select.Portal>
diff --git a/js/app/packages/app/component/split-layout/components/SplitPanel.tsx b/js/app/packages/app/component/split-layout/components/SplitPanel.tsx
index db01ef9a25..226374f8db 100644
--- a/js/app/packages/app/component/split-layout/components/SplitPanel.tsx
+++ b/js/app/packages/app/component/split-layout/components/SplitPanel.tsx
@@ -221,6 +221,7 @@ export function SplitPanel(props: SplitPanelProps) {
multipleSplits() &&
!props.handle.isSpotLight()
}
+ highlightColor="oklch(var(--a0l) var(--a0c) var(--a0h) / 0.5)"
class="rounded-xl mobile:rounded-none mobile:after:hidden mobile:border-0!"
depth={isMobile() ? 0 : 1}
>
diff --git a/js/app/packages/app/index.css b/js/app/packages/app/index.css
index caa7e99b2f..b5c58a515a 100644
--- a/js/app/packages/app/index.css
+++ b/js/app/packages/app/index.css
@@ -114,6 +114,10 @@
/* Disable default tailwind color palette */
--color-*: initial;
+ /* Match the hairline borders: make the default `ring` a 0.5px ring.
+ Explicit widths (ring, ring-2, …) are left untouched. */
+ --default-ring-width: 0.5px;
+
/* Semantic Color names, use these when writing tailwind */
--color-accent: var(--a0);
--color-accent-bg: oklch(var(--a0) / 0.08);
@@ -122,7 +126,7 @@
--color-surface: var(--b0);
--color-drop-shadow: oklch(0.15 0 0 / 0.04);
--color-overlay: oklch(var(--b1l) var(--b1c) var(--b1h) / 0.8);
-
+
--color-edge-muted: var(--b3);
--color-edge: var(--b4);
--color-rail: color-mix(in oklch, var(--b4) 90%, var(--c0));
@@ -148,7 +152,7 @@
--color-button: var(--theme-button, var(--b0));
/* Used for floating mobile navigation chrome */
--color-chrome: var(--theme-chrome, color-mix(in oklch, var(--color-menu) 85%, var(--color-active)));
-
+
/* Below are hardcoded colors */
--color-failure: oklch(0.637 0.237 25.331);
@@ -402,6 +406,38 @@ a {
font-optical-sizing: auto;
}
+/* Hairline borders app-wide. We override Tailwind's default 1px width utilities
+ so every border renders at 0.5px, including single-side borders, without
+ having to sprinkle a modifier on each element. Explicit widths (border-2,
+ border-4, …) are intentionally left untouched. */
+@utility border {
+ border-width: 0.5px;
+}
+@utility border-x {
+ border-inline-width: 0.5px;
+}
+@utility border-y {
+ border-block-width: 0.5px;
+}
+@utility border-s {
+ border-inline-start-width: 0.5px;
+}
+@utility border-e {
+ border-inline-end-width: 0.5px;
+}
+@utility border-t {
+ border-top-width: 0.5px;
+}
+@utility border-r {
+ border-right-width: 0.5px;
+}
+@utility border-b {
+ border-bottom-width: 0.5px;
+}
+@utility border-l {
+ border-left-width: 0.5px;
+}
+
@utility hover-transition-bg {
transition: background-color var(--transition);
&:hover { transition: none; }
diff --git a/js/app/packages/block-automation/component/AutomationTimePicker.tsx b/js/app/packages/block-automation/component/AutomationTimePicker.tsx
index 7e8118edad..3f9c4de286 100644
--- a/js/app/packages/block-automation/component/AutomationTimePicker.tsx
+++ b/js/app/packages/block-automation/component/AutomationTimePicker.tsx
@@ -90,7 +90,7 @@ export function AutomationTimePicker(props: {
</button>
<Show when={open()}>
<div
- class="absolute inset-x-0 top-full mt-1 z-action-menu bg-surface ring-1 ring-edge-muted rounded-sm p-3"
+ class="absolute inset-x-0 top-full mt-1 z-action-menu bg-surface ring ring-edge-muted rounded-sm p-3"
use:clickOutside={() => setOpen(false)}
>
<div class="flex items-center gap-2">
diff --git a/js/app/packages/block-channel/component/Compose.tsx b/js/app/packages/block-channel/component/Compose.tsx
index 815f0ef020..e517616a3b 100644
--- a/js/app/packages/block-channel/component/Compose.tsx
+++ b/js/app/packages/block-channel/component/Compose.tsx
@@ -273,7 +273,7 @@ export function ChannelCompose() {
>
<Surface
depth={2}
- class="rounded-xl mobile:rounded-3xl ring-1 ring-edge"
+ class="rounded-xl mobile:rounded-3xl ring ring-edge"
style={{ border: '0' }}
>
<Input.DropZone
diff --git a/js/app/packages/block-code/component/CodeFileTypeChip.tsx b/js/app/packages/block-code/component/CodeFileTypeChip.tsx
index 101e5fd9a2..686b826260 100644
--- a/js/app/packages/block-code/component/CodeFileTypeChip.tsx
+++ b/js/app/packages/block-code/component/CodeFileTypeChip.tsx
@@ -89,7 +89,7 @@ export function CodeFileTypeChip() {
{fileType()}
</Popover.Trigger>
<Popover.Portal>
- <Popover.Content class="z-50 w-48 rounded shadow-md ring-1 ring-edge bg-surface text-ink text-sm overflow-hidden">
+ <Popover.Content class="z-50 w-48 rounded shadow-md ring ring-edge bg-surface text-ink text-sm overflow-hidden">
<div class="p-1.5 border-b border-edge">
<input
ref={searchRef}
diff --git a/js/app/packages/block-md/component/MarkdownPopup.tsx b/js/app/packages/block-md/component/MarkdownPopup.tsx
index 8ce34578ce..c3d7e880b7 100644
--- a/js/app/packages/block-md/component/MarkdownPopup.tsx
+++ b/js/app/packages/block-md/component/MarkdownPopup.tsx
@@ -452,7 +452,7 @@ export function MarkdownPopup(props: {
</p>
<div class="flex flex-row items-center space-x-2 w-full px-2">
<textarea
- class="resize-none rounded-xs w-full p-2 my-3 text-sm h-max-[800px] overflow-hidden ring-1 ring-edge bg-hover"
+ class="resize-none rounded-xs w-full p-2 my-3 text-sm h-max-[800px] overflow-hidden ring ring-edge bg-hover"
ref={setRewriteInputRef}
rows={1}
onSubmit={(e) => e.preventDefault()}
diff --git a/js/app/packages/block-md/history/HistorySessionList.tsx b/js/app/packages/block-md/history/HistorySessionList.tsx
index 2dda901cea..1166dd42d9 100644
--- a/js/app/packages/block-md/history/HistorySessionList.tsx
+++ b/js/app/packages/block-md/history/HistorySessionList.tsx
@@ -83,7 +83,7 @@ export function HistorySessionList(props: HistorySessionListProps) {
<For each={row.userIds.slice(0, MAX_NAMED)}>
{(userId) => (
<span
- class="size-2 rounded-full ring-1 ring-surface"
+ class="size-2 rounded-full ring ring-surface"
style={{ 'background-color': userColor(userId) }}
/>
)}
diff --git a/js/app/packages/block-md/history/UserHoverTag.tsx b/js/app/packages/block-md/history/UserHoverTag.tsx
index bcec38a1cf..6d935a3552 100644
--- a/js/app/packages/block-md/history/UserHoverTag.tsx
+++ b/js/app/packages/block-md/history/UserHoverTag.tsx
@@ -10,7 +10,7 @@ export function UserHoverTag(props: {
}) {
return (
<div
- class="pointer-events-none absolute z-30 flex items-center gap-1.5 rounded-md bg-surface px-2 py-1 text-ink text-xs shadow-lg ring-1 ring-edge-muted"
+ class="pointer-events-none absolute z-30 flex items-center gap-1.5 rounded-md bg-surface px-2 py-1 text-ink text-xs shadow-lg ring ring-edge-muted"
style={{ left: `${props.left}px`, top: `${props.top}px` }}
>
<span
diff --git a/js/app/packages/channel/Input/ChannelInput.tsx b/js/app/packages/channel/Input/ChannelInput.tsx
index e3e1dfa2ad..488e1311f9 100644
--- a/js/app/packages/channel/Input/ChannelInput.tsx
+++ b/js/app/packages/channel/Input/ChannelInput.tsx
@@ -368,8 +368,6 @@ export function ChannelInput(props: ChannelInputProps) {
},
});
- const [isFocused, setIsFocused] = createSignal(false);
-
return (
<Input.Root input={inputState.view()} commands={inputState.commands}>
<Show when={isCollapsed()}>
@@ -408,11 +406,8 @@ export function ChannelInput(props: ChannelInputProps) {
const next = e.relatedTarget as Node | null;
if (next && e.currentTarget.contains(next)) return;
if (isInternalRefocus) return;
- setIsFocused(false);
collapsedInput.collapse();
}}
- onFocusIn={() => setIsFocused(true)}
- active={isFocused()}
class={cn(
'rounded-xl mobile:rounded-3xl mobile:island',
isCollapsed() && 'hidden'
diff --git a/js/app/packages/channel/Message/EmojiReactionPopover.tsx b/js/app/packages/channel/Message/EmojiReactionPopover.tsx
index 1badaa750e..fab845b83f 100644
--- a/js/app/packages/channel/Message/EmojiReactionPopover.tsx
+++ b/js/app/packages/channel/Message/EmojiReactionPopover.tsx
@@ -49,7 +49,7 @@ export function EmojiReactionPopover(props: EmojiReactionPopoverProps) {
<Popover.Content class="z-modal">
<Popover.Arrow class="fill-surface" />
<div
- class="w-64.5 h-78.75 pl-2 pt-2 rounded-md flex flex-col bg-surface shadow-lg ring-1 ring-edge"
+ class="w-64.5 h-78.75 pl-2 pt-2 rounded-md flex flex-col bg-surface shadow-lg ring ring-edge"
role="dialog"
aria-label="Emoji search"
>
diff --git a/js/app/packages/channel/Message/ReactionChip.tsx b/js/app/packages/channel/Message/ReactionChip.tsx
index 54c0096c86..733cdd1123 100644
--- a/js/app/packages/channel/Message/ReactionChip.tsx
+++ b/js/app/packages/channel/Message/ReactionChip.tsx
@@ -114,7 +114,7 @@ export function ReactionChip(props: ReactionChipProps) {
</HoverCard>
</Popover.Anchor>
<Popover.Portal>
- <Popover.Content class="z-modal bg-surface p-1.5 text-ink-muted text-xs rounded-sm ring-1 ring-edge-muted">
+ <Popover.Content class="z-modal bg-surface p-1.5 text-ink-muted text-xs rounded-sm ring ring-edge-muted">
<ReactionTooltipContent
users={props.users}
currentUserId={props.currentUserId}
diff --git a/js/app/packages/core/component/AI/component/InlineAi.tsx b/js/app/packages/core/component/AI/component/InlineAi.tsx
index 465e94890a..1dcaf37457 100644
--- a/js/app/packages/core/component/AI/component/InlineAi.tsx
+++ b/js/app/packages/core/component/AI/component/InlineAi.tsx
@@ -49,7 +49,7 @@ export function InlineInputReady(props: InlineInputReadyProps) {
});
return (
- <div class="relative flex items-end justify-between p-2 ring-1 ring-edge rounded-xs w-full bg-hover">
+ <div class="relative flex items-end justify-between p-2 ring ring-edge rounded-xs w-full bg-hover">
<textarea
class="flex resize-none w-full p-1 text-sm h-max-[800px] overflow-hidden"
ref={inputRef}
@@ -107,7 +107,7 @@ type InlineInputLoadingProps = {
export function InlineInputLoading(props: InlineInputLoadingProps) {
return (
- <div class="relative flex items-end justify-between p-2 ring-1 ring-edge rounded-xs w-full bg-hover">
+ <div class="relative flex items-end justify-between p-2 ring ring-edge rounded-xs w-full bg-hover">
<textarea
class="flex resize-none rounded-md w-full p-1 text-sm h-max-[800px] overflow-hidden select-none"
disabled
@@ -126,7 +126,7 @@ export function InlineInputLoading(props: InlineInputLoadingProps) {
export function InlineInputDisabled(props: InlineInputLoadingProps) {
return (
- <div class="relative flex items-end justify-between p-2 ring-1 ring-edge rounded-xs w-full bg-hover">
+ <div class="relative flex items-end justify-between p-2 ring ring-edge rounded-xs w-full bg-hover">
<textarea
class="flex resize-none rounded-md w-full p-1 text-sm h-max-[800px] overflow-hidden select-none"
disabled
diff --git a/js/app/packages/core/component/AI/component/tool/SendEmail.tsx b/js/app/packages/core/component/AI/component/tool/SendEmail.tsx
index 6d20726e97..e997d6b10f 100644
--- a/js/app/packages/core/component/AI/component/tool/SendEmail.tsx
+++ b/js/app/packages/core/component/AI/component/tool/SendEmail.tsx
@@ -94,7 +94,7 @@ function DraftPreviewButton(props: {
return (
<button
- class="text-ink text-xs ring-1 ring-edge-muted rounded-xs hover:bg-surface-hover flex flex-row h-6 px-2 justify-center items-center"
+ class="text-ink text-xs ring ring-edge-muted rounded-xs hover:bg-surface-hover flex flex-row h-6 px-2 justify-center items-center"
onClick={() =>
replaceOrInsertSplit({
...(props.threadId
diff --git a/js/app/packages/core/component/ContextMenu.tsx b/js/app/packages/core/component/ContextMenu.tsx
index 71233ae252..953bb84406 100644
--- a/js/app/packages/core/component/ContextMenu.tsx
+++ b/js/app/packages/core/component/ContextMenu.tsx
@@ -304,7 +304,7 @@ const menuWidths: Record<MenuWidth, string> = {
screen: 'w-screen',
};
-export const MENU_CONTENT_CLASS = `flex flex-col justify-start items-start bg-surface shadow-menu ring-1 ring-edge rounded-xl p-1.5 cursor-default select-none max-w-full max-h-[calc(100dvh-10rem)] overflow-y-auto z-modal menu-open-animation`;
+export const MENU_CONTENT_CLASS = `flex flex-col justify-start items-start bg-surface shadow-menu ring ring-edge rounded-xl p-1.5 cursor-default select-none max-w-full max-h-[calc(100dvh-10rem)] overflow-y-auto z-modal menu-open-animation`;
type MenuContentProps = ParentProps<{
class?: string;
diff --git a/js/app/packages/core/component/DatePicker/DatePickerUI.tsx b/js/app/packages/core/component/DatePicker/DatePickerUI.tsx
index 06e85b7a1f..b3d116c152 100644
--- a/js/app/packages/core/component/DatePicker/DatePickerUI.tsx
+++ b/js/app/packages/core/component/DatePicker/DatePickerUI.tsx
@@ -236,7 +236,7 @@ export function DatePickerUI(props: DatePickerUIProps) {
classList={{
'bg-accent text-surface': isSelected(day!),
'hover:bg-active': !isSelected(day!),
- 'ring-1 ring-accent': isToday(day!),
+ 'ring ring-accent': isToday(day!),
}}
disabled={
(props.disablePriorToDate &&
diff --git a/js/app/packages/core/component/DatePicker/index.tsx b/js/app/packages/core/component/DatePicker/index.tsx
index afc97bdad5..d068242413 100644
--- a/js/app/packages/core/component/DatePicker/index.tsx
+++ b/js/app/packages/core/component/DatePicker/index.tsx
@@ -15,7 +15,7 @@ type DatePickerProps = {
export function DatePicker(props: DatePickerProps) {
return (
<div
- class="absolute z-action-menu bg-surface ring-1 ring-edge-muted font-mono text-sm"
+ class="absolute z-action-menu bg-surface ring ring-edge-muted font-mono text-sm"
use:floatWithElement={{ element: () => props.anchorRef }}
use:clickOutside={props.onClose}
>
diff --git a/js/app/packages/core/component/GeneralizedPopup/Popup.tsx b/js/app/packages/core/component/GeneralizedPopup/Popup.tsx
index 92d026fe3b..483613d1c7 100644
--- a/js/app/packages/core/component/GeneralizedPopup/Popup.tsx
+++ b/js/app/packages/core/component/GeneralizedPopup/Popup.tsx
@@ -70,7 +70,7 @@ export function GeneralizedPopup(props: GeneralizedPopupProps) {
<div
ref={mergeRefs(setPopupRef, props.ref)}
id="generalized-popup"
- class="absolute bg-surface shadow-xl ring-1 ring-edge rounded-lg z-highlight-menu inline-flex items-start flex-col p-1"
+ class="absolute bg-surface shadow-xl ring ring-edge rounded-lg z-highlight-menu inline-flex items-start flex-col p-1"
style={{
left: `${position().x}px`,
top: `${position().y}px`,
diff --git a/js/app/packages/core/component/ItemPreview.tsx b/js/app/packages/core/component/ItemPreview.tsx
index 95cc2129f6..81596b1b19 100644
--- a/js/app/packages/core/component/ItemPreview.tsx
+++ b/js/app/packages/core/component/ItemPreview.tsx
@@ -117,7 +117,7 @@ export function useItemPreviewData(entity: Accessor<ItemEntity>) {
}
const DEFAULT_BUTTON_CLASS =
- 'text-ink-base text-sm ring-1 ring-edge-muted rounded-xs hover:bg-surface-hover flex flex-row h-6 px-2 justify-center items-center';
+ 'text-ink-base text-sm ring ring-edge-muted rounded-xs hover:bg-surface-hover flex flex-row h-6 px-2 justify-center items-center';
const DEFAULT_ICON_CLASS = 'flex justify-start items-center w-3.5 h-3.5 mr-2';
const DEFAULT_TEXT_CLASS = 'flex-1 text-left leading-5 min-w-0 truncate';
diff --git a/js/app/packages/core/component/LexicalMarkdown/component/accessory/CodeBoxAccessory.tsx b/js/app/packages/core/component/LexicalMarkdown/component/accessory/CodeBoxAccessory.tsx
index a68e3f0b3c..0f3a67b259 100644
--- a/js/app/packages/core/component/LexicalMarkdown/component/accessory/CodeBoxAccessory.tsx
+++ b/js/app/packages/core/component/LexicalMarkdown/component/accessory/CodeBoxAccessory.tsx
@@ -255,7 +255,7 @@ export function CodeBoxAccessory(props: {
}}
>
<Switch.Input class="sr-only" />
- <Switch.Control class="inline-flex h-4 w-8 hover:ring-1 hover:ring-edge rounded-full border-2 border-transparent transition-colors bg-edge focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 data-checked:bg-accent">
+ <Switch.Control class="inline-flex h-4 w-8 hover:ring hover:ring-edge rounded-full border-2 border-transparent transition-colors bg-edge focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 data-checked:bg-accent">
<Switch.Thumb class="block size-3 rounded-full bg-surface transition-transform data-checked:translate-x-4" />
</Switch.Control>
</Switch>
@@ -437,7 +437,7 @@ export const StaticCodeBoxAccessory = (props: {
<div class={cn('text-xs', textColor())}>Preview</div>
<Switch checked={isPreviewMode()} onChange={setIsPreviewMode}>
<Switch.Input class="sr-only" />
- <Switch.Control class="inline-flex h-4 w-8 hover:ring-1 hover:ring-edge rounded-full border-2 border-transparent transition-colors bg-edge focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 data-checked:bg-accent">
+ <Switch.Control class="inline-flex h-4 w-8 hover:ring hover:ring-edge rounded-full border-2 border-transparent transition-colors bg-edge focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 data-checked:bg-accent">
<Switch.Thumb class="block size-3 rounded-full transition-transform data-checked:translate-x-4 bg-surface" />
</Switch.Control>
</Switch>
diff --git a/js/app/packages/core/component/LexicalMarkdown/component/decorator/ContactMention.tsx b/js/app/packages/core/component/LexicalMarkdown/component/decorator/ContactMention.tsx
index 1d1547a7c6..8f0e747f35 100644
--- a/js/app/packages/core/component/LexicalMarkdown/component/decorator/ContactMention.tsx
+++ b/js/app/packages/core/component/LexicalMarkdown/component/decorator/ContactMention.tsx
@@ -131,7 +131,7 @@ export function ContactMention(props: ContactMentionDecoratorProps) {
<Show when={popupOpen()}>
<Portal>
<div
- class="absolute select-none overflow-hidden z-toast-region w-64 bg-surface ring-1 ring-edge text-ink rounded-lg p-3"
+ class="absolute select-none overflow-hidden z-toast-region w-64 bg-surface ring ring-edge text-ink rounded-lg p-3"
use:floatWithElement={{ element: () => mentionRef }}
>
<div class="flex items-center gap-2">
diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/FloatingEquationMenu.tsx b/js/app/packages/core/component/LexicalMarkdown/component/menu/FloatingEquationMenu.tsx
index 4e923dd0d8..ac7a8c4046 100644
--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/FloatingEquationMenu.tsx
+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/FloatingEquationMenu.tsx
@@ -219,7 +219,7 @@ export function FloatingEquationMenu() {
return (
<Show when={menuOpen()}>
<div
- class="p-4 fixed bg-surface top-0 left-0 z-action-menu rounded-lg shadow-lg w-96 ring-1 ring-edge"
+ class="p-4 fixed bg-surface top-0 left-0 z-action-menu rounded-lg shadow-lg w-96 ring ring-edge"
use:floatWithElement={{ element: getElement }}
use:floatWithSelection={{
selection: untrack(getSelection),
@@ -239,7 +239,7 @@ export function FloatingEquationMenu() {
value={equation() ?? ''}
onInput={(e) => setEquation(e.currentTarget.value)}
placeholder="Enter LaTeX expression"
- class="w-full p-2 border border-edge rounded-md focus:ring-1 focus:ring-accent/40 focus:border-accent/40 outline-none transition"
+ class="w-full p-2 border border-edge rounded-md focus:ring focus:ring-accent/40 focus:border-accent/40 outline-none transition"
/>
) : (
<textarea
@@ -249,7 +249,7 @@ export function FloatingEquationMenu() {
value={equation() ?? ''}
onInput={(e) => setEquation(e.currentTarget.value)}
placeholder="Enter LaTeX expression"
- class="w-full p-2 border border-edge rounded-md focus:ring-1 focus:ring-accent/40 focus:border-accent/40 outline-none transition resize-none"
+ class="w-full p-2 border border-edge rounded-md focus:ring focus:ring-accent/40 focus:border-accent/40 outline-none transition resize-none"
/>
)}
</div>
diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/FloatingFormatMenu.tsx b/js/app/packages/core/component/LexicalMarkdown/component/menu/FloatingFormatMenu.tsx
index 6fee3b1d06..0960c52b8d 100644
--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/FloatingFormatMenu.tsx
+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/FloatingFormatMenu.tsx
@@ -229,7 +229,7 @@ export function FloatingFormatMenu(props: {
<Layer depth={2}>
<div
ref={setMenuRef}
- class="fixed top-0 left-0 z-highlight-menu bg-surface shadow-xl ring-1 ring-edge rounded-lg p-1 flex flex-row items-center gap-1"
+ class="fixed top-0 left-0 z-highlight-menu bg-surface shadow-xl ring ring-edge rounded-lg p-1 flex flex-row items-center gap-1"
use:floatWithSelection={{
selection: domSelection(),
reactiveOnContainer: editor.getRootElement(),
diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/FloatingLinkMenu.tsx b/js/app/packages/core/component/LexicalMarkdown/component/menu/FloatingLinkMenu.tsx
index 3a5992c755..83d93d4de8 100644
--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/FloatingLinkMenu.tsx
+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/FloatingLinkMenu.tsx
@@ -378,7 +378,7 @@ export function FloatingLinkMenu(props: {
{(link) => (
<ScopedPortal>
<div
- class="p-2 absolute top-0 left-0 z-10 bg-surface w-80 shadow-lg ring-edge-muted rounded-sm ring-1"
+ class="p-2 absolute top-0 left-0 z-10 bg-surface w-80 shadow-lg ring-edge-muted rounded-sm ring"
use:floatWithElement={{
element: () => link().linkRef,
useBlockBoundary: true,
diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/GenerateMenu.tsx b/js/app/packages/core/component/LexicalMarkdown/component/menu/GenerateMenu.tsx
index 28304a8c5c..91e2b4e8fd 100644
--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/GenerateMenu.tsx
+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/GenerateMenu.tsx
@@ -101,7 +101,7 @@ function GenerateActionMenu(props: GenerateMenuProps) {
});
return (
- <div class="w-fit flex flex-col ring-1 ring-edge rounded-md p-1 bg-surface shadow-md space-y-1">
+ <div class="w-fit flex flex-col ring ring-edge rounded-md p-1 bg-surface shadow-md space-y-1">
<MenuItem
onClick={() => {
props.editor.dispatchCommand(ACCEPT_COMPLETION, undefined);
diff --git a/js/app/packages/core/component/OldMenu.tsx b/js/app/packages/core/component/OldMenu.tsx
index cb26962d89..4e4d30f0c9 100644
--- a/js/app/packages/core/component/OldMenu.tsx
+++ b/js/app/packages/core/component/OldMenu.tsx
@@ -242,7 +242,7 @@ export function OldMenu(props: ParentProps<OldMenuProps>) {
return (
<div
class={cn(
- 'flex flex-col py-1 justify-start items-start bg-surface shadow-lg rounded-md ring-1 ring-edge cursor-default select-none',
+ 'flex flex-col py-1 justify-start items-start bg-surface shadow-lg rounded-md ring ring-edge cursor-default select-none',
props.width && (oldMenuWidths[props.width] ?? props.width),
isTouchDevice() && 'relative',
props.hide && 'hidden',
diff --git a/js/app/packages/core/component/RecipientSelector.tsx b/js/app/packages/core/component/RecipientSelector.tsx
index f571a437ec..21e884778c 100644
--- a/js/app/packages/core/component/RecipientSelector.tsx
+++ b/js/app/packages/core/component/RecipientSelector.tsx
@@ -612,7 +612,7 @@ export function RecipientSelector<K extends CombinedRecipientKind>(
}
class={cn(
'ph-no-capture w-full text-sm offset-2 bg-surface rounded-2xl',
- !props.hideBorder && 'ring-1 ring-edge',
+ !props.hideBorder && 'ring ring-edge',
!props.noPadding && 'p-2',
props.class
)}
diff --git a/js/app/packages/core/component/UserIcon.tsx b/js/app/packages/core/component/UserIcon.tsx
index 44423484ff..f69e855c30 100644
--- a/js/app/packages/core/component/UserIcon.tsx
+++ b/js/app/packages/core/component/UserIcon.tsx
@@ -173,10 +173,7 @@ export function UserIcon(props: UserIconProps) {
<Match when={isMacroAgentId(props.id)}>
<Avatar
size={size()}
- class={cn(
- 'bg-surface text-accent ring-1 ring-edge-muted',
- props.class
- )}
+ class={cn('bg-surface text-accent ring ring-edge-muted', props.class)}
>
<Avatar.Fallback>
<MacroLogo class="size-[62%]" />
diff --git a/js/app/packages/core/internal/IconGallery.tsx b/js/app/packages/core/internal/IconGallery.tsx
index 50e8cd30d2..93f01bab7a 100644
--- a/js/app/packages/core/internal/IconGallery.tsx
+++ b/js/app/packages/core/internal/IconGallery.tsx
@@ -228,7 +228,7 @@ export default function IconGallery() {
onClick={() => setSelectedColor(color)}
class="size-2.5 rounded-[1px] transition-transform hover:scale-125"
classList={{
- 'ring-1 ring-ink ring-offset-1':
+ 'ring ring-ink ring-offset-1':
selectedColor().value === color.value,
}}
style={{ background: color.css }}
@@ -243,7 +243,7 @@ export default function IconGallery() {
<label
class="relative size-2.5 rounded-[1px] transition-transform hover:scale-125"
classList={{
- 'ring-1 ring-ink ring-offset-1':
+ 'ring ring-ink ring-offset-1':
selectedColor().value === 'custom',
}}
style={{
diff --git a/js/app/packages/core/internal/PixelArtIconDemo.tsx b/js/app/packages/core/internal/PixelArtIconDemo.tsx
index 2fc561b59a..4b42904af8 100644
--- a/js/app/packages/core/internal/PixelArtIconDemo.tsx
+++ b/js/app/packages/core/internal/PixelArtIconDemo.tsx
@@ -1093,7 +1093,7 @@ function GlyphSidebar(props: GlyphSidebarProps) {
props.onGlyphRename(props.selectedGlyph, newName);
}
}}
- class="font-mono text-ink-muted text-sm text-left w-full ring-1 ring-edge"
+ class="font-mono text-ink-muted text-sm text-left w-full ring ring-edge"
/>
<div class="size-32 flex items-center justify-center border border-edge bg-background">
<Show when={selectedPixels()}>
diff --git a/js/app/packages/entity/src/composed/list-entity/foreign.tsx b/js/app/packages/entity/src/composed/list-entity/foreign.tsx
index b0d03acef5..ed34f425ec 100644
--- a/js/app/packages/entity/src/composed/list-entity/foreign.tsx
+++ b/js/app/packages/entity/src/composed/list-entity/foreign.tsx
@@ -365,7 +365,7 @@ function GithubPullRequestChecksPopover(props: {
<Layer depth={5}>
<span
class={cn(
- 'absolute right-1.5 top-1/2 z-10 inline-flex size-5 -translate-y-1/2 items-center justify-center rounded-md bg-active text-ink-extra-muted opacity-0 shadow-sm ring-1 ring-edge-muted',
+ 'absolute right-1.5 top-1/2 z-10 inline-flex size-5 -translate-y-1/2 items-center justify-center rounded-md bg-active text-ink-extra-muted opacity-0 shadow-sm ring ring-edge-muted',
hasUrl() && 'group-hover/check-card:opacity-100'
)}
>
diff --git a/js/app/packages/property/src/tags/EntityRowTags.tsx b/js/app/packages/property/src/tags/EntityRowTags.tsx
index aa5f9b3d8c..1ddd8dc4e4 100644
--- a/js/app/packages/property/src/tags/EntityRowTags.tsx
+++ b/js/app/packages/property/src/tags/EntityRowTags.tsx
@@ -120,10 +120,7 @@ function TagOverflow(props: {
{(tag, index) => (
<TagDot
color={tag.color}
- class={cn(
- 'size-2 ring-1 ring-surface',
- index() > 0 && '-ml-1'
- )}
+ class={cn('size-2 ring ring-surface', index() > 0 && '-ml-1')}
/>
)}
</For>
diff --git a/js/app/packages/property/src/tags/TagPicker.tsx b/js/app/packages/property/src/tags/TagPicker.tsx
index 14ce789197..6a743fc060 100644
--- a/js/app/packages/property/src/tags/TagPicker.tsx
+++ b/js/app/packages/property/src/tags/TagPicker.tsx
@@ -193,7 +193,7 @@ function TagPickerBody(props: {
<Popover.Portal>
<Layer depth={3}>
<Popover.Content
- class="z-modal w-64 rounded-xl bg-surface text-sm shadow-lg ring-1 ring-edge-muted"
+ class="z-modal w-64 rounded-xl bg-surface text-sm shadow-lg ring ring-edge-muted"
onCloseAutoFocus={(event) => event.preventDefault()}
onFocusOutside={(event) => {
if (props.dismissOnFocusOutside === false) event.preventDefault();
@@ -498,7 +498,7 @@ function DeleteConfirm(props: {
}) {
return (
<Dialog open={props.open} position="center" onOpenChange={props.onCancel}>
- <div class="rounded-xl bg-surface p-4 text-sm ring-1 ring-edge-muted">
+ <div class="rounded-xl bg-surface p-4 text-sm ring ring-edge-muted">
<div class="text-ink">Delete label "{props.label}"?</div>
<p class="mt-1 text-ink-muted">
It will be removed from every item it's applied to.
diff --git a/js/app/packages/theme/components/ColorPickerPopover.tsx b/js/app/packages/theme/components/ColorPickerPopover.tsx
index b281912dbd..d09b05d000 100644
--- a/js/app/packages/theme/components/ColorPickerPopover.tsx
+++ b/js/app/packages/theme/components/ColorPickerPopover.tsx
@@ -192,7 +192,7 @@ export function ColorPickerPopover(props: {
<Popover.Content class="z-modal">
<Popover.Arrow class="fill-surface" />
<div
- class="flex w-64 flex-col gap-3 rounded-xl bg-surface p-3 shadow-lg ring-1 ring-edge-muted"
+ class="flex w-64 flex-col gap-3 rounded-xl bg-surface p-3 shadow-lg ring ring-edge-muted"
role="dialog"
aria-label={props.ariaLabel}
>
diff --git a/js/app/packages/ui/components/Surface.tsx b/js/app/packages/ui/components/Surface.tsx
index c0f9cfcc70..2c5e04e55d 100644
--- a/js/app/packages/ui/components/Surface.tsx
+++ b/js/app/packages/ui/components/Surface.tsx
@@ -1,4 +1,3 @@
-import { isMobile } from '@core/mobile/isMobile';
import type { SemanticToken } from '@theme/types/themeTypes';
import { type JSX, splitProps } from 'solid-js';
import { cn } from '../utils/classname';
@@ -28,37 +27,31 @@ export function Surface(props: SurfaceProps) {
'hideBorder',
]);
- const defaultHighlightColor = isMobile() ? 'var(--color-edge)' : 'var(--a0)';
-
- const border = () => {
- const edge = 'var(--b4)';
- const top = local.active
- ? (local.highlightColor ?? defaultHighlightColor)
- : edge;
- const bottom = local.active && !local.solid ? `${edge} 80%` : top;
- return `linear-gradient(${top}, ${bottom})`;
- };
-
const bgVariable = () =>
local.bgToken ? `--color-${local.bgToken}` : '--b0';
+ const style = (): JSX.CSSProperties => {
+ const base: JSX.CSSProperties = {
+ 'background-color': `var(${bgVariable()})`,
+ };
+
+ if (!local.hideBorder) {
+ base.border = '0.5px solid var(--b4)';
+ }
+
+ if (local.active) {
+ const ring = local.highlightColor ?? 'var(--b4)';
+ base['box-shadow'] =
+ `0 0 0 2px color-mix(in srgb, ${ring} 60%, transparent)`;
+ }
+
+ return { ...base, ...local.style };
+ };
+
return (
<Layer depth={local.depth ?? 0}>
<div
- style={
- local.hideBorder
- ? {
- 'background-color': `var(${bgVariable()})`,
- ...local.style,
- }
- : {
- 'background-image': `linear-gradient(var(${bgVariable()}), var(${bgVariable()})), ${border()}`,
- 'background-origin': 'padding-box, border-box',
- 'background-clip': 'padding-box, border-box',
- border: '1px solid #0000',
- ...local.style,
- }
- }
+ style={style()}
class={cn(
'relative rounded-md overflow-clip min-h-0 size-full',
local.class