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

Markdown checkbox missing check mark #17042

Closed
2 of 6 tasks
ghost opened this issue Sep 14, 2021 · 4 comments · Fixed by #17146
Closed
2 of 6 tasks

Markdown checkbox missing check mark #17042

ghost opened this issue Sep 14, 2021 · 4 comments · Fixed by #17146
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/ui Change the appearance of the Gitea UI type/bug

Comments

@ghost
Copy link

ghost commented Sep 14, 2021

Description

When trying to print a markdown with checkboxes in a list from Gitea the check mark is missing in the printing.
Tried browsers:

  • Chrome 93
  • Firefox 90
  • Edge 93

Screenshots

Webpage:
image

Printing preview:
image

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Sep 14, 2021

Remove some css styles, then the check mark appears again.

.markup input[type=checkbox] {
    /* -webkit-appearance: none; */
    /* -moz-appearance: none; */
    /* appearance: none; */
}
.markup input[type=checkbox]:after {
    /* background: var(--color-text);  Firefox is not affected by this, but Chrome is */
}

And it's very strange that this bug is not related to media(print), if the media(print) is activated manually in Chrome's Developer Tools console, the rendered page in browser is still correct while the print preview is wrong.

ps: I didn't mean removing these styles is a correct fix, I just tried to confirm the problem, the problem seems a little complex and it might need to be fixed carefully 😂

@noerw noerw added the topic/ui Change the appearance of the Gitea UI label Sep 14, 2021
@axifive axifive added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Sep 14, 2021
@sebastian-sauer
Copy link
Contributor

When enabling "Background graphics" in Print Dialog (expand More Settings) the Checkbox will be rendered correctly.

@sebastian-sauer
Copy link
Contributor

sebastian-sauer commented Sep 20, 2021

Looks like a "-webkit-print-color-adjust: exact;" for the checkbox:after will solve this issue. (and a color-adjust: exact) for Firefox

@sebastian-sauer
Copy link
Contributor

In Firefox the problem is solved by adding the color-adjust. Looks like chrome doesn't apply the mask-image when printing:

checkbox

@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants