What is the purpose of the .stretched-link::after CSS style?

Tom Hughes tom at compton.nu
Sun Dec 31 13:05:38 UTC 2023


It's not actually our code, it's part of bootstrap that we
are using and yes the entire purpose is to make the element
clickable so in a sense it is a sort of clickjacking, just
one that is a deliberate design choice.

You can see more about how it works in the bootstrap doco:

https://getbootstrap.com/docs/4.3/utilities/stretched-link/

Tom

On 31/12/2023 10:40, Alain Knaff wrote:
> Hi,
> 
> I hope this is the right place to report issues with the Openstreetmap
> Web site, including CSS.
> 
> If not, please point me to the right place.
> 
> Now to the problem: while trying to find out the exact
> latitude/longitude coordinates of a building, I searched it on
> openstreetmap, and then did rightclick->displayAddress
> 
> It did display the coordinates all right, on top of the address.
> 
> However, I could not select them for pasting.
> 
> After popping up Firefox' CSS inspector, I noticed the following CSS:
> 
> .stretched-link::after {
>   position:absolute;
>   top:0;
>   right:0;
>   bottom:0;
>   left:0;
>   z-index:1;
>   content:""
> }
> in line 6841 of
> https://www.openstreetmap.org/assets/screen-ltr-d45e4e42c8ecf263e361e5307c720ac021606e889f685a9099bba86827e383e2.css
> 
> At first sight, the only thing this does is to cover the coordinates
> with an empty div, thus making it impossible to interact with them. On
> the face of it, this looks like malicious mischief (clickjacking) or is
> there any legitimate purpose to this?
> 
> Thanks,
> 
> Alain
> 
> _______________________________________________
> rails-dev mailing list
> rails-dev at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/rails-dev

-- 
Tom Hughes (tom at compton.nu)
http://compton.nu/




More information about the rails-dev mailing list