Q:

CSS based LaTeX formatting?

I've done ab bit of web-searching and found nothing. Are there any attempts on using CSS for LaTeX formatting? For example:
body { font-family: Helvetica,Arial,sans-serif; }
section { font-size: 16pt; }
/* or: */
h1 { font-size: 16pt; }

I know that this approach is limited compared to the classic approach, but it could be a nice attempt. So are there any published papers or code pieces?
I'd like to write in the preamble of my LaTeX document: \usestylefile{foo.css} and have the text rendered as written in the given style file (and its linked style files).

A:

I'll take the comments as "there is no css-TeX yet".

A:

Not quite gentlemen. With the combination of markdown, KaTeX, and this (look at the witex example).
I think we're super close to realizing a CSS LaTeX.
Here's an example:

I start by writing my text in markdown (I usually find it simpler than LaTeX, plus, LaTeXian, my favorite app, is no longer supported on the mac).
The markdown is then generated into HTML using markdown-styles, something available via npm.
I add KaTeX/MathJax for equation rendering.

I know, I know, a lot of stuff like numbering equations, ToC etc aren't there yet. But even as a proof of concept for tiny college assignments and other things, this is pretty awesome. As an added bonus, you can modify the CSS to customize stuff pretty easily.

