Sekrab Garage

Dark pattern in css

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

CSSTip March 17, 21
Subscribe to Sekrab Parts newsletter.

This site over here:

https://www.loop54.com/blog/what-is-a-search-facet-what-is-a-search-filter

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;
}