From 5d935e0332de7913b280570aff8156e5f9f84a8d Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Tue, 19 Apr 2022 17:39:19 +0100 Subject: [PATCH 1/2] Use box-shadow instead of outline for Safari support --- rich/_export_format.py | 2 +- tests/test_console.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rich/_export_format.py b/rich/_export_format.py index f9217b2a2..d67fc81a3 100644 --- a/rich/_export_format.py +++ b/rich/_export_format.py @@ -69,7 +69,7 @@ align-items: center; background-color: {theme_background_color}; border-radius: 14px; - outline: 1px solid #484848; + box-shadow: 0 0 0 1px #484848; }} .{classes_prefix}-terminal:after {{ position: absolute; diff --git a/tests/test_console.py b/tests/test_console.py index 3305202bd..b0cdfe5be 100644 --- a/tests/test_console.py +++ b/tests/test_console.py @@ -543,7 +543,7 @@ def test_export_html_inline(): align-items: center; background-color: #0c0c0c; border-radius: 14px; - outline: 1px solid #484848; + box-shadow: 0 0 0 1px #484848; } .rich-svg-${SVG_HASH}-terminal:after { position: absolute; From f7ea7fffbbc63ae505bd87a406f7cb584c2341cc Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Tue, 19 Apr 2022 17:42:40 +0100 Subject: [PATCH 2/2] Update changelog re Safari SVG export square corner bug --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e66cb4e19..86b56e44f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fall back to `sys.__stderr__` on POSIX systems when trying to get the terminal size (fix issues when Rich is piped to another process) - Fixed markup escaping issue https://github.com/Textualize/rich/issues/2187 +- Safari - Box appearing around SVG export https://github.com/Textualize/rich/pull/2201 ## [12.2.0] - 2022-04-05