5 ms·
From the example: .html { .head { .title { text: A simple Hello World example; }; }; .body {
by Eikon 5y ago
From the example:
.html {
.head {
.title {
text: A simple Hello World example;
};
};
.body {
.div {
text: Hello world;
};
};
};
Seems pretty awful to me...
- diggan 5y agoIn Clojure (hiccup), the idea is similar (lists for HTML) but with a nicer syntax. Comparing it, how does this seem as an alternative? [:html [:head [:title "A simple Hello world example"]] [:body [:div "Hello World"]]] It's simply lists inside lists, with keywords (:html) being converted to HTML elements, and second (and the rest) item/s being children of whatever came as the first keyword in the list.
- FractalHQ 5y agoWhile I think this is a step in the right direction to address the ugly and verbose nature of HTML, Pug in a .svelte file is by far the nicest way to write html I’ve experienced.