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

generateForBothDir option value not reaching preprocessor.js #262

Open
sassanh opened this issue Oct 7, 2024 · 0 comments
Open

generateForBothDir option value not reaching preprocessor.js #262

sassanh opened this issue Oct 7, 2024 · 0 comments
Assignees
Labels
package: system Specific to @mui/system status: waiting for maintainer These issues haven't been looked at yet by a maintainer

Comments

@sassanh
Copy link

sassanh commented Oct 7, 2024

Steps to reproduce

With examples/pigment-css-nextjs-ts

Add this to withPigment options:

  css: {
    generateForBothDir: true,
    defaultDirection: 'ltr',
  }

add this prop to <Link> components in src/app/page.tsx:

          className={css({
            marginRight: '100px',
          })}

Run the project and see the margin being added
In dev-tools add "dir=rtl" to the html tag and see the margin not becoming reversed.

I added a console.log(generateForBothDir) here node_modules/@pigment-css/react/utils/index.js:54 (this is the line number of compiled file in node_modules, the place of this line in the code is here) and noticed it is false even though it is set to true in the next.config.mjs file. Reading the code I don't see it being passed to preprocessor.

Your environment

using pigment 0.0.24
I don't think my browser version is relevant here as I checked the generated code and it was wrong and probably doesn't work in any other browser too, but I'm using Safari 18.1.

Search keywords: rtl

@sassanh sassanh added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 7, 2024
@zannager zannager added the package: system Specific to @mui/system label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: system Specific to @mui/system status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants