Comments (2)
If variables can't be supported, as mentioned in the Discord thread, if the user had some way of unsetting the color in the Settings UI, and we could put in empty defaults, that might achieve the same result too... and put less work on developers to figure out those default variable values should be.
I found that if I actually set the CSS variables using the var(--some-color)
syntax, and then "hardcode" the color in the settings for Style settings, it'll actually be able to use the variable until you set the color with style settings, and if you reset to default settings it restore the usage of the variables. The only bad thing with this workaround, is that the color shown within style settings is not correct if you change the variable by changing theme or similar, as it's still being "hardcoded".
So I would still love for var(--some-color)
to be understood as a default
value.
from obsidian-style-settings.
I'm in the middle of adding support to my plugin as well, and I'm wondering the same thing.
Started a thread about this (before I saw this issue) on the Obsidian Discord here:
https://discord.com/channels/686053708261228577/702656734631821413/1228351103486394429
I first attempted to set an empty default (it only accepts '#'
) but the user can't reset to it.
Then I tried using Obsidian's variables:
default-light: var(--background-primary)
or default-light: var(--color-base-00)
...but I am getting this error in the console:
Error: Toolbar background missing default light value, or value is not in a valid color format
If variables can't be supported, as mentioned in the Discord thread, if the user had some way of unsetting the color in the Settings UI, and we could put in empty defaults, that might achieve the same result too... and put less work on developers to figure out those default variable values should be.
from obsidian-style-settings.
Related Issues (20)
- Implementation suggestion: Preview below the title HOT 1
- With Minimal theme, editing text in table cell always places cursor at cellโs left edge HOT 1
- Obsidian Update to 1.5.8 breaks all custom styles HOT 1
- Is there a JSON schema for the config? HOT 1
- How to merge two settings definitions into one?
- Link colors cannot be separated in internal and external link-color HOT 10
- Problem and workaround: All of my styles went away when "NANNANNAN" showed up in a style -- the GUI for color picking has a bug
- Bug: Toggle command adds three empty lines before frontmatter YAML HOT 3
- Feature Request: Change setting via frontmatter
- Private mode hides content of notes without private class HOT 2
- Plugin updates itself since last (?) update (Android 11) after every restart of obsidian HOT 2
- Make search also search for headings
- ใ
- Minimal theme's H3 default font weight should be 500.
- Dark Mode / Light Mode HOT 1
- Is there a way to change inline code color? HOT 1
- BUG/Feature Request: Live Preview mode not displaying block quotes in italics.
- Rainbow Folders broken in iOS Testflight Obsidian 1.6.1 HOT 1
- Rainbow Folders broken in Windows 1.6.2 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obsidian-style-settings.