From 727035a2dc418b790a6724a4c627898af6b7fae4 Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Wed, 28 Jul 2021 08:09:20 -0500 Subject: [PATCH] Fix form_post CSS styling in Firefox and Safari. This functioned fine, but did not have the intended visual appearance when it came to how the text of the auth code wrapped inside the copy button in the manual flow. The new styling behaves correctly on at least Chrome, Firefox, and Safari on macOS. Signed-off-by: Matt Moyer --- internal/oidc/provider/formposthtml/form_post.css | 8 ++++---- internal/oidc/provider/formposthtml/formposthtml_test.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/oidc/provider/formposthtml/form_post.css b/internal/oidc/provider/formposthtml/form_post.css index c65c2fc7..e272f13d 100644 --- a/internal/oidc/provider/formposthtml/form_post.css +++ b/internal/oidc/provider/formposthtml/form_post.css @@ -44,9 +44,9 @@ button:active { } code { + display: block; word-wrap: break-word; - hyphens: auto; - hyphenate-character: ''; + word-break: break-all; font-size: 12px; font-family: monospace; color: #333; @@ -56,8 +56,8 @@ code { float: left; width: 36px; height: 36px; - padding-top: 2px; - padding-right: 10px; + margin-top: -3px; + margin-right: 10px; background-size: contain; background-repeat: no-repeat; /* diff --git a/internal/oidc/provider/formposthtml/formposthtml_test.go b/internal/oidc/provider/formposthtml/formposthtml_test.go index a8a1a929..f9929e71 100644 --- a/internal/oidc/provider/formposthtml/formposthtml_test.go +++ b/internal/oidc/provider/formposthtml/formposthtml_test.go @@ -29,7 +29,7 @@ var ( - + @@ -62,7 +62,7 @@ var ( // Our browser-based integration tests should find any incompatibilities. testExpectedCSP = `default-src 'none'; ` + `script-src 'sha256-U+tKnJ2oMSYKSxmSX3V2mPBN8xdr9JpampKAhbSo108='; ` + - `style-src 'sha256-TLAQE3UR2KpwP7AzMCE4iPDizh7zLPx9UXeK5ntuoRg='; ` + + `style-src 'sha256-CtfkX7m8x2UdGYvGgDq+6b6yIAQsASW9pbQK+sG8fNA='; ` + `img-src data:; ` + `connect-src *; ` + `frame-ancestors 'none'`