Skip to content

Commit

Permalink
feat: 升级
Browse files Browse the repository at this point in the history
  • Loading branch information
27 committed May 23, 2021
1 parent 9ba1987 commit 35651a5
Show file tree
Hide file tree
Showing 28 changed files with 950 additions and 431 deletions.
57 changes: 34 additions & 23 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,43 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="../index.css">
<link rel="stylesheet" href="less.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
figure, blockquote, p, body {
margin: 0;
padding: 0;
}
</style>
<link rel="stylesheet" href="../index.css">
<link rel="stylesheet" href="less.css">
</head>
<body>
<figure class="bc_fff tac pt24 pb24 pl24 pr24">
<img class="w128 h128 br100% db mla mra mb24" src="./avatar.jpg" alt="avatar" width="128" height="128" />
<blockquote class="mb16 fs18 fw700 lh28">
<p>“Tailwind CSS is the only framework that I've seen scale on large teams. It’s easy to customize, adapts to any design, and the build size is tiny.”</p>
</blockquote>
<figcaption class="fs16 lh24 fw500">
<em class="db c_info fsn">Sarah Dayan</em>
<strong class="db c_s">Staff Engineer, Algolia</strong>
</figcaption>
</figure>
<hr>
<div class="pt16 pb16 pr16 pl16">
<div class="fs16 lh20 mb16 ellipsis">Life was like a box of chocolates. You never know what you're going to get.</div>
<div class="fs16 lh20 mb16 ellipsis-mul _2row">Life was like a box of chocolates. You never know what you're going to get. Life was like a box of chocolates. You never know what you're going to get.</div>
<div class="clearfix fs16 lh20">
<div class="fl mr16">float-left</div>
<div class="cell">Life was like a box of chocolates. You never know what you're going to get. Life was like a box of chocolates. You never know what you're going to get.</div>
<figure class="bc_fff tac pt24 pb24 pl24 pr24">
<img class="w128 h128 br100% db mla mra mb24" src="./avatar.jpg" alt="avatar" width="128" height="128"/>
<blockquote class="mb16 fs18 fw700 lh28">
<p>“Tailwind CSS is the only framework that I've seen scale on large teams. It’s easy to customize, adapts to any
design, and the build size is tiny.”</p>
</blockquote>
<figcaption class="fs16 lh24 fw500">
<em class="db c_info fsn">Sarah Dayan</em>
<strong class="db c_s">Staff Engineer, Algolia</strong>
</figcaption>
</figure>
<hr>
<div class="pt16 pb16 pr16 pl16">
<div class="fs16 lh20 mb16 ellipsis">Life was like a box of chocolates. You never know what you're going to get.</div>
<div class="fs16 lh20 mb16 ellipsis-mul _2row">Life was like a box of chocolates. You never know what you're going to
get. Life was like a box of chocolates. You never know what you're going to get.
</div>
<div class="clearfix fs16 lh20">
<div class="fl mr16">float-left</div>
<div class="cell">Life was like a box of chocolates. You never know what you're going to get. Life was like a box of
chocolates. You never know what you're going to get.
</div>
</div>
<div style="height: 500px"></div>
</div>
<div style="height: 500px"></div>
</body>
</html>
111 changes: 100 additions & 11 deletions demo/less.css
Original file line number Diff line number Diff line change
@@ -1,32 +1,122 @@
@charset "utf-8";
._aic{align-items:center}
._aife{align-items:flex-end}
._aifs{align-items:flex-start}
._b0{bottom:0}
._bct{background-color:transparent}
._bn{border:none}
._br0{border-radius:0}
._br100\%{border-radius:100%}
._bsbb{box-sizing:border-box}
._bc_fff{background-color:#fff}
._bc_000{background-color:#000}
._c_000{color:#000}
._c_fff{color:#fff}
._cb{clear:both}
._cp{cursor:pointer}
._db{display:block}
._df{display:flex}
._di{display:inline}
._dib{display:inline-block}
._dif{display:inline-flex}
._dn{display:none}
._dt{display:table}
._dtc{display:table-cell}
._f1{flex:1;min-width:0}
._fa{flex:auto}
._fdc{flex-direction:column}
._fdr{flex-direction:row}
._fi{font:inherit}
._fl{float:left}
._fr{float:right}
._fs0{font-size:0}
._fs1{flex-shrink:1}
._fsi{font-style:italic}
._fsn{font-style:normal}
._fvsc{font-variant:small-caps;text-transform:lowercase}
._fw100{font-weight:100}
._fw200{font-weight:200}
._fw300{font-weight:300}
._fw400{font-weight:400}
._fw500{font-weight:500}
._fw600{font-weight:600}
._fw700{font-weight:700}
._fw800{font-weight:800}
._fw900{font-weight:900}
._fwn{font-weight:400}
._fww{flex-wrap:wrap}
._h100\%{height:100%}
._jcc{justify-content:center}
._jcfe{justify-content:flex-end}
._jcsa{justify-content:space-around}
._jcsb{justify-content:space-between}
._l0{left:0}
._l100\%{left:100%}
._l50\%{left:50%}
._lh1{line-height:1}
._lh1\.2{line-height:1.2}
._lh1\.5{line-height:1.5}
._lh1\.8{line-height:1.8}
._lsn{list-style:none}
._m0{margin:0}
._mla{margin-left:auto}
._mra{margin-right:auto}
._mta{margin-top:auto}
._mba{margin-bottom:auto}
._o0{opacity:0}
._oa{overflow:auto;-webkit-overflow-scrolling:touch}
._oh{overflow:hidden}
._p0{padding:0}
._pa{position:absolute}
._pen{pointer-events:none}
._pf{position:fixed}
._pr{position:relative}
._pt100\%{padding-top:100%}
._r0{right:0}
._r100\%{right:100%}
._t0{top:0}
._t100\%{top:100%}
._t50\%{top:50%}
._mw100\%{max-width:100%}
._tac{text-align:center}
._taj{text-align:justify}
._tal{text-align:left}
._tar{text-align:right}
._tdn{text-decoration:none}
._tdu{text-decoration:underline}
._tlf{table-layout:fixed}
._ttc{text-transform:capitalize}
._ttl{text-transform:lowercase}
._ttn{text-transform:none}
._ttu{text-transform:uppercase}
._usn{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
._vam{vertical-align:middle}
._vat{vertical-align:top}
._vh{visibility:hidden}
._w100\%{width:100%}
._wan{-webkit-appearance:none}
._wsn{white-space:nowrap}
._wwbw{word-wrap:break-word;word-break:break-all}
._zi1{z-index:1}
.mt8{margin-top:8px}
.mt16{margin-top:16px}
.mt24{margin-top:24px}
.mr8{margin-right:8px}
.mr16{margin-right:16px}
.mr24{margin-right:24px}
.mb8{margin-bottom:8px}
.mb16{margin-bottom:16px}
.mb24{margin-bottom:24px}
.ml8{margin-left:8px}
.ml16{margin-left:16px}
.ml24{margin-left:24px}
.pt8{padding-top:8px}
.pt16{padding-top:16px}
.pt24{padding-top:24px}
.pr8{padding-right:8px}
.pr16{padding-right:16px}
.pr24{padding-right:24px}
.pb8{padding-bottom:8px}
.pb16{padding-bottom:16px}
.pb24{padding-bottom:24px}
.pl8{padding-left:8px}
.pl16{padding-left:16px}
.pl24{padding-left:24px}
.fs12{font-size:12px}
.fs16{font-size:16px}
.lh16{line-height:16px}
.lh20{line-height:20px}
.lh24{line-height:24px}
.clearfix:after{display:table;content:'';clear:both}
.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
Expand All @@ -35,5 +125,4 @@
.ellipsis-mul._2row{-webkit-line-clamp:2}
.c_m{color:#000}
.c_s{color:#71717a}
.c_info{color:#0891b2}
blockquote,body,figure,p{margin:0;padding:0}
.c_info{color:#0891b2}
66 changes: 48 additions & 18 deletions demo/less.less
Original file line number Diff line number Diff line change
@@ -1,26 +1,56 @@
@import '../mixin.less';
@import '../less/SACSS.less';
@import "../less/helpers";

//$prefix:'sacss_';
//#_SACSS($prefix);
@import '../less/WidthPrefix';

@prefix: '_';

#WidthPrefix(@prefix);
// margin
#SACSS(margin-top; mt; 8, 16; 1px); // .mt8, .mt16
#SACSS(margin-right; mr; 8, 16; 1px); // .mr8, .mr16
#SACSS(margin-bottom; mb; 8, 16; 1px); // .mb8, .mb16
#SACSS(margin-left; ml; 8, 16; 1px); // .ml8, .ml16

// padding
#SACSS(padding-top; pt; 8, 16; 1px); // .pt8, .pt16
#SACSS(padding-right; pr; 8, 16; 1px); // .pr8, .pr16
#SACSS(padding-bottom; pb; 8, 16; 1px); // .pb8, .pb16
#SACSS(padding-left; pl; 8, 16; 1px); // .pl8, .pl16

#Margins(8, 16, 24; 1px); // .mt8, .mr8, .mb8, .ml8, .mt16, .mr16, .mb16, .ml16;
#Paddings(8, 16, 24; 1px); // .pt8, .pr8, .pb8, .pl8, .pt16, .pr16, .pb16, .pl16;
#SACSS(font-size; fs; 12, 16; 1px); // .fs12, .fs16;
#SACSS(line-height; lh; 16, 20, 24; 1px); // .lh16, .lh20;
#SACSS(line-height; lh; 16, 24; 1px); // .lh16, .lh24;

// helpers
.clearfix {
#Clearfix;
}

.ellipsis {
#Ellipsis;
}

.clearfix{ #Clearfix; }
.ellipsis{ #Ellipsis; }
.cell{ #Cell; }
.ellipsis-mul{ #Ellipsis-multiple; }
.ellipsis-mul._2row{ -webkit-line-clamp: 2; }
.cell {
#Cell;
}

.ellipsis-mul {
#Ellipsis-multiple;
}

.c_m{ color: #000; }
.c_s{ color: #71717a; }
.c_info{ color:#0891b2; }
.ellipsis-mul._2row {
-webkit-line-clamp: 2;
}

// Color
.c_m {
color: #000;
}

.c_s {
color: #71717a;
}

// css reset for demo
figure, blockquote, p,body{
margin: 0;
padding: 0;
.c_info {
color: #0891b2;
}
Loading

0 comments on commit 35651a5

Please sign in to comment.