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

Some CSS rules removed by PostCSS #10410

Open
jsakalos opened this issue Apr 27, 2022 · 1 comment
Open

Some CSS rules removed by PostCSS #10410

jsakalos opened this issue Apr 27, 2022 · 1 comment

Comments

@jsakalos
Copy link

The bug was discovered by a user of Bryntum Scheduler and reported it in this forum post.

However, it can be easily reproduced w/o Bryntum libraries by adding the following styles to index.vue of the application newly created by npx create-nuxt-app:

pages/index.js:

<style>
  .logo {
    margin-inline-end:1em;
    border:10px solid red;
  }
</style>

That results in the markup shown on the screenshot-1:
screenshot-1

It can be remedied by disabling PostCSS but that's not a real fix, just a workaround:

nuxt.config.js:

  build: {
    postcss: false
  }

That leads to the expected result on the screenshot-2:
screenshot-2

I'm also attaching the showcase application.
nuxt.zip

@marianoweber
Copy link

marianoweber commented May 5, 2022

@jsakalos

This behavior has something to do with how postcss processes rules according to their cssdb stages.

Logical Properties and Values
are considered "unstable and subject to change" (stage 2)

Following changes to nuxt.config.js will make these rules work:

nuxt.config.js

build: {
  postcss: {
    preset: {
      features: {
        stage: 2,
        'logical-properties-and-values': false
      }
    }
  }
}

Source: https://stackoverflow.com/questions/64565180/how-to-prevent-postcss-preset-env-from-removing-css-logical-properties

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants