Skip to content

Commit b638998

Browse files
authored
Merge pull request #2456 from nqst/qr-code-in-dark-mode
Improve QR code appearance in dark mode
2 parents 95114b1 + cfb3109 commit b638998

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
@layer components {
22
.qr-code {
33
aspect-ratio: 1;
4-
block-size: 50dvh;
4+
border-radius: 1ch;
5+
inline-size: clamp(20ch, 50dvh, 70ch);
6+
margin-block: var(--block-space);
57
}
68
}

app/controllers/qr_codes_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def show
66

77
qr_code_svg = RQRCode::QRCode
88
.new(QrCodeLink.from_signed(params[:id]).url)
9-
.as_svg(viewbox: true, fill: :white, color: :black)
9+
.as_svg(viewbox: true, fill: :white, color: :black, offset: 16)
1010

1111
render svg: qr_code_svg
1212
end

0 commit comments

Comments
 (0)