Join Justin Seeley for an in-depth discussion in this video Removing unnecessary line breaks, part of CSS: Visual Optimization.
One of the easiest ways to speed up your code is to go through it and actually take inventory…of any unnecessary line breaks that might be present in your code, and then simply remove those line breaks.…And so I have here the Meyer Reset, and there's really not a whole lot wrong with this, but…there are some seriously unnecessary line breaks going on in this document.…And so let's take a look some of them now.…For instance, the focus one here, I don't necessarily need for this to be on three separate lines.…I can actually just make it like this.…Remember my rule, if it has only got one rule, it is one line.…
If it has got multiple rules, it lies on multiple lines, and it has indentation.…But in this case, I think this is just fine to have it just like this. Same holds true here.…I will just go through and put that up like that.…Multiple rules here, multiple lines. Multiple rules here, multiple lines.…Everything looks good. In this case, I can remove this just like so.…Same thing holds true here. I will back this up. There we go.…
Author
Released
2/13/2013- Exploring good versus bad style sheets
- Creating section headings
- Indenting code for enhanced readability
- Creating single- and multi-line comments
- Avoiding unnecessary tags and classes
- Creating master color and typography guides
- Simplifying comments
Skill Level Beginner
Duration
Views
Related Courses
-
CSS: Page Layouts (2012)
with James Williamson8h 57m Beginner -
CSS: Styling Forms
with Ray Villalobos4h 1m Beginner -
CSS: Gradients
with Justin Seeley1h 13m Beginner
-
Introduction
-
Welcome1m 3s
-
-
1. Getting Started
-
The importance of clean code3m 36s
-
-
2. Organizing Your Code
-
3. Commenting Your Code
-
What is a comment?2m 31s
-
Writing single-line comments1m 44s
-
-
4. Writing Clean Code
-
Using font families2m 42s
-
Using CSS shorthand3m 47s
-
-
5. Useful Techniques
-
Using a master CSS file2m 37s
-
6. Speeding Up Your Code
-
Simplifying comments1m 46s
-
Removing unused selectors1m 52s
-
Conclusion
-
Goodbye1m 22s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Removing unnecessary line breaks