A minimal and classful Public CSS toolkit. it helps you build pages easily
💡 find the classless one.
- Install
npm install pub.css
- For Less
@import "~pub.css/less/index.less";
- For Scss
@import "~pub.css/scss/index.scss";
- css bundle
@import "~pub.css/css/index.css";
- main.js
import "pub.css/css/index.css";
- docker start a service
docker run --name some-pubcss -d -p 8012:80 hzsq/pub.css
proxy localhost:8012
as /pubcss
<link rel="stylesheet" type="text/css" href="/pubcss/css/index.css" />
- CDN
<link
rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/npm/pub.css/css/index.css"
/>
or
<link
rel="stylesheet"
type="text/css"
href="https://unpkg.com/pub.css/css/index.css"
/>
prefix | short for |
---|---|
.c{value} |
c olor |
.bgc{value} |
b ackg round c olor |
.w{num} |
w idth |
.h{num} |
h eight |
.sq{num} |
sq uare ( width & height ) |
.wp{num} |
w idth p ercentage |
.hp{num} |
h eight p ercentage |
.fz{num} |
f ont s ize |
.fw{num} |
f ont w eight |
.m{num} |
m argin |
.p{num} |
p adding |
.ml{num} |
m argin l eft |
.px{num} |
p adding horizontal ( x axis) |
.my{num} |
m argin vertical ( y axis) |