mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-08-28 12:02:40 +00:00
33 lines
651 B
Plaintext
33 lines
651 B
Plaintext
![]() |
created: 201804111739
|
||
|
modified: 201804111739
|
||
|
title: Q: How can I style a tiddler if it has "this" AND "that" tag?
|
||
|
tags: [[Custom Styles FAQ]]
|
||
|
|
||
|
''Answer:'' <<.from-version "5.1.16">>
|
||
|
|
||
|
If tiddler has both: `this` AND tag `that` create an orange border.
|
||
|
|
||
|
```
|
||
|
[data-tags*="bar"][data-tags*="froz"] {
|
||
|
border: 2px solid orange;
|
||
|
}
|
||
|
```
|
||
|
|
||
|
''If your CSS looks like this: ''
|
||
|
|
||
|
```
|
||
|
[data-tags~="this"] {
|
||
|
border: 2px solid blue;
|
||
|
}
|
||
|
|
||
|
[data-tags~="that"] {
|
||
|
border: 2px solid red;
|
||
|
}
|
||
|
```
|
||
|
|
||
|
`this` creates a blue border
|
||
|
`that` creates a red border
|
||
|
If you swap positions, you get it the other way around.
|
||
|
|
||
|
|
||
|
[[Learn more about possible attributes!|Attribute Selectors]]
|