postcss-rtl icon indicating copy to clipboard operation
postcss-rtl copied to clipboard

Feature request: Ignore symmetric values

Open Ansimorph opened this issue 4 years ago • 0 comments

When generating ltr/rtl variants of values that are mirror-symmetrical, postcss-rtl actually creates values that are identical for both versions and therefor add unecessary code to the css file.

For example:

.a {
  padding-left: 2px;
  padding-right: 2px;
}

Is transformed into

[dir=ltr] .a {
  padding-left: 2px;
  padding-right: 2px;
}

[dir=rtl] .a {
  padding-right: 2px;
  padding-left: 2px;
}

This could stay the way it is and not add more code.

Ansimorph avatar Dec 18 '19 13:12 Ansimorph