Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some font styles are broken #1160

Open
Kodionpi opened this issue May 4, 2023 · 10 comments
Open

Some font styles are broken #1160

Kodionpi opened this issue May 4, 2023 · 10 comments

Comments

@Kodionpi
Copy link

Kodionpi commented May 4, 2023

Describe the bug
On the "derstandard.at" site, there is a problem with the new forum in displaying the saved page. However, this only occurs with Firefox, but not with Chrome.

To Reproduce
Steps to reproduce the behavior:
1.Go to the news page "https://www.derstandard.at/" in Firefox
2.Click on one of the articles
3.Use SingleFile
4.View the result and scroll down to the forum
5.Compare the result with the forum of the actual page
6.Do the same with Chrome
The result should be different. Under Chrome the saved page resp. the forum looks like the real website, under Firefox this is not the case.

Expected behavior
That Firefox and Chrome work in the same way.

Screenshots
Screenshot of the forum from the same article from the saved SingleFile html file:
Firefox:
singlefile_firefox
Chrome:
singlefile_chrome

Environment

  • OS: Windows 10
  • Browser: Firefox
  • Version: 112.0.2
@gildas-lormeau
Copy link
Owner

Thank you for the bug report and sorry for the late reply.

This is unfortunately a limitation in Firefox due to the Shadow DOM. I need to check in the bug tracker of Mozilla if there is a workaround. The last time I checked (approx. one year ago), there wasn't one.

@gildas-lormeau gildas-lormeau changed the title Problems with the display of a forum under Firefox Shadow DOM stylesheets are not saved under Firefox Jul 21, 2023
@gildas-lormeau
Copy link
Owner

For the record, this is the root cause of this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1817675.

@gildas-lormeau
Copy link
Owner

I was able to find a way to circumvent this bug. The fix will be available in the next version.

@Kodionpi
Copy link
Author

Kodionpi commented Aug 3, 2023

Thank you very much!

@gildas-lormeau
Copy link
Owner

You're welcome. I've just submitted the new version, it should be available for download on Firefox next week.

@Kodionpi
Copy link
Author

Hello, I have now tested the new version and it works very well. Many thanks for that! One little thing I noticed. Some forum users seem to "Bold" the first line of their post and this makes the font size in SingleFile appear larger. This now affects both Firefox and Chrome. It's not a bad thing though, the content is now easy to read and now much more recognizable than before.

Original:
Screenshot 2023-08-10 234759_2

Firefox and Chrome SingleFile:
Screenshot 2023-08-10 234736_1

@gildas-lormeau
Copy link
Owner

gildas-lormeau commented Aug 10, 2023

Thank you for the feedback. Do you mean the fix for Firefox introduced a regression in Chrome among others?

@Kodionpi
Copy link
Author

It seems like this. I save the same article with Firefox and Chrome and with both it now works as it should, but with one small exception. If someone writes something in this forum in "bold" so with both browsers the font size is displayed very large in the saved version. -so no matter with which browser you save it, as well as open it. If I open older saved pages, the "bold" font is displayed normal size.

Here is the same article/forum post twice:
Once saved in April (Chrome only, since Firefox did not work at this time back in April) and once today(no matter which browser).

Old save from April (Chrome):
Screenshot 2023-08-11 at 16-38-36 Mehrsprachigkeits-Expertin Das System lässt Kinder verstummen

Current save from 11.08 (Chrome & Firefox):
Screenshot 2023-08-11 at 16-43-17 Mehrsprachigkeits-Expertin Das System lässt Kinder verstummen

The moment someone writes something in "bold", it is displayed very large in the saved version of both browsers. In Apirl, Chrome had kept ordinary font size. It also only affects some forum posts, as some people choose to use "bold" as the font for parts of their post and others don't at all. The ordinary text is displayed correctly in both browsers. Likewise, Firefox now displays every other element correctly.

@gildas-lormeau
Copy link
Owner

Thank you for the additional info, I did some tests with the version of SingleFile which had not the fix and the problem you described persists. So it would be a coincidence and it's actually another type of bug.
I tried to debug this issue but the style sheet is very entrerprisey. It almost gives me a headache. From a technical point of view, it looks like SingleFile cannot determine the value of the font properties because of a "slightly" complicated usage of "CSS custom properties".

@gildas-lormeau gildas-lormeau changed the title Shadow DOM stylesheets are not saved under Firefox Some font styles are broken Aug 11, 2023
@Kodionpi
Copy link
Author

Sorry for the late reply. I didn't know it could get so complicated. Save yourself the headache, you've already done an excellent job and I'm very happy with the result Firefox now offers. The font size doesn't change anything for me in terms of readability. -which was more difficult before the fix.
Thanks for your effort, but please don't waste too much time and nerves on this little thing.

Another question. Is there a possibility to save visually more complex articles? The article below, for example,
can be saved in terms of content, but the "graphics" and "animation" are partially and completely lost. It's not particularly important to me, but I just thought I'd ask.

https://www.zeit.de/gesellschaft/2023-05/migration-gefluechtete-einwanderungsland-wanderungsstatistik-gastarbeiter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants