NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
This Page Is a Quine (2021) (pranavg.me)
quuxplusone 5 hours 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 2 hours ago [-]
Curious.

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

tomhow 7 hours ago [-]
A similar post from 2019, discussed twice on HN:

This page is a truly naked, brutalist HTML quine (2019) - https://news.ycombinator.com/item?id=32968597 - Sept 2022 (44 comments)

Show HN: This page is a truly naked, brutalist HTML quine - https://news.ycombinator.com/item?id=20094866 - June 2019 (94 comments)

defaultcompany 7 hours ago [-]
Not from the same guy but here's a quine embedded in the github contribution chart:

https://github.com/mame?tab=overview&from=1970-12-01&to=1970...

omoikane 7 hours 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_ 4 hours ago [-]
I suspect Lynx isn't very sophisticated because I just tried with curl and it works like a charm.
ImJasonH 8 hours ago [-]
Similar to this, a long time ago I tried to make some CSS that rendered HTML as Markdown: https://gist.github.com/imjasonh/c00cdd7aece6945fb8ea
8 hours ago [-]
m-hodges 6 hours ago [-]
I appreciate how many GEB references are hitting HN lately :)
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 01:35:34 GMT+0000 (Coordinated Universal Time) with Vercel.