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

Unescaped semicolon in Toast svg #1044

Closed
3 tasks done
vitto32 opened this issue Jan 28, 2025 · 4 comments
Closed
3 tasks done

Unescaped semicolon in Toast svg #1044

vitto32 opened this issue Jan 28, 2025 · 4 comments

Comments

@vitto32
Copy link

vitto32 commented Jan 28, 2025

Flux version

1.1.3

Livewire version

3.5.18

What is the problem?

I'm getting an error "Expected a backslash preceding the semicolon." while trying to build and minify my css for production using css nano.

I've narrowed it down to
line 46 of vendor/livewire/flux-pro/stubs/resources/views/flux/toast

Image

Unescaped semicolons are not valid class names. In this case it's probably a cut and paste issue.

Image

PS: I've tried to remove and reinstall via composer but the error is there.

Code snippets

[:where(&)]:size-5

should be

[:where(&)]:size-5

like all the other svgs.

How do you expect it to work?

Should be able to build and minify using css nano.

Please confirm (incomplete submissions will not be addressed)

  • I have provided easy and step-by-step instructions to reproduce the bug.
  • I have provided code samples as text and NOT images.
  • I understand my bug report will be closed if I haven't met the criteria above.
@joshhanley
Copy link
Member

@vitto32 when I build for production using Vite, I don't get this issue. Are you able to provide me your Vite config (and any other relevant configs, you mentioned css nano?) and instructions that I can follow to replicate this issue?

@vitto32
Copy link
Author

vitto32 commented Jan 29, 2025

An important thing I forgot to mention (sorry) is that I'm using Tailwind 4 and I think it used to work with TW 3.

I'm getting the error both with @tailwindcss/postcss and @tailwindcss/vite.

My config files are pretty basic:

vite.config.js

export default defineConfig({
    plugins: [
        laravel({
            input: [...CSS_FILES, 'resources/js/app.ts'],
            refresh: true,
        }),
        tailwindcss(), 
    ],

    build: {
        cssCodeSplit: true,
    },
});

postcss.config.js

export default (config) => {
    const rules = {
        plugins: [
            cssNano({ preset: 'default' }),
        ],
    };
   //...
    return rules;
};

I'm using css nano v. 7.0.6

@joshhanley
Copy link
Member

@vitto32 ah! Flux isn't currently compatible with Tailwind v4, see #811 for more details. I'm going to close this for now. But once we release Tailwind 4 support, or if you downgrade to Tailwind 3, and if you're still having this issue then feel free to open a new issue and we'll be happy to investigate further.

@joshhanley
Copy link
Member

@vitto32 just ran into this today while working on the Tailwind V4 upgrade. Thanks for point out the issue/ solution, saved me time trying to find it! 😄

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