> trying to be smart about the upscaling and ruining the pattern in the process
Yup. Even before the age of ey-aye-slop, image reproduction was already tricky. https://dkriesel.com/en/blog/2013/0802_xerox-workcentres_are_switching_written_numbers_when_scanning
Xerox scanners/photocopiers randomly alter numbers in scanned documents Please see the “condensed time line” section (the next one) for a time line of how the Xerox saga unfolded. It for example depicts that I did not push the thing to the public right away, but gave Xerox a lot of time before I did so. <iframe width="700" height="394" src="https://www.youtube.com/embed/c0O6UXrOZJo" frameborder="0" allowfullscreen></iframe>
@mart_w @jaseg @cato @brezelradar
Use CSS `image-rendering:pixelated` to fix that.
<table aria-label="QR Code of ...">...</table>@jaseg Now I'm wondering if SVG using would even be so much more than a single path after it gets zipped...
That aside though, are you sure a 2 colour bitmap wouldn't be smaller than an HTML table? It can't have that much overehead, right?
@jaseg @cato Not just ancient devices, but unless it's changed since I last looked, a lot of modern E-mail clients/groupware programs just render HTML E-mail badly for some reason.
Also, all the advantages of things like flexbox and grid really don't apply to QR codes.
Still, could've been an image...
The main problem with email clients is that they ignore <style> elements. You can apply inline CSS with style="…", but that's it.
Some email clients don't ignore <style> elements, mind you, but webmail in particular usually does. You don't want the email's styles to apply to the entire webmail user interface, after all.
These days, shadow DOM can be used to confine the effects of <style> to just the email, but Gmail doesn't do that for some reason.
Was it really necessary for you to remind me that Outlook exists? 😖
@wikiyu @ori @cato It's also about scaling.
pngs can theoretically be scaled lossless due to the sharp corners, but only if you scale linerarly. Which some devices don't do per default (because it looks bad in most cases).
And if you scale with a non-linear algo, you can get weird results:
And sending a larger png is just wasted bandwidth
@argv_minus_one sure. but it does not look nice and user might complain about a weird looking qr code.
and yes, I already had users open support tickets for exactly that
People complain about QR codes looking weird?! QR codes are for computers, not humans!
@csolisr Hmm, i have no access to a screenreader, but i'd assume, that some meta-data in the table should make it clear it's encoded data and not readable text.
But a good point.
@rawenwolf @cato "don't use HTML tables for layouts" is not actionable - what alternatives did they suggest for the problem like QR codes? Which of those are still supported by browsers with >1% market share, and which advantages&disadvantages do they have compared to plain old html tables in that kind of application?
context: I don't remember being taught html and I only wrote a few websites, so I genuinely don't know. I kinda overheard that phrase tho.
@brezelradar @cato
The "tables for site layout" thing is from waaaay back when CSS wasn't widely used so website creators used tables to create some form of layout. Nowadays you do this with CSS, hence why I was taught "don't use tables for layouts" since it was already long obsolete and super clumsy.
The QR code point would be moot since back then QR codes weren't used in any capacity yet. And I think even then they would be static images rather than formed from HTML elements.