Viewing 6 replies - 1 through 6 (of 6 total)
  • re: “proper” CSS formatting:

    CSS ignores whitespace anyway. Line returns and indents are just for the convenience of the coder.

    Anonymous User 13656824

    (@anonymized-13656824)

    Sorry, I’m not sure I fully know what the issue is. Is the issue the lack of indenting in the CSS formatting?

    Thread Starter mythusmage

    (@mythusmage)

    The message is either, “You must indent.” or, “You don’t have to.” Until Automattic decides if it will adopt CSS or not I will keep my code to a minimum.

    The message is either, “You must indent.” or, “You don’t have to.”

    That’s correct. CSS ignores whitespace.

    This:

    .post-main {
        font-family: Ubuntu,sans-serif;
        color: #222;
        font-size: 1.1em;
        }

    is every bit as correct as this:

    .post-main{font-family:Ubuntu,sans-serif;color:#222;font-size:1.1em;}

    Use whatever works for you.

    (The second example is minimized—all the white space has been removed. There are plugins that will do this for, and if you have very long stylesheets, it will save some overhead on your server. That may explain where you have seen examples of this.)

    Until Automattic decides if it will adopt CSS or not I will keep my code to a minimum.

    All themes use CSS. Whether or not it’s minimized is up to the theme designer. When you are creating a child theme or adding your own CSS via a custom CSS plugin you are perfectly free to do whatever works for you.

    Thread Starter mythusmage

    (@mythusmage)

    Do they use CSS consistently?

    Anonymous User 13656824

    (@anonymized-13656824)

    I’m not fully sure what you mean. As kjodle said it can be correctly written in a number of different ways. Each plugin that you use could potentially have different CSS formatting, but it won’t have any effect on how it works.

    Hope this helps.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘CSS Formatting’ is closed to new replies.