In this tutorial, we will learn how to add block-specific styles to a Gutenberg block. We will be loading two separate CSS files. The first (style.css) will be applied to both the frontend and the editor. The second (editor.css) will only be applied within the Gutenberg editor.
This tutorial builds off the How to Build Gutenberg Blocks Using JSX tutorial. If you’re not familiar with Gutenberg or JSX, I would suggest starting with that tutorial.
The code from this tutorial is available as a fully functioning plugin. Check out the example on Github.