Open matjazpotocnik opened 3 years ago
Hi Matjaž, sorry I missed your issue earlier. Thanks for the feedback. I will have a look and see if I can find out what was going wrong.
Yes, there will be minimal extra processing time and the browser won't cache the php. Comes in at just over 100kB at the moment, and around 500ms on a refresh when other files are cached, so not something I notice while working in comparison with the other things getting loaded.
It just seems like a normal page load to me, though would be interested in hearing if anyone experiences different. Have been considering "flattening" as plain CSS file if the need arises.
Couldn't reproduce the 500 but have cleaned up some stuff that might have been responsible. Would very much appreciate if you could give it another go with the updated files and let me know if you still experience problems.
Thanks again for trying it out and helping me iron out any problems
Thanks again for the feedback Matjaž, it has been very helpful.
Have re-worked everything to minimize possible conflicts and because it was just a better idea. As soon as I saw your initial comment, I knew deep down I was going to do it :)
Now draws CSS variables, conditionally loaded source CSS and framework CSS together to generate single minified CSS file, with version control link to refresh cache for other pages. Only occurs when the module is visited and, as it should, after that other pages draw the CSS straight from cache. Loads in parallel with the other CSS. at somewhere around 30ms. Happier with that.
First load (in the module itself, not subsequent pages) comes in around 17 kB compressed., so considerable benefit, especially given the elimination of almost all processing overhead. Very happy I was prodded into action by your feedback.
Took a little time, but am very happy going forward.
As part of the re-working, am in process of splitting up CSS for conditional loading according to user selections, which opens up a far greater range of user options, which I will roll out to module as I go. As a bonus for me, splitting the source CSS up is making it easier for me to track and alter.
I tested new version, but this time:
Compile Error in CSSvariables.php:151
Unparenthesized a ? b : c ? d : e
is not supported. Use either (a ? b : c) ? d : e
or a ? b : (c ? d : e)
Also the layout is somehow "unaligned":
Thanks Matjaž, you are a legend and your help is much appreciated.
Fixed the two problem nested ternarys in 7.4 and up. No need for them anyway now it's not loading the php every page, so reverted to more readable if/elseif/else. Thanks for helping out with that, still on 7.3 and I use them so rarely that I didn't realize earlier. Valuable reminder for me, so your help tracking down the issue is great!
Am continuing work on the CSS over the weekend and will investigate the broken alignment. I guess it may be related to the broken ternarys filtering through messing things up, but I will see what I can see.
Thanks again, you rock!
Hi!
I tried the Tweaker, but it looks like something is wrong with AdminThemeTweaker.php. I get 500 internal error. If I remove these lines:
then it works.
The module works by adding a CSS file generated by PHP to overwrite styles applied by AdminThemeUikit? That means some minimal extra processing time, and also browser does not cache the file?