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.

1 Like

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.