Tools to help clean up your CSS

You have created an awesome website. Over time, you add more pages, content and tweaks to the site. As your website gets larger, so can your CSS. You may add new styles for displaying a landing page, carousel or videos. Eventually, you have unused styles that no one remembers what it was used for. This unused CSS can start to slow your site down.

Tools to help clean up your CSS

Cleaning up your CSS from design changes and other additions can be a hard, time-consuming and tedious task. How do you clean up your website without breaking the site?

Steps to clean up your CSS

  1. Find and fix errors
  2. Identify unused CSS
  3. Validate with W3C Validator
  4. Test your website with the updated CSS

Find and fix errors

Errors can creep in your CSS. You may forget a semicolon, copy code from CodePen or Stack Overflow that solves a problem or another team member added custom CSS to solve a problem.

CSS Lint

CSS Lint analyzes your CSS and tells you what you are doing wrong. You can use it to help clean up your CSS and learn how to write it better.

CSS Lint

Identify unused CSS

As you develop your website, your CSS file can grow. It may contain CSS styles that are no longer used or styles that were abandoned. With a large website, it can be hard to tell which styles are still in use.

Use UnCSS to remove unused CSS

UnCSS is a Node.js powered tool that removes unused CSS from your stylesheets. It created a new CSS file with only the styles that are being used. Want on online options? UnCSS Online lets you test the tool for smaller CSS codebase.

UnCSS Online

Validate with W3C Validator

When you have fix your errors and removed unused CSS, use the W3C (World Wide Web Consortium) validator to check your website. It checks to ensure the technical quality of your website. You want to make sure that you didn’t introduce new errors into your cleaned up CSS.

W3C Validator

Test your website with the updated CSS

Since CSS is not easily testable, you want to make small changes and test each change. You want to make sure that the styles you removed or updated don’t break your design.

Cleaning up your CSS code is difficult, time-consuming and tedious. These tools can help to make the task easier.

What CSS tools have you used to make the process easier?

Have you Customized your Bootstrap website?

Once you have built a few websites with Bootstrap, you may notice that your sites look too much alike. As a web developer, you want your websites to useful as well as attractive. How do you fix this problem? You can customize how your Bootstrap looks. By working with and customizing the design, you can create a Bootstrap website that doesn’t look like it was made with Bootstrap.

Have you customized your bootstrap website?

What web development techniques can you use?

  • Create a custom style sheet
  • Use Custom Fonts
  • Add Custom Photography
  • Use Font Awesome
  • Customize Bootstrap’s Buttons

Create a custom style sheet

You want to create a custom style sheet to keep your design customizations separate from Bootstrap. Nothing more annoying than upgrading and realizing that you lost all of your design work because you added them to the Bootstrap CSS and forgot what you did. If you use Adobe Kuler or COLOURlovers color scheme generators, you can create a Bootstrap theme with the color scheme to start your designs from.

Use Custom Fonts

Fonts as well as colors should be unique to your website. By using custom web fonts, you can change how your site looks quickly and easily. When you choose the wrong font, your site can look bad. Where can you get ideas for choosing the right fonts? You can use the following resources Top 20 Google Fonts and How to Use Them and 10 Great Google Font Combinations You Can Copy.

Add Custom Photography

With sites like pixabay.com or Death to the Stock Photo, you don’t have to be a photographer to add unique and interesting photos to your website. With tools like Photoshop, you can crop, add photo effects and more to make a photo unique to your website.

Use Font Awesome

With Font Awesome, you can incorporate these icons into your designs. You can use them on buttons, navigations bars or anything else that you need.

Customize Bootstrap’s Buttons

Bootstrap comes with default buttons for you to use. You can customize the way these buttons appear in your design. Use this Bootstrap Button Generator to create the look that you need.

With web development tools like photos, Font Awesome and CSS, your Bootstrap website doesn’t have to look like a standard Bootstrap website. You can customize it to look the way you want.

Mobile Design Typography

Content is the most important element of your website. With a wide range of mobile devices available to people, your websites and apps must be readable on all. To maintain the readability of your content, you need to consider the fonts you choose, size, contrast and line length. How do you use Mobile Design Typography to make your content responsive and readable?

Mobile Design Typography

Fonts

Not all fonts look good on a small screen. Display fonts like script fonts may look good on a desktop screen, but on mobile they can shrink down too small to read. A script font like League Font is fine for the desktop, but on mobile it can be unreadable.

League Font

What are your options?
You could increase the size of the font. At a larger size, your chosen font may be look better. Or you could replace the font with one that is readable on small devices. You have to decide if you really need to use this font in your design.

Size

Size is also important. Too small and your content is unreadable. People leave sites if they can’t read it on mobile. If you choose a size that it too large, it could dominate the content. It could take up so much space that you end up scrolling constantly while reading the page. You have to find a size that works well at that size.

Line Length

How long should a single line of text be? It depends. Readability is determined by the font, character and word spacing and the word lengths. Even the device that you are using can affect readability. A general guideline is 9 – 12 words per line. 9 – 12 words is a comfortable range for people to read. Line Length and Column Widths explains why your text should be about 9 -12 words long.

Contrast

What is contrast? Contrast is how every element in a design which includes font, size, color, line length and images works to create a good user experience. The easiest to learn is color. How do your color choices affect the design? With mobile design, you need to also think about size, font, line length, position and shapes. On Web Designer Depot, John O’Nolan explains how to fully understand contrast in design. He shows you how to use them for a better user experience.

Horizon Coworking in Madison, WI

Summary

Your content is an important element of your design, especially on mobile. When developing for mobile, consider how the font type, size, line length and contrast can effect the readability of your site. If it isn’t readable, your visitors will leave. Keep them on your site by focusing on how fonts look on mobile.

For more information on Mobile Typography, check out these articles:

Building a theme based on a photo

Where do you get ideas for a theme? Do you start with a color palette, photo or website? I decided to use a photo to create a theme for my blog. I found a free stock photo and started design my new theme.

cropped-CurcuitBoard.jpg

How Did I Create the Theme?

  • Found a free stock photo
  • Generated a color palette from the photo
  • Start with an HTML Theme
  • Build the Theme in WordPress
  • Test and fix issues
  • Upload and apply the final theme

Generate Color Palette from Photo

I uses Adobe Kuler, now called Adobe Color CC, to create my palette. Here is my palette:

Curiosita Labs Color Palette Choices

Start with an HTML Theme

Using the color palette, I choose a color for the background, heading and more. Next, I built a test page in HTML. HTML makes it quick and easier to design in the browser. You can see your results quickly.

Test Theme In HTML

Once I had the page made, I evaluated the results. Do the colors look good together? Does the overall design do what I want it to do? I had some issues with the colors. They didn’t work well together. I changed out the colors and reevaluated the results. Once I got a design that worked, I started building the theme.

Building the theme

WordPress has starter themes. I wanted a theme that was responsive and simple to work with. At a WordPress meetup, they talked about using Underscores. This starter theme is recommended by local WordPress designers.

Next, I started adding my CSS to the starter theme’s CSS. I had to make adjustments to ensure that the CSS works with WordPress. If you don’t, your theme may have unexpected results. Then, I added my theme to WordPress and started testing. I had to make additional changes. A few tweaks to fix things that didn’t work that way I had planned.

What was the Result?

The result was ok. I went back to tweak the colors because the original colors didn’t work well for me. Working with colors from that photo was challenging. The colors work well in the photo. When interpreted to hex colors for CSS, they didn’t seem to look as good. The challenge was learning how to get the right mix of colors. Some choices worked better than others. The colors may look good in a photograph, but they make not work well in designing a theme.

This was an experiment. Not all experiments work out. From every experiment, you learn something. You learn what to do, what not to do and how to do better the next time.

Have you had success in designing a theme from a photo?

From Design Rules to Thinking Like An App Designer

Learning about Design? Design has rules, tips, tricks and techniques that you need to learn. As you learn, you realize that there is a right and wrong way to apply these. Some design rules can be broken. You need to learn when and how to break these rules.

20 Design Rules You Should Never Break

Canva’s Design School talks about 20 Design Rules You Should Never Break. When you are designing, you can break certain design rules. You first need to learn these design rules, so you can break them in a way that makes sense for the design. This article provides you with tips, tricks and rules on how to fix common design errors.
Thinking Like An App Designer

Why designers should never use fake text

Are your designs filled with fake text or lorem ipsum? Do you use it as a placeholder until the real text is ready? Jerry Chao explains why you shouldn’t use fake or dummy text. He suggests that you should write your own text. No matter how rough the text, you’ll see design issues that may not be found right away with lorem ipsum.

Flat Design vs. Material Design: How Are They Different?

Design styles change. New ideas on design can become popular quickly. Some are just fads that disappear. Anna Lisnyakn describes the difference between Flat and Material design. She gives you the pros and cons of each design style and helps you to decide which one works for your project.

What do you need to think like an app designer?

You want to work on mobile apps. How do you approach the design of mobile apps? Thinking like an app designer helps you to change your design thinking. To build mobile apps, you have to learn and unlearn new ways of designing. What works on a website, won’t work when designing a mobile app.

Summary

The more you design problems you solve the better you get at design. These tips help to learn what design rules you can break, why you need to design with real text and how to think like an app designer. What other design tips do you use?