quuxplusone a day ago

The trick is `* {display:block;}`. Having learned that, I wondered whether https://secretgeek.github.io/html_wysiwyg/html.html used the same trick. So I opened up the page and Ctrl+F'ed for "display:". Nothing came up! Back to https://pranavg.me/ and Ctrl+F'ed for "display". Nothing came up!

Apparently, at least on Chrome, Ctrl+F will not find text inside a <style> block, no matter whether it's displayed or not.

Ctrl+F works even to find text inside the displayed <head> and <title> elements, but not inside the displayed <style> element. What could be the browser-writer's rationale for this? And are there any other HTML elements that "suppress searching" like this?

  • sltkr a day ago

    Curious.

    Interesting enough, document.body.innerText does contain the style sheet contents, so the browser does consider it visible text in some sense.

omoikane a day ago

> This page works on all browsers

But on Lynx, it's rendered as only a plain page without all the CSS style bits to make it quine.

  • _ache_ a day ago

    I suspect Lynx isn't very sophisticated because I just tried with curl and it works like a charm.

m-hodges a day ago

I appreciate how many GEB references are hitting HN lately :)