Styling a different section's pages differently with Tailwind

I just got into trying tailwind with my current site about three days ago and I am learning a lot. Now, all my pages (except one page type) share the same single.html file, but one of the section’s pages I have removed the list-style-type with CSS by code splitting the CSS files for single pages and assigning them conditionally.

However, other than duplicating the single.html for this section and applying the CSS (class), is there another way to achieve this within Hugo without resulting to inline CSS?

So you just want to remove the list style on one page? You could do that by setting a front-matter variable and then checking for that, e.g:

---
title: my post with a flat list
flat-list: true
---
<ul{{ if .Params.flat-list }} class="list-none"{{ end }}>
1 Like

No. About 300 pages in one section with a front matter cascade type. You just reminded me that I keep forgetting someone can assign variables as classes.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.