Mocha is a testing framework that provides structure for unit tests. In this lesson, we will be setting up Mocha with npm and npm scripts, writing a "Hello World" unit test, then writing the code to make the test pass (as an example of Test Driven Development (TDD), with the "red-green-refactor" workflow).
Just like a bitmap image, you can compress an SVG by removing various pieces of code that aren’t necessary to it rendering properly. This reduces file size & download time, ultimately leading to a faster page load speed. You’ll learn how to automate the process of compressing your SVGs using
svgo in the command line.
For a full list of options and plugins available to use with
svgo, check out their documentation.
Note: This lesson assumes you have
As of version 4, D3 is a completely modular tool, composed of many small libraries. You can use them independently or as a whole, and even create custom builds that include only the parts you need. This lesson will review the options available for installing and using D3, and will set up a local environment for rapid experimentation.
We’ll discuss the
display values pertinent to CSS Grid Layout –
subgrid. Then, let’s jump in at the deep end by putting together a simple grid layout in a flash.
Another option to enable the Grid Layout is to enable the
Experimental Web Platform features flag in
The Flexbox css spec allows for more adjustable layouts. The
flex-direction property allows you to easily change the layout on the children of an element without making any changes to the dom, which is particularly useful when combined with media queries.