Skip to content

Core CSS rule (for "ltr") #18

Open
@koalie

Description

@koalie

Feedback via @r12a

I came across the following CSS rule:
[dir="ltr"] .toc ul {
border-left: solid 3px #f9c818;
padding-left: 0.9375rem;
}
There are many other rules that use margin-bottom, padding-right, etc.

It would reduce complexity and make our code much better internationalised if we used logical properties. The primitives all have good interoperability now. The above rule would then simply be:
.toc ul {
border-inline-start: solid 3px #f9c818;
padding-inline-start: 0.9375rem;
}
For -top and -bottom you'd use -block-start and -block-end. This also allows the CSS to adapt to vertically set text.

Could we change the style sheet to use these logical properties, please.

thanks,
ri

PS: See this i18n article, Structural markup and right-to-left text in HTML, which was recently updated to recommend use of logical properties https://w3c.github.io/i18n-drafts/questions/qa-html-dir#alignment. (And we use logical properties for the style sheet that is used by these articles.)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions