focuslabllc / craft-cheat-sheet

A fast and customized set of instantly usable Field code samples.
MIT License
210 stars 9 forks source link

Define ::selection property for code blocks #15

Closed erikreagan closed 9 years ago

erikreagan commented 9 years ago

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.

alexsailer commented 9 years ago

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

erikreagan commented 9 years ago

@alexsailer sample of that:

image

andyfought commented 9 years ago

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

erikreagan commented 9 years ago

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

alexsailer commented 9 years ago

Yea I dig it

erikreagan commented 9 years ago

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