Maximum CSS Size?

Bortas
Bortas

Oh man, I've really hit a snag, gang. I've been working on the Morwindl Season 2 revamp (live, check my signature), and I still have a good chunk of work to go, but I keep getting server errors when I try to update my CSS. For about a week, I couldn't figure out why.

On a whim, I checked the character count of my CSS: 65332 at last save, and I can't seem to get any new saves. Thinking briefly binarily, I ran 256x256=65536. I'm concerned that the upper limit for custom CSS is 65536 characters, madly disappointing. I've come so far, and the site is really coming together with my alterations to the base layout. But now its time to add content, and the custom CSS that comes with making content that pops.

Can anyone confirm there is an upper limit to custom CSS, and is it possible to have this limit increased, or would it break other things? Thanks,

-bort

Comments

  • cgregory
    cgregory
    Posts: 780

    Yes there is an upper limit to the custom CSS. It is one of the reasons I use short class names and css shorthand where possible as the shorthand can drastically cut down the number of characters used.  For example, with animations I always use.

    div {

        animation: example 5s linear 2s infinite alternate;

    }

    rather than

    div {

        animation-name: example;

        animation-duration: 5s;

        animation-timing-function: linear;

        animation-delay: 2s;

        animation-iteration-count: infinite;

        animation-direction: alternate;


    }

    I've also cut down on commenting my code.

    You may also need to look at using inline styling where it makes sense.

    They are among us!

    image

                       XCom: Defiance - Campaign of the Month November 2016

     

     

  • Bortas
    Bortas
    Posts: 645

    Rough... thanks for the advice - multiple calls might be the best thing after I cut down my comments. Thanks!

    -bort

  • weasel0
    weasel0
    Posts: 435

    Hint: code off site. Notepad++ or whatever your coding engine of choice. Then run your code through a beautifier. It'll kill all the Spaces and line breaks. It'll condense any commands it finds that have the same characteristics. 

    https://codebeautify.org/css-beautify-minify

    That might be the one I used to use. It'll also strip comments and do a few other things. Try it or find another one. 

  • Bortas
    Bortas
    Posts: 645

    Awesome tool, thank you!

    Feeling pretty bummed, as I hadn't even finished layout style, let alone got into the custom classes for my content. I'm feeling like I'm on my last leg, so to speak.

    -bort

  • GamingMegaverse
    GamingMegaverse
    Posts: 2,998

    Worse, when I exceeded it the site rejected any new coding- even if others were deleted.  They tried to fix it (back when there was support) and never could....

    Just trying to help out.

  • Bortas
    Bortas
    Posts: 645

    Man, what a heart-break! I'm really feeling like I am on the right track with the new design, and have a ton of stuff on my todo list still. 

    Feeling like the wind is out of my sails.

    -bort

Sign In or Register to comment.

March 2024
Wrath of the Highborn

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions