Bug 467488

Summary: Use checker background for images
Product: [Applications] Falkon Reporter: genghiskhan
Component: generalAssignee: David Rosca <nowrep>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description genghiskhan 2023-03-17 12:52:28 UTC
Use checker background
1) always; or
2) for image filetypes that support transparency (e.g. gif, png, webp, perhaps there are even more).

Run the following code on https://www.falkon.org/images/screenshot.png

for (let i = 0; i < fileType.length; i++) { 
  if (document.contentType.match(fileType[i])) {
    // 808080 525c66 dddddd
    // Source: /questions/35361986/css-gradient-checkerboard-pattern
    document.body.style.backgroundImage = 'linear-gradient(45deg, #a3a3a3 25%, transparent 25%), linear-gradient(-45deg, #a3a3a3 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #a3a3a3 75%), linear-gradient(-45deg, transparent 75%, #a3a3a3 75%)';
    document.body.style.backgroundSize = '20px 20px';
    document.body.style.backgroundPosition = '0 0, 0 10px, 10px -10px, -10px 0px';
  }
}