Clarify l_ui_head guidance: steer styling to overrides/app stylesheet - #89
Conversation
l_ui_head's inline <style> example led host-app LLMs to dump all custom CSS into the head as raw CSS. Reframe the advice (skill, README, dummy docs) so l_ui_head reads as arbitrary head content - scripts, inline page-specific <script>, meta tags, preload hints, stylesheet links - with styling advised toward layered_ui_overrides.css (layered-ui token/ component overrides) or the host app stylesheet. Per-request theming is shown as a Rails-served stylesheet link. Advisory, not prohibitive.
ReviewDocumentation-only PR that reframes Issues
Verdict🟧 Ship (with known minor issues) - The reframing is correct and the security posture improves by steering away from inline style interpolation. The CSP section should be updated to note that the |
The CSP and Turbo sections taught how to make an inline <style nonce> block work, which contradicts steering CSS out of the head. Flip the framing: a linked stylesheet from your own origin is already CSP-clean (style-src 'self', no nonce) and Turbo-cached by URL, so these are now reasons the linked-stylesheet pattern is preferable. Inline-block caveats demoted to an 'if you go inline anyway' footnote.
ReviewDocumentation-only PR that reframes Issues
Verdict🟧 Ship (with known minor issues) - the reframing is correct and the security note is preserved; one code example uses invalid CSS comment syntax that could trip up copy-paste users. |
The example used # as a comment inside CSS-looking content, which is not valid CSS comment syntax and would break on copy-paste. Move the token- override note to a prose paragraph so the <pre> holds only valid ERB.
ReviewDocumentation-only PR that reframes guidance away from inline No issues found. The security warning is preserved and moved to an appropriate place on the dummy page; the CSP/Turbo explanations are retained and consolidated. The updated advice is sound and internally consistent across all three changed files. Verdict✅ Ship |
l_ui_head's inline <style> example led host-app LLMs to dump all custom CSS into the head as raw CSS. Reframe the advice (skill, README, dummy docs) so l_ui_head reads as arbitrary head content - scripts, inline page-specific <script>, meta tags, preload hints, stylesheet links - with styling advised toward layered_ui_overrides.css (layered-ui token/ component overrides) or the host app stylesheet. Per-request theming is shown as a Rails-served stylesheet link. Advisory, not prohibitive.