Open Bug 1475773 Opened Last year Updated 6 months ago

implement the ::inactive-selection pseudo-element

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox63 --- affected

People

(Reporter: zjz, Unassigned)

References

(Blocks 1 open bug)

Details

There's no way to tell if a selection is active or inactive from CSS if the developer customises the selection style with ::selection. So it's highly unlikely to see the new pseudo-element dropped from final standards, though it's currently in the working draft stage.

I think it's ready to implement the ::inactive-selection pseudo-element now.
Blocks: css-pseudo-4
I think you can do :-moz-window-inactive::selection, right?

But yeah if there's a spec for this it should be easy to implement.
Thank you for the information.

However, it doesn't mean exactly the same thing, :-moz-window-inactive means the whole window(i.e. the browser) of the applied element loses the focus, that means div:-moz-window-inactive only takes effects when the whole browser(not just the <div>) loses its focus, while ::inactive-selection take effects when you just focus on any other element.

BTW, I find that div:-moz-window-inactive::-moz-selection doesn't work, so is it also a bug?
To carify my previous comment, "any other element" in the above means:

an element outside of a document window but inside the browser, for example, the URL bar in the browser.
Priority: -- → P3
Blocks: 1479760
You need to log in before you can comment on or make changes to this bug.