mirror of
https://github.com/gapmiss/badges.git
synced 2026-07-22 08:00:30 +00:00
Document data-badge-type CSS attribute for plain-text badges
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
1bd093dec5
commit
f672e3492e
1 changed files with 20 additions and 0 deletions
20
README.md
20
README.md
|
|
@ -264,6 +264,26 @@ body {
|
|||
}
|
||||
```
|
||||
|
||||
##### Styling plain-text badges by type
|
||||
|
||||
Plain-text badges include a `data-badge-type` attribute containing the `KEY` value, enabling CSS targeting of specific badge types.
|
||||
|
||||
###### examples
|
||||
|
||||
```css
|
||||
/* Style all "Status" badges */
|
||||
.inline-badge-extra[data-badge-type="Status"] {
|
||||
background-color: rgba(var(--color-green-rgb), .22);
|
||||
color: rgba(var(--color-green-rgb), .88);
|
||||
}
|
||||
|
||||
/* Style "Priority" badges differently */
|
||||
.inline-badge-extra[data-badge-type="Priority"] {
|
||||
background-color: rgba(var(--color-red-rgb), .22);
|
||||
color: rgba(var(--color-red-rgb), .88);
|
||||
}
|
||||
```
|
||||
|
||||
### Dataview
|
||||
|
||||
View and copy example dataview queries: [badges-dataview](assets/badges-dataview.md)
|
||||
|
|
|
|||
Loading…
Reference in a new issue