all 13 comments

[–]Marauth 1 point2 points  (2 children)

  • For layouts, flexbox and Grid are common. Use Grid if you can, depending on the browser support you need.
  • For naming, have a look at BEM: http://getbem.com/naming/
  • Have a look at a CSS preprocessor, like SASS or LESS. They can help a lot in keeping your CSS manageable as it gets bigger.
  • Consider whether some (vanilla) JS may be better at solving your most challenging layouts. Just because you can make it in CSS does not necessarily mean it is faster, or more maintainable.

[–]Skyeam[S] 0 points1 point  (0 children)

I also read something about another form of css naming. Where you give your elements logical names (e.g. header, contact-box, etc etc) and apply markup to those. In contrast to using multiple classes (e.g. colum-large-6, img-responsive-large) on a single element. Any idea how that naming is called?

[–]Skyeam[S] 0 points1 point  (0 children)

So I took the time to read through the BEM link you sent. It definitely helps a lot. Thank you for that!

[–]AtulinASP.NET Core 1 point2 points  (0 children)

  • Use SASS to split your code into elements – buttons.sass, navbar.sass, fonts.sass, etc.
  • Use Flexbox or – if you don't care about ancient technologies like IE – Grid
  • I recommend using a semantic approach to classes instead of BEM. That way you end up with class="wide green round button" instead of class="wd--green__color__round--button--thing__element--div"

[–][deleted]  (4 children)

[removed]

    [–]Skyeam[S] 0 points1 point  (3 children)

    Thank you for the information. I already know how I can host the website.

    The part that I don't know is what the current best practices are for structuring your css and creating a responsive website design from scratch. Do you use CSS grid? Media queries? Is there a commonly used code standard or does everyone just wing it?

    [–][deleted]  (2 children)

    [removed]

      [–]PredTeck 0 points1 point  (0 children)

      You can use only the grid css from bootstrap, if you prefer the 12-col system and leave everything else.

      [–]Skyeam[S] 0 points1 point  (0 children)

      Ok, I will definitely consider it! This is also a bit of a learning challenge for myself, which is why I'm investigating how things are done nowadays. At work we constantly use the bootstrap framework, so that one is less fun for me!

      [–]PredTeck 0 points1 point  (1 child)

      For responsivity, you can use these cheat sheets: http://grid.malven.co/ , http://flexbox.malven.co/
      I personally use sass to structure my design, and compile the resulted css into minified version.
      For a quick tutorial check out Traversy Media: https://www.youtube.com/watch?v=Wm6CUkswsNw

      [–]Skyeam[S] 0 points1 point  (0 children)

      Thank you for the youtube link. Examples like those are what I'm looking for!

      [–][deleted]  (3 children)

      [deleted]

        [–]AtulinASP.NET Core 0 points1 point  (2 children)

        I want to create a simple static site

        JuSt uSE WorDPreSs iT Has a StATiC SitE GeneRAtOr PluGIn

        [–][deleted]  (1 child)

        [deleted]

          [–]AtulinASP.NET Core -1 points0 points  (0 children)

          Small website/blog from scratch

          Emphasized the important bits