standardnotes / forum

Support from other community members. For 1-on-1 help, please contact help@standardnotes.com.
https://forum.standardnotes.org
196 stars 9 forks source link

[Issue] Tabbing (in note body) shows up differently in Firefox vs. Vivaldi(Chromium-based browser)/Desktop #609

Closed WildManiac closed 1 year ago

WildManiac commented 5 years ago

Tabbing (indenting) shows up differently between Firefox and Vivaldi/Desktop (both Chromium-based, I think?).

Examples below:

As viewed in Vivaldi (as well as on Desktop): vivaldi

As viewed in Firefox: firefox

What I found was the following:

Testing was done with the following:

moughxyz commented 5 years ago

We use the tab-size CSS property with a value of 2. Perhaps some browsers require a custom prefix?

WildManiac commented 5 years ago

It would appear so, at least in Firefox. See: https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size

At this time, to use tab-size in Firefox you would have to use -moz-tab-size. But just changing that doesn't truly resolve the issue, as seen in the below testing.

When viewed in Firefox, no code change viewed_in_firefox

When viewed in Firefox, after changing tab-size to -moz-tab-size viewed_in_firefox_changed_to_-moz-tab-size

When viewed in Firefox, after changing -moz-tab-size to 4 instead of 2 viewed_in_firefox_changed_-moz-tab-size_to_4

When viewed in Vivaldi, no code change viewed_in_vivaldi

When viewed in Vivaldi, after changing tab-size to 4 instead of 2 viewed_in_vivaldi_changed_tab-size_to_4

My conclusions from the above tests:

moughxyz commented 5 years ago

Interesting, thanks for the summary!

WildManiac commented 5 years ago

Another interesting tidbit (and the reason why a tab is always 4 spaces when typed in Firefox) is that hitting tab creates 4 spaces. This is the reason why it is not affected by tab-size or -moz-tab-size.

In Vivaldi/Desktop, a tab is a tab. Which is why when you change tab-size (or -moz-tab-size when viewed in Firefox) the spacing changes.