Sekrab Garage

Dark pattern in css

How to make the user think selecting text is not possible using only css

CSSTip March 17, 21

This site over here:

Uses what I call a dark pattern of the web, making users think they cannot select text. Truth is, it is only a css trick that changes the style of the selection. Users should be allowed to copy text from web. If it is public, it is for the public.

::selection {
    background: #f5f8fb;
    text-shadow: none;