Skip to main content

Styling

Openexus supports two styling options when working in JavaScript/TypeScript: Tailwind and imported CSS/SCSS/SASS/LESS.

Tailwind Styling

Tailwind is supported out of the box. Most Tailwind classes are supported and enabled on all frameworks.

For more information on tailwind, please visit: https://tailwindcss.com/

Tailwind Example

<div class='p-4 bg-blue-200'>Hello World!</div>

Imported CSS Styling

CSS files can also be imported in the Node file structure. In addition to supporting CSS, Openexus also support SCSS, SASS, and LESS formatting.

 

src/styles.css
button {
font: 100% Helvetica, sans-serif;
background: #ff9900;
}
src/main.js
import "./styles.css";

function render(element) {
const node = document.createElement('button');
node.innerHTML = 'Click me!';
element.appendChild(node);
}

context.set('view', render);