One of our Coding & Cocktails LadyDevs, Tara, will be sharing her perspective on the Coding & Cocktails sessions with us over the next few months. Here is what she had to say about the April session, which was an Introduction to CSS compilers.
Precompiling CSS. I’ve spent a week trying to think of what to say about this, and, to be honest, I’m not sure. Tamara hit the nail on the head when she said we won’t get this all in one go. There’s a lot of information to absorb on this one, and it’s a lot to wrap your head around, but that’s what our Slack channel and mentors are there for! Honestly, this is probably what I’ll be working on in June when we take a “break” for review and further practice on the concepts we’ve already covered.
Compilers are new to me, and I know there are a lot out there for all sorts of different projects. I’m not sure how they all work. For this, we used Sass. I’m probably going to go over the slides a few more times to make sense of it all, but, from what I got working on it, you can create separate Sass files for variables and other elements of your styling and then compile that into a CSS file. This is a very high level concept of what goes on, but the idea is that, in big projects, you can make changes quickly and efficiently. It creates a cleaner, more manageable code. I spent an hour working on my CSS, because we were getting some CSS practice in too and my CSS skills are pretty weak. In that hour, I got about three lines completed and a few mentors stumped until we all realized my mistakes and then (Ta da!) working code. I originally thought that the CSS file was required before Sass files could be created and compiled, but I was mistaken; this was just something we did at Coding & Cocktails to give us some extra CSS practice (my CSS needs CPR) and to show us how a compiled file compares to a CSS stylesheet.
I can definitely see how it can make coding cleaner in the long run. There are some things I’m not quite sure I understand, but that’s what Coding & Cocktails is all about: working it out with women in the same boat. I’m hoping that some of this can be worked into modular development so that SASS files can be used in other programs with some minor changes to reduce the coding time, but I’m not sure if that’s possible…. Granted, a lot of development is using someone else’s code. Precompiling seemed like a lot of work with the additional CSS practice, but I look forward to the how much easier it’ll make coding in the future!
Great write up. Really get the sense of exploration.