Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Pure Digital CSS, Swiss Made, Clock. No JavaScript, No HTML

Except for the HTML



Your quote chopped off the asterisk after HTML. See "Unfrequently Asked Questions" for explanation of the asterisk:

view-source:https://www.quaxio.com/pure_css_digital_clock.css


> Your quote chopped off the asterisk after HTML

No, there was (and still is) no asterisk in the title of this post.


Ok, we've put a qualifier in the title above.


Except for the HTML

While technically correct is the best kind of correct, it's worth noting that the entirety of the HTML portion is:

   <link rel="stylesheet" href="pure_css_digital_clock.css">


Firefox doesn't even give me the option to view page source, only selection source. Doing that gives me this:

    <html><head><link rel="stylesheet"
    href="pure_css_digital_clock.css">
    </head><body></body></html>
The inspector works fine, but the inspector also does not present the HTML as it was sent, but rather the DOM that Firefox is rendering.

None of this is important, it's just fun to poke at these CSS demos a little and see how the browser acts.


I can still right click > view page source?


> Firefox doesn't even give me the option to view page source

Looks like they moved it into the Tools -> Web Developers menu. Ctrl+U still works too!


curl is your friend. (Or whatever its Windows equivalent is.)


Powershell added curl(ish) support. I think it’s just aliased to http-transport or something but the basic functions I expect seem to work.


You can also use curl.exe for something more similar to unix-y curl.


Right. For Firefox, I can even remove that line and set the stylesheet using a `Link:` header. Unfortunately, that feature isn't widely adopted by other browsers.


That doesn’t work for this stylesheet because it includes styles for the <link> element.


There’s a way to get other implicit nodes in Firefox...


Well, no, there's a bit more to it than that:

  <html>
   <head>
    <link rel="stylesheet" href="pure_css_digital_clock.css">
   </head>
   <body></body>
  </html>
Indeed the the CSS defines styles for the <body> element. So this whole thing would not be possible there was no HTML (or some structured document representation). See, the part about lack of HTML in the title is completely unnecessary.


This is the implied HTML DOM. The actual HTML file only contains the link element.


And if the client didn't insert the necessary HTML, the thing wouldn't render at all.


That's the HTML that your browser inserts. That HTML isn't present in the data served by the website.


But the CSS rules expect there to be a body element. Regardless of who/what inserted the HTML it's necessary.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: