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:

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