focuslabllc / craft-cheat-sheet

A fast and customized set of instantly usable Field code samples.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Define ::selection property for code blocks

erikreagan opened this issue · comments

Looks like Prism sets a couple of properties for ::selection selectors but the browser (Chrome at least) reads that as removing the background color. So selecting text in code blocks looks like you aren't selecting text right now.

image

Let's define a color (or colors) for ::selection. We can just have one color or we can get fancy schmancy and have different colors for different prism tokens.

@alexsailer suggestions on color(s)? @andyfought I'm assigning to you to implement.

Can we try the yellow I used for the copy to clipboard tooltip?

@alexsailer sample of that:

image

I like the way that yellow looks. Should I do that? @erikreagan

@andyfought I already added that actually.
@alexsailer you good with it?

Yea I dig it

Cool. I'll close the issue since the code is already there then.