I come through this thread to ask for help with a problem that has been bothering me a lot: different ways of presenting a note on different devices. I talk about this topic specifically about font sizes. I use Obsidian on IOS phone, Android tablet and PC. I didn’t get the expected result from the existing topics on the forum.
What I’m trying to do
Trying to obtain specific CSS classes for each device and thus keep them fixed from the moment I enter Obsidian on each device. This way, I can use a Snippet to solve a problem.
Things I have tried
Help in the community because I’m new to the subject
This is more of an idea, than a solution, but wouldn’t it be possible to use some startup script (like the startup template of Templater, or a javascript using one of many javascript plugins), to actually set a variable at the top level of the DOM, and then use for further selection?
I’m thinking checking for something like navigator.appVersion, navigator.userAgent or navigator.platform, and then set a dedicated class somewhere near the top of the DOM? Shouldn’t that work? The following article further enhances this approach:
Here it states that you should be able to use navigator.userAgentData.platform and navigator.userAgentData.mobile , and do some magic based upon these values. And yes, Obsidian is way beyond Chromium 84 where this was firstly enabled.
Thank you for your attention. In fact, I had already posted similar help but I believe this is proof that I have content adaptability problems depending on the device used, be it the font size or even the theme (taking advantage of the opportunity, is it possible?)