An Introduction To SVG Filters

If I asked you to blur an image or make color adjustments to it, you’d probably reach for your favorite image or graphic editing program and rightly so. Effects like these have been created in image editors for years. However, some can now be created without the editor and through code alone.

Continue reading

How To Write Your Own Custom Sass Functions

If you’ve built more than a handful of websites, you’ve probably noticed you can easily repeat code in a project and across multiple projects. Repeating the same code over and over wastes your time and increases the possibility of introducing errors. In a previous series on Sass, I said mixins were one option for reusing styles and writing DRYer code. Functions are another way to do the same.

Continue reading

Loop Through Sass Code Using Control Directives

Control directives give you a way to add conditional logic to your Sass code. They allow you to branch your code in different directions based on different conditions and they allow you to loop through code until certain conditions are true or they stop being true.

Continue reading

Add Conditional Logic To Sass With Control Directives

One of the ways CSS can be limiting is the lack of conditional logic and loops. You’re limited in your ability to set a style if one condition is true or while another remains true. There are media queries which offer some conditional logic, but odds are you’ve wished you could test against more conditions than media queries allow.

Continue reading

Building Better Data Structures With Sass Maps

One downside of working with lists in Sass is you have to access values by an index you may not know. Maps solve that problem and allow you to access values based on key names you assign to them.

Continue reading