Today I Learned - Rocky Kev

TIL injecting links when the user wants to print thew ebpage

POSTED ON:

TAGS:

If the user prints the page (for some reason), links get injected into the print.
Super helpful!


@media print {
a[href^="http"]::after {
content: " (" attr(href) ")";
}
}

Via https://tomasz-smykowski.com/


Related TILs

Tagged:

TIL the alternate keyword

If 'alternate' appears along with the stylesheet keyword, the linked file is an alternative stylesheet. It won’t be applied to the document, but it will be ready for when we need it.

TIL Logical Properties

For that sweet sweet Internationalization you want to avoid directional words like 'left', 'right', 'top', and 'bottom'.

TIL Using pseudo-classes in your querySelector!

let notTuna = document.querySelectorAll('.sandwich:not(.tuna)')