Hacker News new | ask | show | jobs
by 5h 3835 days ago
This is the number 11 from the clock

    <div style="position: absolute; display: block; visibility: inherit; margin: 0px; padding: 0px; backface-visibility: hidden; box-sizing: border-box; transform-style: preserve-3d; overflow: hidden; outline: none; border: none; font-size: 28.44px; font-family: sans-serif; color: black; text-decoration: none; text-align: left; direction: ltr; line-height: 1.4em; white-space: nowrap; -webkit-font-smoothing: antialiased; cursor: default; transform: translate(50.834px, 12.5738px); -webkit-user-select: none; height: 39.816px; width: 32px;">11</div>
Nope, no css here.
1 comments

Oops I thought you meant within the HTML file itself.

CSS means "Cascading Stylesheets" Using the framework the developer does not have write CSS. What you pointed out is the "style" attribute. Obviously the engine has to use the "style" attribute to communicate to the browser about the positions and remaining computed style properties.

Your post said "What if we ditched CSS?" with zero other context.

The links do use CSS, and there are non css options available in most rendering engines for such things, e.g. canvas/svg.

Personally I see no advantage to using things like lay.js in the top linked example over SVG, and further feel that a lot of the hate driven towards CSS stems from misunderstanding or misuse. Not that it is perfect, far from it, but to proxy it behind another language can only ever add limitations.

Compass/SASS solve most of my shallow verbosity based gripes tbh.