Friday Frontend: Re-imagining CSS Approaches Edition
Tags: fridayfrontend, css, javascript, webdev
Published: 2019-03-15 14:47:13

---
title: Friday Frontend: Re-imagining CSS Approaches Edition
published: true
tags: friday-frontend, css, javascript, webdev
canonical_url: https://zendev.com/2019/03/15/reimagining-css-approaches-edition.html
---

Hope your week was amazing! What stood out to me this week was a few articles that really took different ways of looking at what CSS is and how we can use it. One on combining SASS and CSS variables that really opened my eyes to new synergies between my old favorite tool (SASS) and the new powerful CSS we’re getting. Another on applying the concept of algorithms to CSS. And then some mindblowing graphical stuff with compositing and gradients.

There’s also some truly excellent JavaScript articles this week - I appreciated finding a writeup on best practices for large & long-lived applications, and really enjoyed the deep dive into React hooks.

Finally down in other awesome, make sure you take a look at the javascript-free frontend piece, as it challenges a lot of modern assumptions while still creating a powerful modern result.

Best,  
KBall from ZenDev

#### CSS & SCSS

##### [Building Robust Layouts With Container Units](https://www.smashingmagazine.com/2019/03/robust-layouts-container-units-css/)

This is a very nice article laying out a technique for using CSS variables to build robust, internally consistent layouts.

  

##### [How to combine SASS color functions and CSS Variables](https://codyhouse.co/blog/post/how-to-combine-sass-color-functions-and-css-variables)

I’ve seen a number of articles recently asking questions about replacing SASS with modern CSS, but what I like about this one is how it very much looks at synergies between the two. Utilizing sass functions for ergonomics and CSS variables for live updating and cleanliness of final CSS, this is a very very nice approach.

  

##### [Writing CSS Algorithms](https://notlaura.com/writing-css-algorithms/)

I like the way this author is thinking about CSS. Rather than try to utilize completely different language for CSS as compared to other programming languages, they advocate reusing the word “algorithm” to describe a well-defined declaration or set of declarations aimed at achieving a specific outcome. Given the [broad definition of algorithm](https://www.merriam-webster.com/dictionary/algorithm) as “a step-by-step procedure for solving a problem or accomplishing some end”, this totally works. The author then takes this further & describes an approach for developing “CSS algorithms”.

  

##### [Mask Compositing: The Crash Course](https://css-tricks.com/mask-compositing-the-crash-course/)

This kinda blew my mind. I can’t say I fully understood it, it’s really long, and the final code requires all sorts of browser-hacky workarounds to go cross browser, but OMG I’m blown away by the power of css-based masks. The examples are mostly images, but there’s no reason these techniques shouldn’t work to mask anything in the DOM letting you create super cool effects.

  

##### [Recreating the Facebook Messenger Gradient Effect with CSS](https://css-tricks.com/recreating-the-facebook-messenger-gradient-effect-with-css/)

Fun exploration of CSS gradients and their limitations, all within the framework of recreating the “gradient bubbles” effect recently introduced by Facebook Messenger.

  

#### JavaScript

##### [Accessibility is not a “React Problem”](https://www.netlify.com/blog/2019/02/25/accessibility-is-not-a-react-problem/)

A solid set of recommendations for how to get started writing accessible React applications. Ends with a great list of additional recommended resources.

  

##### [JavaScript naming conventions: do’s and don’ts](https://medium.freecodecamp.org/javascript-naming-conventions-dos-and-don-ts-99c0e2fdd78a)

More useful for folks who are beginners or new to JavaScript, but this encapsulates a lot of common/best practices in a way that is easy to digest and absorb.

  

##### [Maintaining large JavaScript applications](https://9elements.com/io/maintaining-large-javascript-projects/)

So many of our learning resources are structured as ‘from-scratch’ tutorials. Build an app from scratch. Try this thing from scratch. Rewrite your app from scratch. It’s rare to see someone writing about the lessons learned maintaining an existing (and large) application for years. This post does, and I think these are some very valuable lessons indeed.

  

##### [Deep dive: How do React hooks really work?](https://www.netlify.com/blog/2019/03/11/deep-dive-how-do-react-hooks-really-work/)

This is a great article, not just for understanding React hooks but for really wrapping your head around closures. It’s not short, and not super simple, but I enjoyed it a lot and learned throughout.

  

##### [Understanding Closures in JavaScript](https://medium.com/javascript-in-plain-english/understanding-closures-in-javascript-in-3-minutes-557ebb8a215b)

If the previous article felt a bit too hard to follow, this one might be a better try. It’s tightly scoped and relatively short, giving you a great explanation of closures and how they work.

  

#### Promoted Link

##### [Udemy March Savings Spree](http://click.linksynergy.com/fs-bin/click?id=hIdOL5Z4eK4&offerid=507388.9900&type=3&subid=0)

For the next week - until March 20th - Udemy is running a March sale with courses discounted down to just $12.99. If you’re not sure what courses to look for, you might check out [my post on frontend topics to learn in 2019](https://dev.to/kball/top-5-frontend-development-topics-to-learn-in-2019-4m0m). Regardless, if you’ve got something you’ve been meaning to learn about, take advantage now and get it on the cheap!  

  

#### Other Awesome

##### [A JavaScript-Free Frontend](https://dev.to/winduptoy/a-javascript-free-frontend-2d3e)

This is a very cool look at building out a “modern” front-end while eschewing (for the most part) JavaScript. I played around with the application - it’s barebones and “slim” but works well, feels wicked fast, and while minimalist did not feel super out of place from a visual/design perspective.

  

##### [Design in Tech Report 2019](https://designintech.report/2019/03/09/design-in-tech-report-2019)

An interesting and broad look at the tech ecosystem and the role Design is playing in it. Multimedia depending on what you want - just reading through the desktop slides version was fascinating but felt a little fragmented. The video of the author presenting it at SXSW gave a lot more context.

  

##### [Cache-Control for Civilians](https://csswizardry.com/2019/03/cache-control-for-civilians/)

Great article on one of the biggest simple ways to improve network performance - better caching. Becomes even more useful if you’re employing a CDN. If you’re in a big company that has dedicated operational folks this probably is outside the scope of what you’re doing as a frontend engineer, but regardless if you care about frontend performance you should understand this stuff and check to make sure your assets are being cached appropriately.

  

##### [GraphQL Resources: top tools, extensions & tutorials for beginners](https://dev.to/tomekponiat/graphql-resources-top-tools-extensions--resources-for-beginners-2f13)

GraphQL is one of my [top topics to learn this year](https://dev.to/kball/top-5-frontend-development-topics-to-learn-in-2019-4m0m), and it seems like there’s more resources coming out every week. If you’re looking for some of the best ones for beginners this is a super useful roundup post.

  
  

#### Happy Friday!

That's it for this week's Friday Frontend newsletter. If you enjoyed this, you should probably [follow me on Twitter](https://twitter.com/kbal11) or join my mailing list. Sign up to get these newsletters straight to your inbox every Friday! Sign up here: [https://zendev.com/friday-frontend.html](https://zendev.com/friday-frontend.html)