Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG export - Safari - Prevent box appearing on rounded corners #2201

Merged
merged 4 commits into from Apr 20, 2022

Conversation

darrenburns
Copy link
Member

@darrenburns darrenburns commented Apr 19, 2022

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Closes #2171

Uses box-shadow in place of outline, since Safari has buggy outline support. Note that this doesn't fix the issue with the rotated background panel not showing on Safari, but at least the output no longer looks broken.

Before

Screenshot 2022-04-19 at 17 31 10

After

Screenshot 2022-04-19 at 17 31 28

Example with light theme

Screenshot 2022-04-19 at 17 32 10

@darrenburns darrenburns marked this pull request as ready for review April 19, 2022 16:44
@codecov-commenter
Copy link

Codecov Report

Merging #2201 (f7ea7ff) into master (7105781) will decrease coverage by 0.52%.
The diff coverage is 86.05%.

@@            Coverage Diff             @@
##           master    #2201      +/-   ##
==========================================
- Coverage   99.46%   98.94%   -0.53%     
==========================================
  Files          72       73       +1     
  Lines        7339     7606     +267     
==========================================
+ Hits         7300     7526     +226     
- Misses         39       80      +41     
Flag Coverage Δ
unittests 98.94% <86.05%> (-0.53%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
rich/__main__.py 100.00% <ø> (ø)
rich/layout.py 100.00% <ø> (ø)
rich/markup.py 100.00% <ø> (ø)
rich/progress.py 92.77% <78.85%> (-5.66%) ⬇️
rich/progress_bar.py 99.00% <85.71%> (-1.00%) ⬇️
rich/console.py 98.89% <96.62%> (-0.26%) ⬇️
rich/__init__.py 100.00% <100.00%> (ø)
rich/_export_format.py 100.00% <100.00%> (ø)
rich/_windows_renderer.py 100.00% <100.00%> (ø)
rich/control.py 100.00% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb56ec7...f7ea7ff. Read the comment docs.

Copy link
Contributor

@olivierphi olivierphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👌

@willmcgugan
Copy link
Collaborator

What an awful hack. Good work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] SVG gets surrounded in a black box
4 participants