1
0
mirror of https://github.com/jenil/chota.git synced 2023-08-10 21:13:07 +03:00

🎛 use CSSO and autoprefixer

This commit is contained in:
Jenil Gogari 2017-11-15 17:14:48 -05:00
parent cb78c76b6e
commit 03679a932f
6 changed files with 457 additions and 359 deletions

772
dist/chota.css vendored
View File

@ -1,450 +1,546 @@
/*! chota.css | MIT License | github.com/jenil/chota */ /*! chota.css | MIT License | github.com/jenil/chota */
:root{ :root {
--primary-color:#1a9f60; --primary-color: #1a9f60;
--lightGrey-color:#d2d6dd; --lightGrey-color: #d2d6dd;
--grid-maxWidth:120rem; --grid-maxWidth: 120rem;
--grid-gutter:2rem; --grid-gutter: 2rem;
--font-family:-apple-system,BlinkMacSystemFont,Avenir,"Avenir Next","Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif; --font-family: -apple-system, BlinkMacSystemFont, Avenir, "Avenir Next", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
} }
*{ * {
box-sizing:border-box; box-sizing: border-box;
} }
html{ html {
font-size:62.5%; font-size: 62.5%;
line-height:1.15; line-height: 1.15;
-ms-text-size-adjust:100%; -ms-text-size-adjust: 100%;
-webkit-text-size-adjust:100%; -webkit-text-size-adjust: 100%;
} }
body{ body {
letter-spacing:.01em; letter-spacing: 0.01em;
line-height:1.6; line-height: 1.6;
font-size:1.6rem; font-size: 1.6rem;
font-weight:400; font-weight: 400;
font-family:Segoe UI,Helvetica Neue,san-serif; font-family: "Segoe UI", "Helvetica Neue", san-serif; /*fallback*/
font-family:var(--font-family); font-family: var(--font-family);
margin:0; margin: 0;
padding:0; padding: 0;
} }
h1,h2,h3,h4,h5,h6{ h1,
font-weight:500; h2,
margin:.35em 0 .7em; h3,
h4,
h5,
h6 {
font-weight: 500;
margin: 0.35em 0 0.7em 0;
} }
h1{ h1 {
font-size:2em; font-size: 2em;
} }
h2{ h2 {
font-size:1.75em; font-size: 1.75em;
} }
h3{ h3 {
font-size:1.5em; font-size: 1.5em;
} }
h4{ h4 {
font-size:1.25em; font-size: 1.25em;
} }
h5{ h5 {
font-size:1em; font-size: 1em;
} }
h6{ h6 {
font-size:.85em; font-size: 0.85em;
} }
a{ a {
color:var(--primary-color); color: var(--primary-color);
text-decoration:none; text-decoration: none;
} }
a:hover:not(.button){ a:hover:not(.button) {
opacity:.6; opacity: 0.6;
} }
p{ p {
margin-top:0; margin-top: 0;
} }
blockquote{ blockquote {
background-color:#f3f3f3; background-color: #f3f3f3;
padding:1.5rem 2rem; padding: 1.5rem 2rem;
border-left:3px solid var(--lightGrey-color); border-left: 3px solid var(--lightGrey-color);
} }
dl dt{ dl dt {
font-weight:700; font-weight: bold;
} }
hr{ hr {
background-color:var(--lightGrey-color); border: none;
height:1px; background-color: var(--lightGrey-color);
margin:1rem 0; height: 1px;
margin: 1rem 0;
} }
hr,table{ table {
border:none; width: 100%;
border: none;
border-collapse: collapse;
border-spacing: 0;
text-align: left;
} }
table{ td,
width:100%; th {
border-collapse:collapse; vertical-align: middle;
border-spacing:0; padding: 1.2rem 0.4rem;
text-align:left;
} }
td,th{ thead {
vertical-align:middle; border-bottom: 2px solid var(--lightGrey-color);
padding:1.2rem .4rem;
} }
thead{ tfoot {
border-bottom:2px solid var(--lightGrey-color); border-top: 2px solid var(--lightGrey-color);
} }
tfoot{ code,
border-top:2px solid var(--lightGrey-color); kbd,
pre,
samp,
tt {
font-family: monaco, "Consolas", "Lucida Console", monospace;
} }
code,kbd,pre,samp,tt{ code,
font-family:monaco,Consolas,Lucida Console,monospace; kbd {
padding: 0 0.4rem;
font-size: 90%;
white-space: pre-wrap;
border-radius: 4px;
color: #c62424;
padding: 0.2em 0.4em;
background-color: #f7f7f7;
} }
code,kbd{ pre {
padding:0 .4rem; background-color: #f7f7f7;
font-size:90%; font-size: 1em;
white-space:pre-wrap; padding: 1rem;
border-radius:4px; overflow-x: auto;
color:#c62424;
padding:.2em .4em;
} }
code,kbd,pre{ pre code {
background-color:#f7f7f7; background: none;
padding: 0;
} }
pre{ abbr[title] {
font-size:1em; border-bottom: none;
padding:1rem; text-decoration: underline;
overflow-x:auto; text-decoration: underline dotted;
} }
pre code{ img {
background:none; max-width: 100%;
padding:0;
} }
abbr[title]{ fieldset,
border-bottom:none; iframe {
text-decoration:underline; border: 1px solid var(--lightGrey-color);
text-decoration:underline dotted;
} }
img{ .container {
max-width:100%; max-width: var(--grid-maxWidth);
margin: 0 auto;
width: 96%;
padding: 0 calc(var(--grid-gutter) / 2);
} }
fieldset,iframe{ .row {
border:1px solid var(--lightGrey-color); display: -ms-flexbox;
display: flex;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
-ms-flex-pack: start;
justify-content: flex-start;
margin-left: calc(var(--grid-gutter) / -2);
margin-right: calc(var(--grid-gutter) / -2);
} }
.container{ .col {
max-width:var(--grid-maxWidth); -ms-flex: 1;
margin:0 auto; flex: 1;
width:96%;
padding:0 calc(var(--grid-gutter) / 2);
} }
.row{ .col,
display:flex; [class*=" col-"],
flex-flow:row wrap; [class^='col-'] {
justify-content:flex-start; margin: 0 calc(var(--grid-gutter) / 2) calc(var(--grid-gutter) / 2);
margin-left:calc(var(--grid-gutter) / -2);
margin-right:calc(var(--grid-gutter) / -2);
} }
.col{ .col-1 {
flex:1; -ms-flex: 0 0 calc((100% / (12/1)) - var(--grid-gutter));
flex: 0 0 calc((100% / (12/1)) - var(--grid-gutter));
max-width: calc((100% / (12/1)) - var(--grid-gutter));
} }
.col,[class*=" col-"],[class^=col-]{ .col-2 {
margin:0 calc(var(--grid-gutter) / 2) calc(var(--grid-gutter) / 2); -ms-flex: 0 0 calc((100% / (12/2)) - var(--grid-gutter));
flex: 0 0 calc((100% / (12/2)) - var(--grid-gutter));
max-width: calc((100% / (12/2)) - var(--grid-gutter));
} }
.col-1{ .col-3 {
flex:0 0 calc((100% / (12/1)) - var(--grid-gutter)); -ms-flex: 0 0 calc((100% / (12/3)) - var(--grid-gutter));
max-width:calc((100% / (12/1)) - var(--grid-gutter)); flex: 0 0 calc((100% / (12/3)) - var(--grid-gutter));
max-width: calc((100% / (12/3)) - var(--grid-gutter));
} }
.col-2{ .col-4 {
flex:0 0 calc((100% / (12/2)) - var(--grid-gutter)); -ms-flex: 0 0 calc((100% / (12/4)) - var(--grid-gutter));
max-width:calc((100% / (12/2)) - var(--grid-gutter)); flex: 0 0 calc((100% / (12/4)) - var(--grid-gutter));
max-width: calc((100% / (12/4)) - var(--grid-gutter));
} }
.col-3{ .col-5 {
flex:0 0 calc((100% / (12/3)) - var(--grid-gutter)); -ms-flex: 0 0 calc((100% / (12/5)) - var(--grid-gutter));
max-width:calc((100% / (12/3)) - var(--grid-gutter)); flex: 0 0 calc((100% / (12/5)) - var(--grid-gutter));
max-width: calc((100% / (12/5)) - var(--grid-gutter));
} }
.col-4{ .col-6 {
flex:0 0 calc((100% / (12/4)) - var(--grid-gutter)); -ms-flex: 0 0 calc((100% / (12/6)) - var(--grid-gutter));
max-width:calc((100% / (12/4)) - var(--grid-gutter)); flex: 0 0 calc((100% / (12/6)) - var(--grid-gutter));
max-width: calc((100% / (12/6)) - var(--grid-gutter));
} }
.col-5{ .col-7 {
flex:0 0 calc((100% / (12/5)) - var(--grid-gutter)); -ms-flex: 0 0 calc((100% / (12/7)) - var(--grid-gutter));
max-width:calc((100% / (12/5)) - var(--grid-gutter)); flex: 0 0 calc((100% / (12/7)) - var(--grid-gutter));
max-width: calc((100% / (12/7)) - var(--grid-gutter));
} }
.col-6{ .col-8 {
flex:0 0 calc((100% / (12/6)) - var(--grid-gutter)); -ms-flex: 0 0 calc((100% / (12/8)) - var(--grid-gutter));
max-width:calc((100% / (12/6)) - var(--grid-gutter)); flex: 0 0 calc((100% / (12/8)) - var(--grid-gutter));
max-width: calc((100% / (12/8)) - var(--grid-gutter));
} }
.col-7{ .col-9 {
flex:0 0 calc((100% / (12/7)) - var(--grid-gutter)); -ms-flex: 0 0 calc((100% / (12/9)) - var(--grid-gutter));
max-width:calc((100% / (12/7)) - var(--grid-gutter)); flex: 0 0 calc((100% / (12/9)) - var(--grid-gutter));
max-width: calc((100% / (12/9)) - var(--grid-gutter));
} }
.col-8{ .col-10 {
flex:0 0 calc((100% / (12/8)) - var(--grid-gutter)); -ms-flex: 0 0 calc((100% / (12/10)) - var(--grid-gutter));
max-width:calc((100% / (12/8)) - var(--grid-gutter)); flex: 0 0 calc((100% / (12/10)) - var(--grid-gutter));
max-width: calc((100% / (12/10)) - var(--grid-gutter));
} }
.col-9{ .col-11 {
flex:0 0 calc((100% / (12/9)) - var(--grid-gutter)); -ms-flex: 0 0 calc((100% / (12/11)) - var(--grid-gutter));
max-width:calc((100% / (12/9)) - var(--grid-gutter)); flex: 0 0 calc((100% / (12/11)) - var(--grid-gutter));
max-width: calc((100% / (12/11)) - var(--grid-gutter));
} }
.col-10{ .col-12 {
flex:0 0 calc((100% / (12/10)) - var(--grid-gutter)); -ms-flex: 0 0 calc((100% / (12/12)) - var(--grid-gutter));
max-width:calc((100% / (12/10)) - var(--grid-gutter)); flex: 0 0 calc((100% / (12/12)) - var(--grid-gutter));
max-width: calc((100% / (12/12)) - var(--grid-gutter));
} }
.col-11{ @media screen and (max-width: 768px) {
flex:0 0 calc((100% / (12/11)) - var(--grid-gutter)); .container {
max-width:calc((100% / (12/11)) - var(--grid-gutter)); width: 100%;
}
.col-12{
flex:0 0 calc((100% / (12/12)) - var(--grid-gutter));
max-width:calc((100% / (12/12)) - var(--grid-gutter));
}
@media screen and (max-width:768px){
.container{
width:100%;
} }
.col,[class*=" col-"],[class^=col-]{ .col,
flex:0 1 100%; [class*=" col-"],
max-width:100%; [class^='col-'] {
-ms-flex: 0 1 100%;
flex: 0 1 100%;
max-width: 100%;
} }
} }
fieldset{ fieldset {
padding:.5rem 2rem; padding: 0.5rem 2rem;
} }
legend{ legend {
text-transform:uppercase; text-transform: uppercase;
font-size:.8em; font-size: 0.8em;
letter-spacing:.1rem; letter-spacing: 0.1rem;
} }
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]),select,textarea,textarea[type=text]{ input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]),
font-family:inherit; select,
padding:.7rem 1rem; textarea,
border-radius:4px; textarea[type=text] {
border:1px solid var(--lightGrey-color); font-family: inherit;
font-size:1em; padding: 0.7rem 1rem;
transition:all .2s ease; border-radius: 4px;
display:block; border: 1px solid var(--lightGrey-color);
width:100%; font-size: 1em;
transition: all 0.2s ease;
display: block;
width: 100%;
} }
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]):hover,select:hover,textarea:hover,textarea[type=text]:hover{ input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]):hover,
border-color:#aaa; select:hover,
textarea:hover,
textarea[type=text]:hover {
border-color: #aaa;
} }
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]):focus,select:focus,textarea:focus,textarea[type=text]:focus{ input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]):focus,
outline:none; select:focus,
border-color:var(--primary-color); textarea:focus,
textarea[type=text]:focus {
outline: none;
border-color: var(--primary-color);
} }
select{ select {
-webkit-appearance:none; -webkit-appearance: none;
background:#fafafa no-repeat 100%; background: #fafafa no-repeat 100%;
background-size:1ex; background-size: 1ex;
background-origin:content-box; background-origin: content-box;
background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='40' fill='#555'><polygon points='0,0 60,0 30,40'/></svg>"); background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='40' fill='#555'><polygon points='0,0 60,0 30,40'/></svg>");
} }
[type=checkbox],[type=radio]{ [type="checkbox"],
width:1.6rem; [type="radio"] {
height:1.6rem; width: 1.6rem;
height: 1.6rem;
} }
.button,[type=button],[type=reset],[type=submit],button{ /* BUTTONS */
padding:1rem 2.5rem; .button,
color:#333; [type=button],
background:#e6e6e6; [type=reset],
border-radius:4px; [type=submit],
border:none; button {
font-size:1.5rem; padding: 1rem 2.5rem;
line-height:1; color: #333;
text-align:center; background: #e6e6e6;
transition:opacity .2s ease; border-radius: 4px;
text-decoration:none; border: none;
transform:scale(1); font-size: 1.5rem;
display:inline-block; line-height: 1;
text-align: center;
transition: opacity 0.2s ease;
text-decoration: none;
transform: scale(1);
display: inline-block;
} }
.button+.button{ .button + .button {
margin-left:1rem; margin-left: 1rem;
} }
.button:hover,[type=button]:hover,[type=reset]:hover,[type=submit]:hover,button:hover{ .button:hover,
opacity:.8; [type=button]:hover,
[type=reset]:hover,
[type=submit]:hover,
button:hover {
opacity: 0.8;
} }
.button:active,[type=button]:active,[type=reset]:active,[type=submit]:active,button:active{ .button:active,
transform:scale(.98); [type=button]:active,
[type=reset]:active,
[type=submit]:active,
button:active {
transform: scale(0.98);
} }
button[disabled],button[disabled]:hover,input[disabled],input[disabled]:hover{ input[disabled],
opacity:.4; button[disabled],
cursor:not-allowed; input[disabled]:hover,
button[disabled]:hover {
opacity: 0.4;
cursor: not-allowed;
} }
.button.primary,[type=submit]{ .button.primary,
color:#fff; [type=submit] {
background-color:#000; color: #fff;
background:var(--primary-color); background-color: #000;
background: var(--primary-color);
} }
.button.outline{ .button.outline {
background-color:transparent; background-color: transparent;
border:1px solid var(--lightGrey-color); border: 1px solid var(--lightGrey-color);
} }
.button.outline.primary{ .button.outline.primary {
border-color:var(--primary-color); border-color: var(--primary-color);
color:var(--primary-color); color: var(--primary-color);
} }
.button.clear{ .button.clear {
background-color:transparent; background-color: transparent;
border-color:transparent; border-color: transparent;
color:var(--primary-color); color: var(--primary-color);
} }
.nav{ .nav {
display:flex; display: -ms-flexbox;
min-height:5rem; display: flex;
align-items:stretch; min-height: 5rem;
-ms-flex-align: stretch;
align-items: stretch;
} }
.nav img{ .nav img {
max-height:3rem; max-height: 3rem;
} }
.nav>.container{ .nav>.container {
display:flex; display: -ms-flexbox;
display: flex;
} }
.nav-center,.nav-left,.nav-right{ .nav-center,
display:flex; .nav-left,
flex:1; .nav-right {
display: -ms-flexbox;
display: flex;
-ms-flex: 1;
flex: 1;
} }
.nav-left{ .nav-left {
justify-content:flex-start; -ms-flex-pack: start;
justify-content: flex-start;
} }
.nav-right{ .nav-right {
justify-content:flex-end; -ms-flex-pack: end;
justify-content: flex-end;
} }
.nav-center{ .nav-center {
justify-content:center; -ms-flex-pack: center;
justify-content: center;
} }
@media screen and (max-width:480px){ @media screen and (max-width: 480px) {
.nav,.nav>.container{ .nav,
flex-direction:column; .nav>.container {
-ms-flex-direction: column;
flex-direction: column;
} }
.nav-center,.nav-left,.nav-right{ .nav-center,
flex-wrap:wrap; .nav-left,
justify-content:center; .nav-right {
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-pack: center;
justify-content: center;
} }
} }
.nav .brand,.nav a{ .nav a,
text-decoration:none; .nav .brand {
display:flex; text-decoration: none;
align-items:center; display: -ms-flexbox;
padding:1rem 2rem; display: flex;
color:#555; -ms-flex-align: center;
align-items: center;
padding: 1rem 2rem;
color: #555;
} }
.nav .active:not(.button){ .nav .active:not(.button) {
color:#000; color: #000; /* fallback */
color:var(--primary-color); color: var(--primary-color);
} }
.nav .brand{ .nav .brand {
font-size:1.75em; font-size: 1.75em;
padding-top:0; padding-top: 0;
padding-bottom:0; padding-bottom: 0;
} }
.nav .button{ .nav .button {
margin:auto 1rem; margin: auto 1rem;
} }
.card{ .card {
padding:1rem 2rem; padding: 1rem 2rem;
border-radius:4px; border-radius: 4px;
box-shadow:0 0 2px rgba(0,0,0,.4); box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
} }
.card p:last-child{ .card p:last-child {
margin:0; margin: 0;
} }
.card header>*{ .card header > * {
margin-top:0; margin-top: 0;
margin-bottom:1rem; margin-bottom: 1rem;
} }
.tabs{ .tabs {
display:flex; display: -ms-flexbox;
display: flex;
} }
.tabs a{ .tabs a {
text-decoration:none; text-decoration: none;
} }
.tabs>a{ .tabs > a {
padding:1rem 2rem; padding: 1rem 2rem;
flex:0 1 auto; -ms-flex: 0 1 auto;
color:#555; flex: 0 1 auto;
border-bottom:2px solid var(--lightGrey-color); color: #555;
text-align:center; border-bottom: 2px solid var(--lightGrey-color);
text-align: center;
} }
.tabs>a.active,.tabs>a:hover{ .tabs > a.active,
opacity:1; .tabs > a:hover {
border-bottom:2px solid #555; opacity: 1;
border-bottom: 2px solid #555;
} }
.tabs>a.active{ .tabs > a.active {
border-color:var(--primary-color); border-color: var(--primary-color);
} }
.tabs.is-full a{ .tabs.is-full a {
flex:1; -ms-flex: 1;
flex: 1;
} }
.pull-right{ .pull-right {
float:right; float: right;
} }
.pull-left{ .pull-left {
float:left; float: left;
} }
.is-text-center{ .is-text-center {
text-align:center; text-align: center;
} }
.is-text-left{ .is-text-left {
text-align:left; text-align: left;
} }
.is-text-right{ .is-text-right {
text-align:right; text-align: right;
} }
.is-text-uppercase{ .is-text-uppercase {
text-transform:uppercase; text-transform: uppercase;
} }
.is-text-lowercase{ .is-text-lowercase {
text-transform:lowercase; text-transform: lowercase;
} }
.is-text-capitalize{ .is-text-capitalize {
text-transform:capitalize; text-transform: capitalize;
} }
.is-full-screen{ .is-full-screen {
width:100%; width: 100%;
min-height:100vh; min-height: 100vh;
} }
.is-full-width{ .is-full-width {
width:100%; width: 100%;
} }
.is-vertical-align{ .is-vertical-align {
display:flex; display: -ms-flexbox;
align-items:center; display: flex;
-ms-flex-align: center;
align-items: center;
} }
.is-center,.is-horizontal-align{ .is-horizontal-align {
display:flex; display: -ms-flexbox;
justify-content:center; display: flex;
-ms-flex-pack: center;
justify-content: center;
} }
.is-center{ .is-center {
align-items:center; display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: center;
justify-content: center;
} }
.is-right{ .is-right {
justify-content:flex-end; display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: end;
justify-content: flex-end;
} }
.is-left,.is-right{ .is-left {
display:flex; display: -ms-flexbox;
align-items:center; display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: start;
justify-content: flex-start;
} }
.is-left{ .is-fixed {
justify-content:flex-start; position: fixed;
width: 100%;
} }
.is-fixed{ .is-paddingless {
position:fixed; padding: 0 !important;
width:100%;
} }
.is-paddingless{ .is-marginless {
padding:0 !important; margin: 0 !important;
} }
.is-marginless{ .clearfix {
margin:0 !important; content: "";
display: table;
clear: both;
} }
.clearfix{ .is-hidden {
content:""; display: none !important;
display:table;
clear:both;
} }
.is-hidden{ @media screen and (max-width: 480px) {
display:none !important; .hide-phone {
} display: none;
@media screen and (max-width:480px){
.hide-phone{
display:none;
} }
} }
@media screen and (max-width:768px){ @media screen and (max-width: 768px) {
.hide-tablet{ .hide-tablet {
display:none; display: none;
} }
} }

3
dist/chota.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -4,19 +4,14 @@
"description": "A really small CSS framework", "description": "A really small CSS framework",
"main": "dist/chota.min.css", "main": "dist/chota.min.css",
"scripts": { "scripts": {
"start": "browser-sync start --server --directory --files '**/*.css' '**/*.html'", "start":
"build": "rm -r dist/ && yarn postcss && yarn postcss -- -x .min.css && yarn cssnano && yarn cssnano:min", "browser-sync start --server --directory --files '**/*.css' '**/*.html'",
"postcss": "postcss ./src/chota.css -u postcss-import -d dist/ --no-map", "build": "rm -r dist/ && yarn postcss && NODE_ENV=production yarn postcss -x .min.css",
"cssnano": "cssnano ./dist/chota.css ./dist/chota.css --no-calc --no-core", "postcss": "postcss ./src/chota.css -d dist/",
"cssnano:min": "cssnano ./dist/chota.min.css ./dist/chota.min.css --no-calc", "watch": "NODE_ENV=development yarn postcss -w",
"watch": "yarn postcss -- -u cssnano -x .min.css -w",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"keywords": [ "keywords": ["css", "minimal", "web"],
"css",
"minimal",
"web"
],
"author": "Jenil Gogari", "author": "Jenil Gogari",
"license": "MIT", "license": "MIT",
"homepage": "https://jenil.github.io/chota", "homepage": "https://jenil.github.io/chota",
@ -30,13 +25,9 @@
"devDependencies": { "devDependencies": {
"autoprefixer": "^6.7.7", "autoprefixer": "^6.7.7",
"browser-sync": "^2.18.8", "browser-sync": "^2.18.8",
"cssnano-cli": "^1.0.5", "postcss-cli": "^4.1.1",
"postcss-cli": "^3.0.0", "postcss-csso": "^3.0.0",
"postcss-import": "^9.1.0" "postcss-import": "^9.1.0"
}, },
"files": [ "files": ["src/", "dist/", "README.md"]
"src/",
"dist/",
"README.md"
]
} }

10
postcss.config.js Normal file
View File

@ -0,0 +1,10 @@
let plugins = [
require("postcss-import"),
require("autoprefixer")({ browsers: "last 2 versions" })
];
if (process.env.NODE_ENV == 'production') plugins.push(require("postcss-csso"))
module.exports = {
plugins
}

View File

@ -5,7 +5,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Components</title> <title>Components</title>
<link rel="stylesheet" href="../dist/chota.min.css"> <link rel="stylesheet" href="../dist/chota.css">
<style> <style>
.nav { .nav {
border: 1px solid red; border: 1px solid red;

View File

@ -5,7 +5,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Elements</title> <title>Elements</title>
<link rel="stylesheet" href="../dist/chota.min.css"> <link rel="stylesheet" href="../dist/chota.css">
</head> </head>
<body> <body>