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

Bundler does not support nested CSS #209

Open
portfolioris opened this issue Jun 21, 2024 · 1 comment
Open

Bundler does not support nested CSS #209

portfolioris opened this issue Jun 21, 2024 · 1 comment

Comments

@portfolioris
Copy link

portfolioris commented Jun 21, 2024

I assume Smidge is responsible for bundling CSS when adding a CSS file to a package.

If I use this css:

.some-class {
    & .some-sub-class {
        color: lime;
    }
}

The bundled output to /sb/umbraco-backoffice-css.css.v638545637345803210 returns a 500 error.

My guess is it doesn't support the relatively new syntax.

@CZEMacLeod
Copy link

Looking at the readme of the project - the default minifier is (a port) of jsmin. The code can be seen here.
You can configure it to use NUglify but according to this issue it does not support nesting either (which as far as I can tell is still in draft?).
I'm not sure if there is much difference between the nesting syntax and less syntax - but you could try adding a pre-processor into the pipeline and passing your CSS files through dotless or similar, to expand them to standard flat css.
Alternatively, you could use a pre-processor on the css files at design time to flatten them.

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

2 participants