<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Implementing of critical rendering path in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Implementing-of-critical-rendering-path/m-p/997498#M39663</link>
    <description>&lt;P&gt;Any news on this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jun 2024 09:05:21 GMT</pubDate>
    <dc:creator>EOrlov</dc:creator>
    <dc:date>2024-06-26T09:05:21Z</dc:date>
    <item>
      <title>Implementing of critical rendering path</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Implementing-of-critical-rendering-path/m-p/997058#M39650</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We experience main.css with very low coverage on certain pages. What is the way to divide main.css into a part loaded by &amp;lt;style&amp;gt; inline and a deferred part?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 14:44:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Implementing-of-critical-rendering-path/m-p/997058#M39650</guid>
      <dc:creator>EOrlov</dc:creator>
      <dc:date>2024-06-25T14:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing of critical rendering path</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Implementing-of-critical-rendering-path/m-p/997498#M39663</link>
      <description>&lt;P&gt;Any news on this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 09:05:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Implementing-of-critical-rendering-path/m-p/997498#M39663</guid>
      <dc:creator>EOrlov</dc:creator>
      <dc:date>2024-06-26T09:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing of critical rendering path</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Implementing-of-critical-rendering-path/m-p/998077#M39673</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/461518"&gt;@EOrlov&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;implementing a more "component"-based/Atomic-Design approach is definetelly doable but can be quite a workload if you're implementing it not from scratch.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If your main.css looks a bit like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{#- 1. Generic -#}
{% include './generic/_reset.css' %}
{% include './generic/_normalize.css' %}

{#- 2. Layout -#}    
{% include "./layout/_layout.css" %}
{% include "./layout/_bootstrap.css" %}

{#- 3. Global -#}    
{% include "./global/_buttons.css" %}
{% include "./global/_forms.css" %}
{% include "./global/_typography.css" %}
{% include "./global/_navigation.css" %}

{#- 4. Modules -#}
{% include "./module/module-a.css" %}
{% include "./module/module-b.css" %}
{% include "./module/module-b.css" %}
...&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and you like to switch to an approach that will load the module-*.css files only if this module is used on a page, you can put something like this into your module.html&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{{ require_css(get_asset_url("../../../css/modules/module-a.css")) }} {# change the path to your folder structure #}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you want to include a template specific CSS file into a template you can put this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set template_css = "../../css/templates/template-a.css" %} {# change the path to your structure #}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: If you want to use the template_css option, make sure that your base.html/layout.html has this line in the &amp;lt;head&amp;gt;-tag&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% if template_css %}
    {{ require_css(get_asset_url(template_css)) }}
{% endif %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 08:04:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Implementing-of-critical-rendering-path/m-p/998077#M39673</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2024-06-27T08:04:26Z</dc:date>
    </item>
  </channel>
</rss>

