Latest update requires cache purge in CloudFlare

This totally saved me. Thank you!

3 Likes

That’s odd that CSS minification would break things. Doesn’t it just remove all spaces and new lines in the CSS + gzip it?

1 Like

I don’t know. The information has been shared with CloudFlare engineering via @RyanK, I’d assume he’ll be able to give more details once he has them.

3 Likes

Ryan K has been pretty good with resolving issues when I’ve brought them up with him via email/twitter (over screennames) so I guess he’ll be able to find a fix.

1 Like

ok, but if i use discourse as subdomain, and i don’t want to disable css minify for main domain. what can i do? because there is no option in cloudflare page rules to disable minify?
thanks

Easy peasy:

i have ask something else. pls read again my question

Add the page rule “Disable performance” ( for your forum only ).

In your case it should be sth like:

http://discourse.domain.com/*

More info here:
https://support.cloudflare.com/hc/en-us/articles/200172336-How-do-I-create-a-Page-Rule-

Then purge cloudflare cache. Delete your browser cache and you’re done. :+1:

3 Likes

yes, in this way works.

1 Like

Just to share the fruits of a few hours of debugging before finding this thread, the following syntax is the source of this incompatibility. The CSS is truncated after this block (specifically, the CSS terminates in height:100%) leaving about 1/2 of the Discourse styles missing.

@supports (--custom:property) {
	aside.onebox .onebox-body .aspect-image{max-height:170px;max-width:20%;float:left;margin-right:10px;width:100%;height:auto}
	aside.onebox .onebox-body .aspect-image img{width:100%;height:inherit;max-width:initial;max-height:initial;float:none;margin-right:none}
	aside.onebox .onebox-body [style*="--aspect-ratio"]{position:relative}
	aside.onebox .onebox-body [style*="--aspect-ratio"]::before{content:"";display:block;padding-bottom:calc(100% / (var(--aspect-ratio)))}
	aside.onebox .onebox-body [style*="--aspect-ratio"]>:first-child{position:absolute;top:0;left:0;height:100%}
}
5 Likes

Completely forgot to update here, sorry! Been chatting with our contacts at CloudFlare. They’ve confirmed the issue, and have pushed out a temporary workaround. CloudFlare will detect if the site is Discourse based, and if it is force-disable minification (users cannot override).

They’re working on a new minifier, once ready they’ll remove the force-disable setting so you can minify files again.

13 Likes