Start learning with our library of video tutorials taught by experts. Get started
Viewed by members. in countries. members currently watching.
Take a tour of a workflow that optimizes CSS code for easier navigation, organization, and readability. In this course, author Justin Seeley covers best practices for writing CSS in an easy-to-read format, commenting code, developing a table of contents, and adopting other methods that help produce "cleaner" code. The course also contains tips for speeding up development with some online tools and simplification techniques.
In addition to creating your own master color guide, you can also create a master typography guide if you wish as well. This is going to be something that is really helpful when you start to use web fonts, and all different types of fonts that aren't necessarily default inside of a browser. And so, in order to do this just create yourself a blank CSS document really quick, and you can kind of see exactly where I am going with this. What we're going to do is first start off by defining a comment, and I will just create a little bit of a line here with some asterisks and then directly underneath that some more.
This just creates a little bit more space, and lets people know hey, something is happening here, there is a heading. So in this case, I am just going to type out Typography Guide, and so we will do things like Headings. And so, this will be something like, let's say, Georgia, and we will do 14 pixels through let's say 36 pixels for this. Body, and this would be Arial, and we'll do 12 pixels for this.
And then you could come through, and you could do stuff like Quote. So, if you are doing a blog, and you are using block quote, you can do something like Georgia, Italic, and then make this 12 pixels as well. Basically, what you are doing is you are just going through and defining all of the different areas of your website, and all of the different fonts you are going to be using. Now, this is sort of a boring example because I am just using Georgia and Arial, but if you are using a bunch of let's say Google Web Fonts, or if you are using Type Kit, for instance, this would be a great thing to have when you come in and you actually write down what you're going to be using.
So like for your headings, if you are using something like League Gothic for this. And for your Body copy you were going to use something like Nero Sans, and for your Quotations, you were going to use something like Courier new. I mean, there are all different types of fonts that you can use, and by creating this typography guide, you enable people to know exactly when they are looking at the site and they are thinking they need to debug it or something like that. They're saying, okay, these headings, I need to change those from what font to what font, or if something is missing for instance, let's say they are looking at it, and then they are like, you know what? These headings just don't look right.
They can go in and say okay, the headings are supposed to be League Gothic, but they are showing up as Georgia, or they are showing up just as a default Sans-Serif font. So there is obviously something wrong with the way I am importing my web fonts or something like that. A Typography Guide really comes in handy when that happens because then you can go back and reference, see exactly what is supposed to be where. Then when you are looking at your site and testing it in different browsers, you can spot the differences between them. You can also see where the problem areas lie, and you can go in and fix those according to your Typography Guide. When you finish your Typography Guide just close it out with a couple of different asterisks lines here.
And so, we will just do this again, and then go down to the very end. And at the very end of it, you just have to make sure that you end with a trailing slash and that way, you can continue writing just regular old CSS after the fact. So again, to wrap up, writing out a Typography Guide is a great way to define all of the different areas of type on your website to give people a blueprint for what is supposed to go where so that you can diagnose any problems that might arise with web fonts or any other font that you might be using in your CSS.
There are currently no FAQs about CSS: Visual Optimization.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.