Friday Frontend: Rough Week Edition
Tags: fridayfrontend, css, javascript, webdev
Published: 2018-09-28 15:26:17

---
title: Friday Frontend: Rough Week Edition
published: true
tags: friday-frontend, css, javascript, webdev
canonical_url: https://zendev.com/2018/09/28/rough-week-edition.html
---

This has been a rough week for those of us in the US, and I suspect for some folks outside the US. Some very very dark and messy stuff playing out on the national stage. If learning about front-end stuff helps distract you, hope you enjoy this week’s links. And if you’re feeling too emotionally strained to even think about this stuff right now, know I’m right there with you.

Take some time for self care. And if you haven’t been triggered by any of the stuff going on, lend some sympathy to anyone in your life who has been.

Hope you have a great weekend!  
KBall from ZenDev

#### CSS & SCSS

##### [Don’t use empty or low content for your design system grid examples](https://css-tricks.com/dont-use-empty-or-low-content-for-your-design-system-grid-examples/)

This is kinda blowing my mind. Exploring the fact that CSS-Grid based systems can not only reproduce the type of regular, controlled distribution of layout that we had before but a fascinating new type of system where grid sizing and space is determined by the content within it. Very very cool!

  

##### [Putting things on top of other things](http://tellthemachines.com/stacking-contexts/)

Fascinating exploration of the concept of ‘stacking contexts’. My previous primary exposure to them was with z-indexes, and this will help you if you ever get frustrated with z-index not doing what you expect, but this article also goes into the other effects of a stacking context and how that impacts things like blending and more.

  

##### [What is Modular CSS?](https://spaceninja.com/2018/09/17/what-is-modular-css/)

A walk through the history and thinking behind modern CSS naming schemes and approaches. Explains what systems like OOCSS, BEM, and SMACSS are, but also walks through the thinking. A great overview of ‘component-oriented’ coding from a CSS (rather than JS framework) perspective.

  

##### [3D Emoji Town (Pure CSS)](https://codepen.io/GeorgePark/pen/MqVoYP)

Mind totally blown by this one. An entire animated town, built entirely with html and css, with the only javascript being an event handler on a slider that lets you _rotate the town in 3d_. Wow.

  

#### JavaScript

##### [A Beginner’s Guide to Closures in JavaScript](https://blog.bitsrc.io/a-beginners-guide-to-closures-in-javascript-97d372284dda)

Closures are one of those language features that have been around since the beginning and are key to really starting to understand and work well with JavaScript. This article not only gives you a sense of how they work, but goes deep on the ‘why’ behind how they work.

  

##### [5 Tips to Write Better Conditionals in JavaScript](https://scotch.io/tutorials/5-tips-to-write-better-conditionals-in-javascript)

This is a really nice “how to write better code” article. Some specific concrete tips that help you to write cleaner, more readable conditionals.

  

##### [A Minimal JavaScript Setup](https://css-tricks.com/a-minimal-javascript-setup/)

This article presents a JavaScript library/miniframework that the author was involved with writing, but that isn’t the interesting part of it. The great part of this article is the analysis of _what decisions a framework needs to make._ It breaks down what are the components of a modern JavaScript application and how those get represented in frameworks. Very valuable for understanding the big picture of how these things work.

  

##### [Using Scoped Slots in Vue.js to Abstract Functionality](https://css-tricks.com/using-scoped-slots-in-vue-js-to-abstract-functionality/)

Took me a couple read throughs to fully wrap my head around this, but essentially what this is showing is how to use Vue’s `scoped slot` functionality to create what in the React World would be called higher order components with render props. Essentially wrapper components that add particular functionality but can then be used with arbitrary children.

  

##### [3 Anti-patterns for Conditional Rendering with React](https://frontarm.com/articles/react-anti-patterns-conditional-rendering/)

With JSX being “just javascript”, there are many many ways to achieve the same goals. This article dives into some of the mechanisms you might use for conditional rendering, and what the downsides of these particular approaches are.

  

#### Other Awesomeness

##### [Content and Design Are Inseparable Work Partners](https://medium.com/user-interface-22/content-and-design-are-inseparable-work-partners-a21e76b644d9)

This is highlighted around design, but I’ve found it to be true for development as well. Any development that you do with purely “dummy data” that is not representative of actual data is incomplete at best. To build a truly robust system, you need to have an understanding of the real data that is going to be in it.

  

##### [The “Developer Experience” Bait-and-Switch](https://infrequently.org/2018/09/the-developer-experience-bait-and-switch/)

A very important contribution to the conversation about our continued move to put more and more things in JavaScript. Many times tradeoffs are made in the name of ‘developer experience’ (like, for example, CSS in JS) and we handwave away the user costs based on an argument about iteration speed. These arguments may or may not be correct, but as this article presents we’ve neither validated them nor set up systems to make sure we keep developer motivations and user motivations aligned.

  

##### [A framework for web performance](https://adactio.com/journal/14355)

Along a similar line as the previous article, but instead of making an argument about what we should be valuing, this talks about how we even go about measuring web performance. What are the relevant things to look at, and if we want to optimize how should we determine what will be the most valuable.

  

##### [Accurately measuring layout on the web](https://nolanlawson.com/2018/09/25/accurately-measuring-layout-on-the-web/)

Continuing in the performance theme, this article looks at how we measure our JavaScript performance, particularly looking at JavaScript that manipulates the DOM. The author argues that a true measure of performance has to include the resulting formatting & layout work that the browser does as a result of your JavaScript, and looks at some mechanisms for measuring.

  

##### [An open governance model for the AMP Project](https://amphtml.wordpress.com/2018/09/18/governance/)

If you think that AMP plays a valuable role outside of prefered google results (and I think it very well may - it’s another take on the mobile performance question) then this is a very good sign. The tech lead of the project announces a move towards an open governance model with a technical steering committee.

  

* * *

#### 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)