Live data from Hacker News

Pure CSS Website

pure-css-site.netlify.app

71–80 of 103 posts

Re: Pure CSS Website

#72
Many browser like Firefox support the HTTP header (not HTML header) field for defining external style sheets. You could make a 0 byte HTML page by using this feature in the HTTP response header.

    Link: ; REL=stylesheet

Re: Pure CSS Website

#73

I built this website to see what was possible with only one div, and a stylesheet. No JS, No other HTML, just CSS. Source: https://github.com/archiewood/pure-css-site

Nice! I love seeing stuff like this on HN. Using a solid border for the cursor instead of having it in the text content is a nice touch; because it's separated out you could probably use another animation to get it blinking, too.

i was kind of messing around with this blinking idea but couldn't get it to render in a way I was happy with

would you use another keyframe or did you have something else in mind

Re: Pure CSS Website

#75
post #60

Earlier quoted context omitted.

I wasn't going to mention the invalid HTML. Thank you for doing it.

I thought we all agreed to ignore validity a while back when XHTML gave way to HTML5.

Indeed, the fact that HTML5 specified the exact way to turn any stream of bytes into a DOM means that "error" cases are really just academic/theoretical.

Re: Pure CSS Website

#76

And none of the text is selectable :(

Recent Firefox doesn't, but good old Opera 9 lets you select the text just fine. (On the other hand, no animation nor background, but maybe that's a reasonable tradeoff.)

Browser bug? Seems like it's debatable although the spec leans in the direction of generated content being selectable: https://stackoverflow.com/questions/24385171/is-it-possible-...

Re: Pure CSS Website

#79

I knew it would be a demonstration of the CSS "generated content" feature.

For reasons that are probably out of scope for CSS, I would really like to be able to do more with the CSS content property.

It's one broad class of problem really: many frameworks make changing the HTML they generate difficult or impossible. Inevitably you end up needing to inject a button or a hyperlinked image or something in a particular position, and you have to resort to Javascript to do something that isn't interactive and isn't a program, which feels like the wrong tool.

You could argue that both Javascript and CSS are the wrong tool for this use case, but CSS would be the more convenient wrong tool.

Post reply on HN