cjss-group / CJSS

A CSS based web framework
https://cjss.js.org/
MIT License
670 stars 20 forks source link

What about SCJSS? #53

Open KargJonas opened 5 years ago

KargJonas commented 5 years ago

I have a dream.. Imagine using SCSS to generate markdown and simultaniously apply styles/scripts to it:

div.root {
  padding: 5px;
  margin: 5px;
  border: 1px solid #000;

  h1 {
    innerHTML: "Welcome to SCJSS!";
    color: red;

    &:hover {
      script: js(console.log("You hovered over me!"));
    }
  }

  h3 {
    innerHTML: "Subtitle!";
  }
}

That ⬆️ turns into this ⬇️ :

<div class="root">
  <h1>
    Welcome to SCJSS!;
  </h1>

  <h3>
    Subtitle!
  </h3>
</div>

(Plus the corresponding CSS and JS)