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.