How to add CSS from a Theme Component?

This should be avoid with this method :

{{- if not ($.Page.Scratch.Get "noticecount") -}}
    <style type="text/css">.notice{padding:18px;}</style>
{{- end -}}
{{- $.Page.Scratch.Add "noticecount" 1 -}}
1 Like