obsidian-solarized icon indicating copy to clipboard operation
obsidian-solarized copied to clipboard

Additional style settings options

Open t-molder opened this issue 1 year ago • 4 comments

Adds additional style setting picker for the current line highlight as per the feature request. Also adds a color picker for the application accent color due to incompatibility between the color-accent variable and the native option. (note this affects everything but the accent on a menu button hover for some reason.)

Additionaly segments style settings into a separate file. (This does make obsidian-style-settings #168 even jankier though.)

t-molder avatar Nov 01 '24 21:11 t-molder

@t-molder Did compiling the SCSS work for you with the settings comment in a separate file? I get:

 *  Executing task: sass theme.scss theme.css 

Error: Undefined variable.
   ╷
25 │     default: rgb(#{map.get($tones, "base03")})
   │                            ^^^^^^
   ╵
  _style-settings.scss 25:28  @use
  theme.scss 5:1              root stylesheet

Edit: That seems to be expected behavior when using @use. When using the deprecated @import this does work…

Edit 2: https://github.com/sass/sass/issues/2750#issuecomment-1498338102

harmtemolder avatar Nov 04 '24 12:11 harmtemolder

The annoying part about what you've called Application Accent Color is that Obsidian actually constructs this from accent-h, -l and -s. In some places (especially where transparency is involved) those are used directly instead, so overwriting color-accent does not change all. I propose to just point to Appearance > Accent color

harmtemolder avatar Nov 04 '24 12:11 harmtemolder

For Current line highlight we might be able to add a toggle, which would be even simpler for people wanting to disable it

harmtemolder avatar Nov 04 '24 12:11 harmtemolder

Nope, that's my fault for lack of testing. Still wrapping my head around how scss compiling works. Apologies.

Accent color is a weird one. Most style settings supporting themes I've checked seem to break the native feature. I don't know where that obsidian code lives, but perhaps some sort of if isset checker could work that doesn't do anything if the native option is non-default?

For the highlight, I tried with the style settings' toggle option, but was unable to get it working. Maybe you'll have more luck.

t-molder avatar Nov 04 '24 13:11 t-molder