Switching to a new Chrome version

Recently I’ve started working on creating custom CSS snippets. While doing so I found it that I really miss the :has() pseudo-class which acts as a parent selector.

It is available in Chrome 105 while Obsidian is currently running on Chrome 100.

Switching to a newer Chrome version would allow for this new pseudo-class to be used. This would make many new things possible and many already possible things much, much easier to achieve, most importantly without any JS, which would alleviate the need for having many little JS snippets running on every keystroke.

2 Likes

Yes, updating the Electron version is overdue. It will probably happen with the next larger public release. I guess it was not done this time because the developers were so busy with the new Canvas feature. Updating to the new Electron/Chrome version will also fix a lot of other pending bugs and quirks e.g. regarding font rendering on the Mac.

1 Like

Obsidian 1.1.9 is using Electron v21 and Chrome 106 so the :has() selector is now available! :tada:

Make sure to reinstall using the latest installer if you previously had an older version and only updated within the app. This is necessary to get the latest Electron / Chrome version.

The :has() selector opens a lot of possibilities! I’m currently experimenting with it to achieve the same result as the contextual-typography plugin with pure CSS alone (no plugin required).

2 Likes

The update to Electron 21 is much appreciated, however it did not solve the font rendering issue on the Mac for me, unfortunately.

I’m running Obsidian v1.1.15, but it’s under the hood there is just Chrome 100 and Electron v18 running.
Did they revert back to that or am I missing something? Do I have to force an update for that?

You need to do an installer update.

1 Like

For anyone reading this, if it’s your first time doing this and your have no clue…

  • you can find the Chrome/Electron version by opening the Developer Tools and typing navigator.appVersion
> navigator.appVersion
'5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) obsidian/1.1.15 Chrome/106.0.5249.199 Electron/21.4.1 Safari/537.36'
  • as for the installer update, brew upgrade --cask obsidian will do the trick (if you use homebrew)

Also for anyone reading this, we don’t support installation via homebrew.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.