r/WebdevTutorials • • Sep 01 '20

Need help

Would it be better practice to do all HTML first and then move on to CSS when designing a web page? Or go back and forth?

1 Upvotes

17 comments sorted by

View all comments

Show parent comments

3

u/Shitster67 Sep 02 '20

That comes way later. After CSS, if should go for some CSS framework, like Bootstrap, foundation, bulma etc.

I personally prefer bulma because it is light and it gives you more control. Bootstrap is famous, so every other website uses it and you end up looking very similar to others unless you put in a lot of modification.

After CSS, you can learn SASS. This is optional. Writing CSS using SASS makes it easier to manage and keeps your code DRY (don't repeat yourself). Basically, sass code kind of automates the repetitive code of CSS and spits out a CSS file for your website. I know it sounds overwhelming but writing sass code is almost same as writing CSS and it won't be hard at all once you know CSS.

After this point, you'll be ready for javascript and stuff like reactjs or vue.

1

u/WoodenJesus Sep 02 '20

Personally, I'd recommend this order:

  • HTML

  • CSS

  • JS

  • Sass or PugJS

  • Sass or PugJS (whichever you didn't do first)

  • CSS Frameworks, utilizing Sass

  • JS Frameworks

I think it's important and beneficial to know HTML, CSS, and JS very well before jumping into anything that's designed to help you.

Learning at least the basics of JS will not only help with learning a JS framework, but also help with the more complex features of Sass and Pug.

As for CSS frameworks, I'll be honest, I haven't touched one in a few years. As practice, I dug into the code for Bootstrap and Foundation, learned how each feature was coded, and rebuilt the features I thought I'd use the most into a series of mixins, like Bourbon. I'm not sure how many frameworks are actually set up this way now, but if they are, using the Sass version would allow you to go in and only call what your project needs, reducing bulk in the resulting CSS file.

Edit: Pug is very optional, but I love it and will tell people to at least try it until I'm blue in the face. It's essentially indented Sass for HTML. The only problem is the docs are not great.

0

u/dadbot_2 Sep 02 '20

Hi not sure how many frameworks are actually set up this way now, but if they are, using the Sass version would allow you to go in and only call what your project needs, reducing bulk in the resulting CSS file, I'm Dad👨