w3c / w3c/csswg-drafts

[css-images][css-values][css-gcpm] qrcode() for generating QR code images from URLs

Open
#6,544 19 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-gcpm-4 css-images-4 css-values-5
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

Generating QR code images from URLs is more and more common these days. It'd be nice if you could generate QR code images from CSS.

For example, you could generate QR codes for links in a print stylesheet:

@media print {
    ul.citations > li > a::after {
        background-image: qrcode(attr(href));
        ...
    }
}

Or you could generate a QR code for the document itself in a print stylesheet, so someone could find the online version of an article in print (see also #6546):

@media print {
    body {
        background-image: qrcode(url(...));
    }
}

Thought of this while reading a twitter thread between @jyasskin @dauwhe @tabatkins: https://twitter.com/jyasskin/status/1430586358658043909

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the proposed qrcode() examples and related issue #6546, then trace the CSS Images, CSS Values, and CSS GCPM specifications named in the title. Done would require an agreed design and corresponding specification text, but the issue does not identify files, tests, or a settled implementation approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.