Skip to content

Commit 352b160

Browse files
chore: wip
1 parent 46b97c2 commit 352b160

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

packages/headwind/src/parser.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,9 @@ function parseClassImpl(className: string): ParsedClass {
10621062
'border-l',
10631063
'border-x',
10641064
'border-y',
1065+
// Logical border utilities (for RTL support)
1066+
'border-s',
1067+
'border-e',
10651068
'grid-cols',
10661069
'grid-rows',
10671070
'grid-flow',

packages/headwind/src/rules-layout.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ export const insetRule: UtilityRule = (parsed, config) => {
285285
'right': ['right'],
286286
'bottom': ['bottom'],
287287
'left': ['left'],
288+
// Logical inset (for RTL support)
289+
'start': ['inset-inline-start'],
290+
'end': ['inset-inline-end'],
288291
}
289292

290293
const props = directions[parsed.utility]

packages/headwind/src/rules.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,19 @@ export const spacingRule: UtilityRule = (parsed, config) => {
187187
pr: ['padding-right'],
188188
pb: ['padding-bottom'],
189189
pl: ['padding-left'],
190+
// Logical padding (for RTL support)
191+
ps: ['padding-inline-start'],
192+
pe: ['padding-inline-end'],
190193
m: ['margin'],
191194
mx: ['margin-left', 'margin-right'],
192195
my: ['margin-top', 'margin-bottom'],
193196
mt: ['margin-top'],
194197
mr: ['margin-right'],
195198
mb: ['margin-bottom'],
196199
ml: ['margin-left'],
200+
// Logical margin (for RTL support)
201+
ms: ['margin-inline-start'],
202+
me: ['margin-inline-end'],
197203
}
198204

199205
const properties = prefixes[parsed.utility]
@@ -623,6 +629,9 @@ export const borderSideWidthRule: UtilityRule = (parsed) => {
623629
'border-l': 'border-left-width',
624630
'border-x': ['border-left-width', 'border-right-width'],
625631
'border-y': ['border-top-width', 'border-bottom-width'],
632+
// Logical borders (for RTL support)
633+
'border-s': 'border-inline-start-width',
634+
'border-e': 'border-inline-end-width',
626635
}
627636

628637
const prop = sideUtilities[parsed.utility]

0 commit comments

Comments
 (0)