elchininet / postcss-rtlcss

PostCSS plugin to automatically build Cascading Style Sheets (CSS) with Left-To-Right (LTR) and Right-To-Left (RTL) rules using RTLCSS
https://elchininet.github.io/postcss-rtlcss/
Apache License 2.0
102 stars 16 forks source link

rtl:raw not taken into account in my final build #265

Closed lauterry closed 8 months ago

lauterry commented 8 months ago

Hello

I use

svg {
/*rtl:raw:
    transform: scaleX(-1);*/
}

and this is my webpack config for production build

{
        test: /\.scss$/,
        use: [
            MiniCssExtractPlugin.loader,
            {
                loader: "css-loader",
                options: {
                    modules: "icss",
                },
            },
            {
                loader: "postcss-loader",
                options: {
                    postcssOptions: {
                        plugins: [
                            "autoprefixer",
                            enableRTL
                                ? postcssRTLCSS({
                                        mode: Mode.combined,
                                        })
                                : "",
                        ],
                    },
                },
            },
            {
                loader: "sass-loader",
                options: {
                    additionalData: sassLoaderData,
                    // Prefer `dart-sass`
                    implementation: require("sass"),
                },
            },
        ],
    },

The final build does not take the directive rtl:raw into account.

The transform css property is missing

could it be a bug ?

elchininet commented 8 months ago

Hi @lauterry, Could you confirm if this is what you expect? If it is what you expect it seems that the issue is in your set up. In that case create a minimum reproducible example using the same tools/frameworks that you are using so I can take a look closer. Regards

elchininet commented 8 months ago

By the way, I am reading sass in your config. Take a look at this comment, it could be the reason of your issue.

lauterry commented 8 months ago

Hello

Thank you so much for your quick answer !

Indeed, it is the same issue of https://github.com/elchininet/postcss-rtlcss/issues/114#issuecomment-1008294135

Great job for postcss-rtlcss

elchininet commented 8 months ago

Hi @lauterry, Glad to hear that :) Thanks!