Skip to content

Commit 8a12b5b

Browse files
committed
fix(styles/ui): convert physical CSS properties to logical for RTL
Replace right/left positioning, margin-left/right, padding-left/right, and text-align left/right with their logical equivalents (inset-inline-start/end, margin-inline-start/end, padding-inline-start/end, text-align start/end) in ui.css.js. This ensures the ReSpec pill, modals, and error/warning lists render correctly in RTL documents. Partially addresses #4223
1 parent 180688d commit 8a12b5b

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

‎src/styles/ui.css.js‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default css`
99
padding: 0.2em;
1010
font-weight: bold;
1111
cursor: pointer;
12-
margin-left: 5px;
12+
margin-inline-start: 5px;
1313
border: none;
1414
background: transparent;
1515
}
@@ -19,9 +19,9 @@ export default css`
1919
display: flex;
2020
flex-direction: row-reverse;
2121
top: 20px;
22-
right: 20px;
22+
inset-inline-end: 20px;
2323
width: 202px;
24-
text-align: right;
24+
text-align: end;
2525
z-index: 9000;
2626
}
2727
@@ -43,7 +43,7 @@ export default css`
4343
border: none;
4444
opacity: 0.75;
4545
border-radius: 2em;
46-
margin-right: 1em;
46+
margin-inline-end: 1em;
4747
min-width: 3.5em;
4848
will-change: opacity;
4949
}
@@ -149,7 +149,7 @@ export default css`
149149
box-shadow: 1px 1px 8px 0 rgba(100, 100, 100, 0.5);
150150
width: 200px;
151151
display: none;
152-
text-align: left;
152+
text-align: start;
153153
margin-top: 32px;
154154
font-size: 0.8em;
155155
}
@@ -231,8 +231,8 @@ export default css`
231231
list-style-type: none;
232232
margin: 0;
233233
padding: .5em 0;
234-
padding-left: 2em;
235-
padding-right: .5em;
234+
padding-inline-start: 2em;
235+
padding-inline-end: .5em;
236236
}
237237
238238
:is(.respec-warning-list,.respec-error-list) > li + li {
@@ -241,7 +241,7 @@ export default css`
241241
242242
:is(.respec-warning-list,.respec-error-list) > li:before {
243243
position: absolute;
244-
left: .4em;
244+
inset-inline-start: .4em;
245245
}
246246
247247
:is(.respec-warning-list,.respec-error-list) p {
@@ -311,7 +311,7 @@ export default css`
311311
max-height: 80%;
312312
overflow-y: auto;
313313
margin: 0 -0.5cm;
314-
left: 20%;
314+
inset-inline-start: 20%;
315315
max-width: 75%;
316316
min-width: 60%;
317317
}
@@ -320,7 +320,7 @@ export default css`
320320
.respec-modal h3 {
321321
margin: 0;
322322
padding: 0.2em;
323-
left: 0 !important;
323+
inset-inline-start: 0 !important;
324324
text-align: center;
325325
background: var(--tocsidebar-shadow, #ddd);
326326
color: var(--text, black);
@@ -332,7 +332,7 @@ export default css`
332332
color: var(--text, black);
333333
border: none;
334334
width: 100%;
335-
text-align: left;
335+
text-align: start;
336336
font-size: inherit;
337337
padding: 1.2em 1.2em;
338338
}
@@ -343,7 +343,7 @@ export default css`
343343
}
344344
345345
.respec-cmd-icon {
346-
padding-right: 0.5em;
346+
padding-inline-end: 0.5em;
347347
}
348348
349349
#respec-ui button.respec-option:first-child {
@@ -368,7 +368,7 @@ export default css`
368368
user-select: none;
369369
-webkit-appearance: none;
370370
top: 0;
371-
left: 127px;
371+
inset-inline-start: 127px;
372372
}
373373
374374
@media print {
@@ -404,7 +404,7 @@ p:is(.respec-hint,.respec-occurrences) {
404404
}
405405
406406
.respec-plugin {
407-
text-align: right;
407+
text-align: end;
408408
color: rgb(120, 120, 120, .5);
409409
font-size: 0.6em;
410410
}

0 commit comments

Comments
 (0)