Choice is important with stuff like highlighting

I’m making some demos for an article and I wanted one of those smooth gradients. It’s still not quite possible with standard CSS, so I used this trusty resource.

I generated my gradient (truly who here hand-writes them) and wanted to grab the background property only.

🚨 Strobe warning

I can’t select text as it’s constantly trying to select everything. It results in this horrible strobing.

It’s a bit annoying this because I’ve already got some CSS. I just wanted the background. It’s why on Piccalilli we do code samples like this.

I have lots of choice in selecting text exactly how I want

It’s a nice progressive enhancement and we’re not getting in the way of what the user actually wants to do. You wanna copy a bit of the code? You’ve got it. You want the whole thing? You’ve also got it, here’s a button, but hey, you can also select it all if you want. Whatever works for you.

Whatever works for you.


Back to blog