Skip to content

General

Laurel edited this page Nov 8, 2022 · 17 revisions

Index


General - Use tags or categories as selectors

Single Posts

The category appears on the body tag in this format: .cat-[categoryslug].

The category appears on the section tag in this format: .category-[categoryslug].

The tag appears on the section tag in this format: .tag-[tagslug].

The section tag contains a post's header, content, and sidebar, but not elements outside of the content area like the theme's header or footer.


General - Use Page IDs as selectors

Caution: page and post IDs should be used as selectors sparingly, if at all. It's much preferred if customizations can be set up in a way that people editing the site can control, for example using blocks, tags or categories.

Each post has its ID as part of a class on its body tag, in this format: .postid-###.

Each page has its ID as part of a class on its body tag, in this format: .page-id-###.


General - Hide byline prefix

This custom CSS will remove the word "By" before an author's byline, sitewide:

span.byline span:not(.author.vcard), 
span.author-prefix {
	display:none;
}

Newspack Scott - hide accents

.accent-header:not(.widget-title)::before, 
.article-section-title::before, 
.cat-links::before, 
.page-title::before, 
.site-breadcrumb .wrapper > span::before {
    display: none;
}

Clone this wiki locally