New Landing How can we help? Cardinal Theme Support Cardinal – Feature Request Minify custom admin css output in source code?

Viewing 8 posts - 1 through 8 (of 8 total)
  • #113080
    FlawlessWeb
    Member
    Post count: 542

    Hey,

    I am currently trying all kinds of way to optimise loads times of cardinal and my websites.

    One thing I noticed is that when you go into the source, you can see that the outputted rules from the color customizer are minified (no whitespace etc). On the other hand, the cardinal admin custom css rules that are outputted in the source are not minified.

    I have approaching 1500 lines of custom css (a lot, I know) on one of my sites. I am open to correction, but would it not help with load times (even if its just a small amount) if you were to somehow minify those outputted custom admin css rules just like the color customizer does?

    At the very least, it would significantly reduce the line count of the source code…

    Screenshot attached to illustrate my point.

    Attachments:
    You must be logged in to view attached files.
    #113232
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    If you have a lot of custom css, you should be using a child theme, with the custom css in a style.css file.

    If you want to minify your css you can do so here: http://cssminifier.com/

    – Kyle

    #113234
    FlawlessWeb
    Member
    Post count: 542

    Hey,

    #1. There is a reason I need to continue using the custom css instead of the child theme on one of my sites. Basically, you cannot get some of my rules to work in the child theme unless you put the !important declaration after each of them. That is not ideal as I have created a style-switcher plugin to work with Cardinal and if the !important declaration is added, the switcher cannot change the color scheme of the particular element etc.

    #2. That css minifier link would do nothing for what I asked about – I have no control over how the cardinal admin custom css is outputted in the source code – that can only be modified at the theme framework level…

    #113238
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    The output will be exactly what you add to the custom css box, so if you add the minified version then that’s what will be outputted in the source

    – Kyle

    #113239
    FlawlessWeb
    Member
    Post count: 542

    Ah, I see what you mean.

    Do you think it will have any noticeable impact on page load?

    #113242
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Yes a minified version will, however the best thing to do would be to put as much of your custom CSS into a child theme style.css file, and any that you need to remain in the theme options you can leave there

    – Kyle

    #113243
    FlawlessWeb
    Member
    Post count: 542

    Yea good plan. Going to start doing that today.

    I should be able to move most of the rules to the child theme css – I will just keep the background, background-color and color rules in the custom css; as I said above, using the !important declaration on them impacts upon my style-switcher color changer.

    #113250
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register