melink14/rikaikun

definitions centered on Weblio Jisho

ollkorrekt opened this issue ยท 6 comments

Describe the bug
On weblio jisho, the popup window now centers definitions (and all text), which makes it harder to quickly find the correct entry.

To Reproduce
Go to an entry on Weblio Jisho and hover over any Japanese word. In the rikaikun popup, the text will all be centered.

Expected behavior
On other websites I checked, it still works as expected: most of the text in the popup is left justified. I think it used to work this way on weblio too.

Screenshots
rikaibug

System details (OS, browser version, rikaikun version)
Rikaikun version 2.3.0.
Browser: Chromium; I found the issue in Vivaldi 5.1.2567.73, but verified that it also exists in Chrome 99.0.4844.84.
OS I am on is Windows 10.

Thanks for the report.

I was confused for a moment because it didn't repro on their english japanese dictionary which came up first in Google.
I can repro here: https://www.weblio.jp/content/%E9%BC%BB

In the last release, I actually wrote code to prevent the host site's styles from affecting rikaikun using shadow dom and all: revert but it's not working at all on preventing inheritence of these styles. (I guess I should have added explicit tests for that case!)

I can't find any information on why all: revert is not working though it does seem like all: initial does work which is very mysterious.

Either way, I will try to fix it this after work and push a new release!

@all-contributors please add @ollkorrekt for bug report.

@melink14

I've put up a pull request to add @ollkorrekt! ๐ŸŽ‰

https://css-tricks.com/what-does-revert-do-in-css/ is the first place I found that mentions revert allows inheritence...

The spec implies this though so it's probably right: https://drafts.csswg.org/css-cascade/#default

I opened an issue to update MDN to make it more clear since I must have read the page 100 times without realizing it.

I think the best thing to do now is explicitly reset the inheritable CSS properties since there's no solution to reset back to user agent defaults.

Thank you, and sorry for not giving a url. It seems to have the same issue on every single dictionary Weblio has except the English-Japanese one.

๐ŸŽ‰ This issue has been resolved in version 2.3.1 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€