The right way to check for empty content in Twig
Have you ever used {% if content|render|trim is not empty %} in twig to validate content is not empty? If so, you might end up with some surprises related to the use of the render method.
Have you ever used {% if content|render|trim is not empty %} in twig to validate content is not empty? If so, you might end up with some surprises related to the use of the render method.
For a long time I’ve been compiling my Sass into a single CSS file - styles.css, but recently, with our component based design/frontend process and Drupal 8’s lovely Library system I’ve been wondering if the single file was still a good idea. Looking at the amount of unused CSS loading into any given page was a little bit painful.