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

postcss-logical not transforming `scroll-padding-block-start`

Open lukaskoeller opened this issue 2 years ago • 2 comments

Bug description

The property scroll-padding-block-start is not transformed by postcss-logical plugin.

I also could verify this in the postcss-preset-env playground.

Source CSS

html {
  scroll-padding-block-start: 24px;
  padding-block: 12px;
}

Expected CSS

html {
  scroll-padding-top: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}

Actual CSS

html {
  scroll-padding-block-start: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}

Does it happen with npx @csstools/csstools-cli <plugin-name> minimal-example.css?

No response

Debug output

It is about postcss-preset-env, though can't see any debug option

Extra config

No response

What plugin are you experiencing this issue on?

PostCSS Preset Env, PostCSS Logical

Plugin version

7.4.1

What OS are you experiencing this on?

macOS

Node Version

14.18.2

Validations

  • [X] Follow our Code of Conduct
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Would you like to open a PR for this bug?

  • [ ] I'm willing to open a PR

lukaskoeller avatar Apr 04 '22 10:04 lukaskoeller

@lukaskoeller thanks a lot for opening this issue! I'll check this soon. I wouldn't take what the playground does as an example. It's quite outdated at this point and it won't handle anything past 7. Not even sure what the version is. We've removed it from the navigation (though you can still access it)

Antonio-Laguna avatar Apr 04 '22 10:04 Antonio-Laguna

@romainmenke I think we've discussed this at some point. I'm hesitant to add this as requested as it doesn't really match spec. From what I could find, there's no way to actually detect writing-mode. Am I missing something here?

Antonio-Laguna avatar Apr 05 '22 20:04 Antonio-Laguna

https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-block-start#browser_compatibility https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-top#browser_compatibility

Only a very small number of Safari versions require this fallback. For all other browsers either both are supported or none.

I am going to close this because there is no real world benefit to having this fallback.

(correct me if I am wrong :) )

romainmenke avatar Jan 20 '23 18:01 romainmenke