Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostCSS logical properties output is missed out #552

Open
lukaskoeller opened this issue Sep 22, 2022 · 1 comment
Open

PostCSS logical properties output is missed out #552

lukaskoeller opened this issue Sep 22, 2022 · 1 comment

Comments

@lukaskoeller
Copy link

lukaskoeller commented Sep 22, 2022

Describe the bug
If I use css logical properties (as part of the postcss-preset-env), something like padding-inline is correctly transformed. Though, when I use padding-inline-start, the plugin generates new selectors (e.g. [dir="ltr"] div { padding-left: 1px }) but it is not part of the output.

Logs
n/a

To Reproduce
Use the postcss-preset-env plugin for postcss and use css logical properties that contain start or end in their property.

Expected behavior
The output of the postcss logical plugin and postcss dir plugin actually appears in the final css generated by svelte.

/* Input */
section {
  padding-inline-start: 30px;
}

/* Output */
[dir="ltr"] section.s-f0oQgdSLZrX7 {

Information about your project:

  • Your browser and the version: https://www.whatsmybrowser.org/b/ZPZGQ

  • Your operating system: macOS Monterey

  • svelte-preprocess version 4.10.7

  • Whether your project uses Webpack or Rollup: Uses vite

@lukaskoeller
Copy link
Author

lukaskoeller commented Sep 22, 2022

Workaround

Setting the dir via options make it work

postcss.config.cjs

const config = {
  plugins: [
    autoprefixer,
    postcssPresetEnv({
      stage: 1,
      features: {
        'logical-properties-and-values': {
          dir: 'ltr'
        }
      }
    })
  ]
};

lukaskoeller added a commit to lukaskoeller/freedev that referenced this issue Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant