saadeghi / daisyui

๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ โ€ƒThe most popular, free and open-source Tailwind CSS component library
https://daisyui.com
MIT License
33.64k stars 1.28k forks source link

bug: Some elements depend on using backgrounds, which break for print media #3232

Open OiYouYeahYou opened 5 days ago

OiYouYeahYou commented 5 days ago

What version of daisyUI are you using?

latest

Which browsers are you seeing the problem on?

Chrome

Reproduction URL

https://play.tailwindcss.com/wWndQ9FxeZ

Describe your issue

When printing browsers remove background colours to avoid excessive use of ink and other problems. But many of the Daisy components use background colour as part of it's feature this breaks. I've only tested on Chrome (Linux), but am certain this is a cross browser issue.

ATM I'm just using a .print-fix class:

.print-fix {
    print-color-adjust: exact;
}

Though, I expect this is low severity as few people are doing anything with print media

@media screen aka "normal view"

image

@media print aka from print preview

image

github-actions[bot] commented 5 days ago

Thank you @OiYouYeahYou for reporting issues. It helps daisyUI a lot ๐Ÿ’š
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.