Styling and CSS
To style various Meta Bind elements you need to write custom CSS. The easiest way to load custom CSS into Obsidian is with a CSS snippet.
Input Field Styling Example
Let’s say we want to color specific progress bars red. For this we can utilize the class
argument.
First we create our progress bar with the class argument. In this case we name our special class red-progress-bar
.
Then we create our CSS snippet with a selector for a progress bar with the class red-progress-bar
.
Then we target the progress bar progress element and set the background color to red.
In some cases you might need higher specificity to override existing styles. In this case you can use the !important
flag.
Button Styling Example
If you want to change the style of a specific button, you can specify a CSS class for the button and then target it with a CSS snippet.
First we create a button and specify a custom class, in this case green-button
.
Then we create our CSS snippet with a selector for a Meta Bind button with the class green-button
.
Then we target the button element itself and set it’s color to green.
In some cases you might need higher specificity to override existing styles. In this case you can use the !important
flag.