-
Notifications
You must be signed in to change notification settings - Fork 117
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
Allow clip-path
, background
, text-emphasis
styles in structured content
#556
Conversation
✔️ No visual differences introduced by this PR. View Playwright Report (note: open the "playwright-report" artifact) |
Out of curiosity, how are you currently achieving the circle background? |
Currently using a combination of If you know a better way, I'd be very interested to learn it. I've been struggling to find a clean way to implement this effect. I have a hunch that the best way would probably involve first-class support for SVG in Yomitan, but that might be overkill. |
How about before, in the issue you linked in the OP? |
The example in Yomitan's valid test dictionary ( Here's the style on the green 優 color: white;
background-color: green;
border-color: green;
border-style: solid;
border-radius: 100%;
border-width: 0.75px;
padding: 0.15em 0.15em 0.05em;
cursor: help; Regardless of the version, I can reproduce the error in all of them by setting the |
I'd like to add support for the text-emphasis style to this PR (see this issue), so I'm converting this to a draft PR for now. I'll have time to add it tomorrow. |
clip-path
and background
styles in structured contentclip-path
, background
, text-emphasis
styles in structured content
Introducing I assume the Content-Security-Policy of |
IMO we should never allow the CSP to load external resources. Anything that should need this can already be done in another way, for example, loading the image in the background page and creating a temp The closest thing that we presently do for this is audio play back from 3rd party sites, and this is obviously separate from what CSS can do. |
Just noting that |
I don't think Even if this ever does become a concern, it's easy to just detect unsafe CSS (i.e. using |
Haven't tested it with
|
I'd just chalk that up MDN having some incorrect info, or there's some legacy/rare browser case I'm not aware of, or i'm doing something wrong. Setting a property to Oh well ¯\_(ツ)_/¯ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to keep a mental note (or better, document) the importance of the Content Security Policy somewhere
The
clip-path
style will allow me to resolve this issue regarding fonts with weird line heights.The
background
style will allow me to to add some nice color gradients.This is almost exactly identical to my previous pull request. Hope these PRs aren't too troublesome.
Thanks!