Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since we have both mouse and keyboard interactions for selecting starting in text and expanding into selecting blocks at the block level, we tried using the CSS 2.1
Highlight
variable so the operating system highlight color would be used. Sadly, this variable isn't uniformly implemented across platforms. It seems that on Firefox, you have to add your own translucency to the mix — the color is still probably right, but the light blue color we'e used to is actually that blue color shown at .3 opacity.Now we can look at hacks to make that work, but it's probably a futile game. This PR takes a different approach. There's a new color, $blue-medium-highlight, which has almost the exact same saturation and lightness that the operating system light blue color has, but with a hue that's the same as the other WordPress medium blue colors. This is combined with using the
::selection
and::-moz-selection
CSS properties to change the selection color, and the two match in that way. For browsers that don't support those properties, text selection will just be the same color of the operating system.This issue was discovered here: #3068 (comment)
GIFs, Chrome:
Firefox: