created: 20141001132300000
modified: 20141001132300000
tags: Learning
title: How to apply custom styles by tag
type: text/vnd.tiddlywiki

You can apply custom styles to tiddlers that have a particular tag by defining a CSS class with the name `tc-tagged-<Tag Name>`

For example, to make tiddlers tagged "NightReader" appear in a special colour scheme suitable for night-time reading, [[create a stylesheet|Using Stylesheets]] defining the class .`tc-tagged-NightReader` like this:

```
.tc-tagged-NightReader {
	background-color:black;
	color: orange;
	padding: 35px 35px;
}

.tc-tagged-NightReader .tc-tiddler-body {
	font-size: 1.5em;
}
```

Note that the `NightReader` class is applied to the entire tiddler and not just the tiddler text. If you want to target a smaller portion of the tiddler you can qualify the CSS selector, as is done here with `.tc-tagged-NightReader .tc-tiddler-body`.
