Skip to content

Downlevel logical properties #23

@devongovett

Description

@devongovett

https://caniuse.com/css-logical-props

Only supported very recently. It can be down leveled, but might need to be opt-in because this changes the specificity of rules and requires a dir attribute to be placed on an ancestor element (since :dir(...) is not yet widely supported (https://caniuse.com/css-dir-pseudo).

.foo {
  margin-inline-start: 10px;
}

to

[dir="ltr"] .foo {
  margin-left: 10px;
}

[dir="rtl"] .foo {
  margin-right: 10px;
}

See https://github.com/csstools/postcss-logical and https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-dir-pseudo-class

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions