Code Monkey home page Code Monkey logo

Comments (16)

hotdoy avatar hotdoy commented on June 2, 2024 1

In the meantime, you can bypass CF auto-minify for the Panel with a page rule.
image

from kirby.

bastianallgeier avatar bastianallgeier commented on June 2, 2024 1

Ok, I gave it a try and it doesn't take too much work to fix this on our end. @distantnative @afbora @lukasbestle you should really double-check my PR. Maybe you can spot any trapdoors that I might have missed.

I really don't want to start working on such custom work-arounds for hosting providers. But I think this could actually be seen as a more clear distinction between minified and unminified files for us as well. That's why I think we could argue that this is also an enhancement for us.

from kirby.

distantnative avatar distantnative commented on June 2, 2024

Final semicolon in a set of statements is optional, so that shouldn't be an issue.
What does the broken CSS look like? What rules actually break?

from kirby.

hotdoy avatar hotdoy commented on June 2, 2024

image
looks like a typo. That's in the proxied file so I guess there's something preceding that.

from kirby.

distantnative avatar distantnative commented on June 2, 2024

@hotdoy can you please check if the space between span and var(--span) is really missing in the compressed file? If so, I'd think this is a Cloudflare bug then.

from kirby.

hotdoy avatar hotdoy commented on June 2, 2024

Really seems to be this set of rules.

@container (min-width: 50rem) {
    .k-grid {
        grid-template-columns: repeat(var(--columns),1fr)
    }

    .k-grid>* {
        grid-column: span var(--span)
    }
}

I'll try it out on another site just by itself see how cloudflare deals with it and escalate to them is it really is a bug with CF.

from kirby.

hotdoy avatar hotdoy commented on June 2, 2024

https://k4bug.calotte.dev/
Looks like a CF minifier bug. I'll be damned.

By the time people ship K4 to production, there is a high chance this will come back one way or another.
I'll try and report to CF in the meantime.

from kirby.

hotdoy avatar hotdoy commented on June 2, 2024

https://community.cloudflare.com/t/cf-css-minifier-messes-up-one-specific-line/535654

from kirby.

distantnative avatar distantnative commented on June 2, 2024

Seems like Cloudflare isn't interested in addressing it at https://community.cloudflare.com/t/cf-css-minifier-messes-up-one-specific-line/535654 :(

from kirby.

hotdoy avatar hotdoy commented on June 2, 2024

Yep. Kinda sucks. I could maybe open up a ticket with their support. Or, if we knew what algo they are using to minify, there might be a way to go around the issue. For now I'll keep my CF Rule.

from kirby.

lukasbestle avatar lukasbestle commented on June 2, 2024

I'm afraid we can't really do anything in Kirby to prevent this, right? Should we maybe add it to https://getkirby.com/docs/guide/troubleshooting/panel with a workaround?

from kirby.

hotdoy avatar hotdoy commented on June 2, 2024

Per CloudFlare docs, any file with .min in its name will not be re-minified. I know it is wrong to make decisions like this based on a vendor but that's one way.

from kirby.

lukasbestle avatar lukasbestle commented on June 2, 2024

That could indeed be a solution. .min is at least not wrong, so it wouldn't be a hack. Not re-minifying the files at all would also reduce the processing and in theory increase performance a little bit.

We would need to test if we can update our Vite/Rollup config without breaking anything else.

from kirby.

bastianallgeier avatar bastianallgeier commented on June 2, 2024

I honestly wonder how far this can be considered a standard (.min in the filename) or how much this is just a rather ignorant assumption of Cloudflare. I find it highly disappointing that they don't even comment on the issue and just close it. It kind of kills the mood to now spend extra time on such a custom fix just for them. On the other hand, I really don't want to leave our users hanging with that. I assume that there will be quite a few who use Cloudflare.

from kirby.

hotdoy avatar hotdoy commented on June 2, 2024

The post was made on the community forum since I'm not a paying customer.
It might have been different if we had an Enterprise customer in our ranks.

from kirby.

bastianallgeier avatar bastianallgeier commented on June 2, 2024

@hotdoy that might be true.

from kirby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.