This totally saved me. Thank you!
Thatās odd that CSS minification would break things. Doesnāt it just remove all spaces and new lines in the CSS + gzip it?
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.
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.
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.
yes, in this way works.
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%}
}
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.