- Issue created by @jwilson3
- Merge request !13Issue #3524861 by jwilson3: Improve debug output readability → (Open) created by jwilson3
With ✨ Make it more obvious that a Twig template is overridden Fixed , Drupal core started using black squares ▪️, checkboxes ✅ , lightbulbs 💡 to increase readability in the DOM. It would be nice to use the same formatting in the CRITICAL CSS DEBUG section
This module's current output:
<style id="critical-css">
/* CRITICAL CSS DEBUG */
/* FILE NAME SUGGESTIONS:
* themes/custom/mytheme/css/critical/1.css
* themes/custom/mytheme/css/critical/path-node-1.css
* themes/custom/mytheme/css/critical/node-1.css
* themes/custom/mytheme/css/critical/path-my-article-title.css
* themes/custom/mytheme/css/critical/my-article-title.css
x themes/custom/mytheme/css/critical/article.css
* themes/custom/mytheme/css/critical/default-critical.css
*/
/* BEGIN OUTPUT from themes/custom/mytheme/css/critical/article.css */
[...]
/* END OUTPUT from themes/custom/mytheme/css/critical/article.css */
</style>
Core theme debugging output:
<!-- THEME DEBUG -->
<!-- THEME HOOK: 'page' -->
<!-- FILE NAME SUGGESTIONS:
✅ page--node--article.html.twig
▪️ page--node--1.html.twig
▪️ page--node--%.html.twig
▪️ page--node.html.twig
▪️ page.html.twig
-->
<!-- 💡 BEGIN CUSTOM TEMPLATE OUTPUT from 'path/to/page--node--article.html.twig' -->
[...]
<!-- END CUSTOM TEMPLATE OUTPUT from 'path/to/page--node--article.html.twig' -->
*
with a black dot icon ▪️ for unused file name suggestions.x
with a checkmark icon ✅ for the selected filename suggestion.Proposed output:
<style id="critical-css">
/* CRITICAL CSS DEBUG */
/* FILE NAME SUGGESTIONS:
▪️ themes/custom/mytheme/css/critical/1.css
▪️ themes/custom/mytheme/css/critical/path-node-1.css
▪️ themes/custom/mytheme/css/critical/node-1.css
▪️ themes/custom/mytheme/css/critical/path-my-article-title.css
▪️ themes/custom/mytheme/css/critical/my-article-title.css
✅ themes/custom/mytheme/css/critical/article.css
▪️ themes/custom/mytheme/css/critical/default-critical.css
*/
/* 💡 BEGIN OUTPUT from themes/custom/mytheme/css/critical/article.css */
[...]
/* END OUTPUT from themes/custom/mytheme/css/critical/article.css */
</style>
Active
2.0
Code