gj-wes / template-compiler

Simple transformer to compile HTML components into single output file
0 stars 0 forks source link

Component to push CSS to main stylesheet #3

Open gj-wes opened 3 months ago

gj-wes commented 3 months ago

Add functionality to allow a component file to push additional component-specific styles or classes to the main styles (or their own <style> block in the head).

This would allow component-specific classes to be kept within the component HTML and not be lumped in with the main stylesheet.

<style>
.two-col-gap {
  width: 12px !important;
}
</style>

<table>
  <tr>
    <th></th>
    <th class="two-col-gap"></th>
    <th></th>
  </tr>
</table>