10
karma
2y

How u indent your css? Pls?

Comments
  • 9
    Not like that, never like that!!
  • 11
    spabs or taces?
  • 4
    @C0D4 no? I kinda like it scans easy.
  • 4
    @karma and then reformat an entire document because one : becomes out of alignment. 🤷‍♂️
  • 2
    @Demolishun biden!
    (Both)
  • 2
    @karma That is empty whitespace.
  • 0
    @C0D4 no then I just shift it up. Still scans better than clutter. But this is why I was like asking. I'm not a fan but the right hand bothers me more often then the left hand operator, thats where the issues live.

    I had a junior reformat his css alike this or without the

    Property : mess;
    Property:moermess;
    Property :mess;

    This disturbs me even more. He hated me for it but it was a one time lesson and he stuck with consistency.
  • 1
    @Demolishun I love that shit
  • 1
    That is a very conservative way of indenting code. Almost looks like an assembly listing - but with surprisingly long mnemonics and comments...
  • 6
    I put it in excel and parse it with js then dynamically load it.
  • 1
    Its a CSS beautifier plugin in VS Code.
    The LESS/SCSS/SASS pre-processor will minify it for production anyways.

    Personally, i dont like it. I find its orderliness disturbing.
  • 1
  • 4
    @hack 😂 that's some big brain energy
  • 0
    TBH I feel bad for the junior dev cuz no way I would put up with that.

    SCSS + ESlint + stylelint all the way. A formatting like this would probably be hard to read or impossible with CSS preprocessors. Also, fuck editor defaults. Always causes trouble when working in team
  • 0
    @iSwimInTheC yes I have very big brain. Sometimes I use visual basic in excel to change styles. My website is basically excel on steroids.
  • 0
    make spreadsheet of CSS
  • 3
    Phones are not used to take screenshots...

    I don't like this kind of indents.

    What if there is a new line longer than all the others ?

    Just keep everything nice and compact.

    Most IDE's format CSS pretty wel using colors for the values.
  • 1
    Autismus Maximus
  • 1
    Anything that's not default just ends up being a chore to maintain and keep consistent. I'll eat my words if I see a 7 year old project with commits from 10 different devs where this formatting was kept consistent and provided tangible benefit at no cost.
  • 3
    Line 19 is not formatted correctly.
    Missing a space after “:”.

    Edit: proving the point that it is a hell to maintain consistently
  • 1
    Use a linter like a grown up so I don’t have to break my space key to keep it like that.
  • 0
    if the values column were comments, i'd say "like that".

    but since the values column is not comments, but actual values, i say "fuck no, that guy should get run over by a train"
  • 0
    Let me summarizes your input: css is shit, ok
  • 0
    @C0D4 why that looks like asm code almost !
  • 0
    @karma get that shit out of here lol
Add Comment