Skip to content

Commit aba7b8b

Browse files
committed
fix(tailwind): close the remaining v3/v4 rendering differences
Found by rebuilding the v3 stylesheet from this same tree and diffing computed styles for all 4,674 class strings the app actually uses — combinations, not just individual utilities, which is where these only show up. - leading-*/text-* precedence: v4 routes a text-* utility's line-height through --tw-leading, so a leading-* class now wins at every breakpoint. v3 let a responsive text-lg reassert its own 28px leading; restate that explicitly. - overflow-wrap: v4 emits the arbitrary property before `break-words`, flipping the winner from `anywhere` to `break-word`. Drop the redundant utility. - z-9999999 and duration-[30ms] never took effect under v3 (outside the generated scale; rejected as ambiguous). v4 honours both, which would change stacking order and a transition from 150ms to 30ms. Removed. - note-block focus ring: outline-<n> set width only in v3, so this drew nothing; v4 also sets outline-style. Removed to keep v3 rendering. Every remaining computed-style difference is now verified non-visual: colour notation (oklch/oklab, pixel-identical), gradient interpolation, mask-composite keyword aliasing, and outline-none vs outline-hidden.
1 parent bd60c8e commit aba7b8b

8 files changed

Lines changed: 9 additions & 9 deletions

File tree

apps/sim/app/(landing)/components/content-author-page/content-author-page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export function ContentAuthorPage({
8686
timeZone: 'UTC',
8787
})}
8888
</span>
89-
<h3 className='text-[var(--text-primary)] text-base leading-tight tracking-[-0.01em] lg:text-lg'>
89+
<h3 className='text-[var(--text-primary)] text-base leading-tight tracking-[-0.01em] lg:text-lg lg:leading-7'>
9090
{p.title}
9191
</h3>
9292
<p className='line-clamp-2 text-[var(--text-muted)] text-sm leading-[150%]'>

apps/sim/app/(landing)/components/content-index-page/content-index-page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export function ContentIndexPage({
128128
timeZone: 'UTC',
129129
})}
130130
</span>
131-
<h3 className='text-[var(--text-primary)] text-base leading-tight tracking-[-0.01em] lg:text-lg'>
131+
<h3 className='text-[var(--text-primary)] text-base leading-tight tracking-[-0.01em] lg:text-lg lg:leading-7'>
132132
{p.title}
133133
</h3>
134134
<p className='line-clamp-2 text-[var(--text-muted)] text-sm leading-[150%]'>

apps/sim/app/(landing)/components/content-post-page/content-post-page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function ContentPostPage({
7979
{post.title}
8080
</h1>
8181
<p
82-
className='mt-4 text-[var(--text-body)] text-base leading-[150%] tracking-[0.02em] sm:text-lg'
82+
className='mt-4 text-[var(--text-body)] text-base leading-[150%] tracking-[0.02em] sm:text-lg sm:leading-7'
8383
itemProp='description'
8484
>
8585
{post.description}

apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export interface PlusMenuHandle {
6262
* so the editor reads the same whether it's the chat input or inside the modal.
6363
*/
6464
const FIELD_MIRROR_CLASSES = cn(
65-
'm-0 box-border min-h-[24px] w-full break-words [overflow-wrap:anywhere] border-0 bg-transparent',
65+
'm-0 box-border min-h-[24px] w-full [overflow-wrap:anywhere] border-0 bg-transparent',
6666
'px-1 py-1 font-body text-[14px] leading-[24px] tracking-[-0.015em]'
6767
)
6868

apps/sim/app/workspace/[workspaceId]/home/components/user-message-content/user-message-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { ChatMessageContext } from '@/app/workspace/[workspaceId]/home/type
77
import { getIntegrationMatcher } from '@/blocks/integration-matcher'
88

99
const USER_MESSAGE_CLASSES =
10-
'whitespace-pre-wrap break-words [overflow-wrap:anywhere] font-[family-name:var(--font-inter)] text-base text-[var(--text-primary)] leading-[23px] tracking-[0] antialiased'
10+
'whitespace-pre-wrap [overflow-wrap:anywhere] font-[family-name:var(--font-inter)] text-base text-[var(--text-primary)] leading-[23px] tracking-[0] antialiased'
1111

1212
const COMPACT_CLASSES =
1313
'truncate text-small leading-[20px] font-[family-name:var(--font-inter)] text-[var(--text-primary)] tracking-[0] antialiased'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar/action-bar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ export const ActionBar = memo(
422422
className={cn(
423423
'relative flex flex-row items-center gap-[2px]',
424424
isSwell && [
425-
'pointer-events-none h-full opacity-0 transition-opacity duration-[30ms] [transition-timing-function:cubic-bezier(0.23,1,0.32,1)]',
425+
'pointer-events-none h-full opacity-0 transition-opacity [transition-timing-function:cubic-bezier(0.23,1,0.32,1)]',
426426
'group-data-[action-menu-ready]:pointer-events-auto group-data-[action-menu-ready]:opacity-100 group-data-[action-menu-ready]:duration-100',
427427
]
428428
)}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/wand-prompt-bar/wand-prompt-bar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function WandPromptBar({
8080
className={cn(
8181
'-translate-y-3 absolute right-0 bottom-full left-0 gap-2',
8282
'rounded-lg border bg-background shadow-lg',
83-
'z-9999999 transition-all duration-150',
83+
'transition-all duration-150',
8484
isExiting ? 'opacity-0' : 'opacity-100',
8585
className
8686
)}

packages/workflow-renderer/src/note/note-block-view.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ export function NoteBlockView({
10291029
onPointerDown={(event) => recordEditPointerStart(event, 'title')}
10301030
onClick={(event) => startEditing(event, 'title')}
10311031
className={cn(
1032-
'min-w-0 flex-1 cursor-text rounded-sm bg-transparent text-left outline-offset-1 focus-visible:outline-2 focus-visible:outline-current/50',
1032+
'min-w-0 flex-1 cursor-text rounded-sm bg-transparent text-left',
10331033
!isEnabled && 'opacity-50'
10341034
)}
10351035
>
@@ -1180,7 +1180,7 @@ export function NoteBlockView({
11801180
aria-label='Edit note content'
11811181
onPointerDown={(event) => recordEditPointerStart(event, 'content')}
11821182
onClick={(event) => startEditing(event, 'content')}
1183-
className='absolute inset-0 z-20 w-full cursor-text rounded-sm bg-transparent outline-offset-1 focus-visible:outline-2 focus-visible:outline-current/50'
1183+
className='absolute inset-0 z-20 w-full cursor-text rounded-sm bg-transparent'
11841184
/>
11851185
)}
11861186
<div

0 commit comments

Comments
 (0)