vuepress-theme-hope / vuepress-theme-hope

A vuepress theme with tons of features✨
https://theme-hope.vuejs.press
MIT License
1.99k stars 707 forks source link

[Bug] tasklist 前面的 ✅ 无法在 Firefox 中显示 #3259

Closed ben-yip closed 7 months ago

ben-yip commented 1 year ago

Checklist

Package name

vuepress-theme-hope

Which operating system are you using?

Describe the bug

从规范来看,<input> 实际上并不支持 ::before::after。Chrome 支持应该只是一个 bug。在 Firefox 中就无效。因此在 Firefox 中并不能显示用伪元素构造的 ✅。要不换个方式实现一下?

Additional context

No response

Mister-Hope commented 1 year ago

从规范来看, 实际上并不支持 ::before 和 ::after

Any provement for what you are talking?

Mister-Hope commented 1 year ago

I've searched these, but none of them have any description:

I only agree pseudo-elements that can not be used on replaced elements, and ONLY input[type=image] is one of them.

Here is detail about them:

image

Where DID you find and spec about input[type=checkbox] can not have ::before and ::after?

Mister-Hope commented 1 year ago

I hope there are some real stuffs in your next reply, or you just waste me 15 minutes.

ben-yip commented 1 year ago

Put aside those specs, the task-list syntax in md-enhance plugin is just not rendered as expected in Firefox.

https://theme-hope.vuejs.press/guide/markdown/tasklist.html#demo

Firefox:

image

Chrome: chrome

Mister-Hope commented 1 year ago

Please look carefully In your screen shot the marker is rendered as expected just with thewrong size

Mister-Hope commented 1 year ago

We just need to figure out why firefox choose to render the ::before element in the marker itself. This should be a bug with firefox and I personally refuse to give any fixes for a browser bug. But discussion about why this issue is happening is welcome in this thread

github-actions[bot] commented 1 year ago

This issue is marked as stale because it has not had recent activity. Issues marked with stale will be closed if they have no activity within 3 days.

Mister-Hope commented 8 months ago

Does this issue still exist in latest firefox?

ben-yip commented 8 months ago

Does this issue still exist in latest firefox?

Not fixed yet.

Still, latest Firefox(119.0) is not rendering :before and :after of <input>s. While checkbox type input now shows a tick by browser user agent default, which greyed out as disabled(see screenshot below), not that overlying customized ✅ with accent color by the theme.

Snipaste_2023-11-01_13-44-20

Mister-Hope commented 8 months ago

The workaround should at least showing a correct result, firefox does not allow to customize checkbox colors through css

Mister-Hope commented 7 months ago

Close as we have a valid work around while firefox doesn'thave any plan to fix this.