This project is in the development stage.
Thanks for support and feedback!
A low-level and functional virtual CSS library with no CSS codes. More than 80 Utilities. Infinite Configurations. Introduction Artis is a tiny 1.4 kilobytes Virtual CSS javascript library inspired from Virtual DOM. Use the custom syntax in the component styling without actually writing the CSS code, and never increase your project file size by adding CSS codes.
Benefits No tree-shaking CSS classes No Extra CSS bundling No CSS blocking No CSS codes Fast render Getting Started bash $ npm i artis --save-dev
1
Playground The Playground is an online code editor, you can use it for testing or just playing around with Artis.js
on the go.
Launch Playground now!
Press F1 to open Palette menu to access advanced options. Press Reset button to delete data stored in the browser.
API Introduction Artis.js
offers a very minimum learning curve to use the library, set the design()
to true to enable CSS styling without writing CSS and no CSS payload. Up to 80+ different type of useful utilities and each utility has countless modifier that allows you to fine-tune the utility more precisely.
The Artis Syntax is look like below,
{utilityName}{:}{valueModifier}
1
Which is equilvalent to...
html < div class = " textSize:40 " ></ div >
1
js const style = " textSize:40 textColor:rgba(22,22,22,0.5) " ;
1
Let's craft something! Let's create 2 files below with Vanilla JS by using the native web component.
js // app.js
import { design } from " artis " ;
class MainComponent extends HTMLElement {
constructor () {
super () ;
}
connectedCallback () {
const style = `
p:20
m:20
textSize:50
bgColor:white
curveRadius:20
` ;
const tmpl = document . createElement ( " template " ) ;
tmpl . innerHTML = `
<div class=" ${ style } ">
Hello World!
</div>
` ;
this. appendChild ( tmpl . content . cloneNode ( true )) ;
window . onload = () => design ( true ) ; // init artis.js
}
}
customElements . define ( " main-component " , MainComponent) ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
html <!-- index.html -->
< body class = " m:0 p:0 textColor:black bgColor:white listStyle:none display:flex justifyContent:center alignItems:center " >
< main-component ></ main-component >
</ body >
1 2 3 4
Create a group of complex styled components and reuse them anywhere in the project.
js // Example #3
// style.js
export const reset = " m:0 p:0 listStyle:none textSize:16 textColor:black bgColor:white " ; // normalizer
export const center = " display:flex justifyContent:center alignItems:center " ;
export const centerCol = `${ center } flexDirection:column ` ;
export const centerRow = `${ center } flexDirection:row ` ;
export const paddingWide = " pt:60 pb:60 pl:20 pr:20 " ;
// app.js
import {
reset ,
center ,
centerCol ,
centerRow ,
paddingWide
} from " ./style " ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
That's all you need to learn to use Artis.js
. Simply minimalist.
API: Typography API: Backgrounds Utility DOM Style Objects Usage bgColor style.backgroundColor rgba(0,0,0,0) opacity style.opacity Opacity
API: Borders Utility DOM Style Objects Usage curveColor style.borderColor rgba(0,0,0,0) curveRadius style.borderRadius 0px curveStyle style.borderStyle Reference curveWidth style.borderWidth 0px
API: Sizing API: Spacing Utility DOM Style Objects Usage m style.margin 0px ml style.marginLeft 0px mr style.marginRight 0px mt style.marginTop 0px mb marginBottom 0px p style.padding 0px pl style.paddingLeft 0px pr style.paddingRight 0px pt style.paddingTop 0px pb style.paddingBottom 0px
API: Flex API: Interactivity API: Layouts API: Filters Utility DOM Style Objects Usage filter style.filter Filter
Utility DOM Style Objects Usage transform style.transform Reference
API: Transitions Utility DOM Style Objects Usage transition style.transition Reference
Thanks for reading.