Skip to content

enhancement: body and article classes per page/keyword. #815

@davidsneighbour

Description

@davidsneighbour

Idea: adding identifiers for the current post and page types to the body and article tags.

<body class="post-identifier is-page is-section is-node is-list">
<article class="post-identifier">

The .post-identifier class would be some form of unique string per page/post that is based on the url or slug of the page. In <body> tags it would occur only on a single-page-base, in the article tag it should be found anywhere we show a post or post preview.

This way we are able to change styles based on topics (via e.g. article.post-identifier { background: #123123; }) and we keep the whole thing future proof.

I implemented this in some form on my own projects (own themes), so it should be easily adaptable for Ananke.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions