Skip to content
Open

Dev #11

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
## 包含的属性(class)
- width(.w-*)
- height(.h-*)
- padding(.p-* ,.pt-* ,.pr-* ,.pb-* ,.pl-*)
- margin(.m-* ,.mt-* ,.mr-* ,.mb-* ,.ml-*,)
- padding(.p-* ,.pt-* ,.pr-* ,.pb-* ,.pl-* ,plr-* ,ptb-*)
- margin(.m-* ,.mt-* ,.mr-* ,.mb-* ,.ml-* ,mlr-* ,mtb-*)
- boder-width(.bd-* ,.bdt-* ,.bdr-* ,.bdb-* ,.bdl-*)
- boder-style(.bd-solid,.bd-dashed,.bd-double)
- border-radius(.bd-r-*)
- border-radius(.radius-*)
- 百分比宽高1-100(w-p* ,h-p*)
- line-height(.lh-*)
- position(.pst-absl ,.pst-rlt ,.pst-fx)
Expand Down
2 changes: 1 addition & 1 deletion dist/bit-css.375.px.css

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions example/vue-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^7.0.0-0",
<<<<<<< HEAD
"glob-all": "^3.2.1",
"prettier": "^1.19.1",
"purgecss-webpack-plugin": "^2.3.0"
=======
"purgecss-webpack-plugin": "^2.3.0",
"prettier": "^1.19.1"
>>>>>>> 4e718c1930c03b29baa8d584b6c773489247552f
}
}
7 changes: 1 addition & 6 deletions example/vue-test/vue.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<<<<<<< HEAD

const PurgecssPlugin = require('purgecss-webpack-plugin')
const glob = require('glob-all')
const path = require('path')

=======
>>>>>>> 4e718c1930c03b29baa8d584b6c773489247552f
module.exports = {
css: {
loaderOptions: {
Expand All @@ -14,7 +12,6 @@ module.exports = {
}
}
}
<<<<<<< HEAD
},
configureWebpack: {
plugins: [
Expand All @@ -26,7 +23,5 @@ module.exports = {
])
})
]
=======
>>>>>>> 4e718c1930c03b29baa8d584b6c773489247552f
}
};
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bit-css",
"version": "1.0.1",
"version": "1.0.5",
"description": "bit-css",
"main": "src/index.less",
"scripts": {
Expand All @@ -15,8 +15,5 @@
"bugs": {
"url": "https://github.com/changgeee/bit-css/issues"
},
"homepage": "https://github.com/changgeee/bit-css#readme",
"publishConfig": {
"registry": "https://npm.pkg.github.com/@changgeee"
}
"homepage": "https://github.com/changgeee/bit-css#readme"
}
2 changes: 1 addition & 1 deletion src/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "./custom";
@import "./layout";
@import "./color";
@import "./color/index.less";
@import "./text";
16 changes: 15 additions & 1 deletion src/layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
}
}

.cont(@count, @attr, @prefix, @attr2) when (@count >= 0) {
.cont((@count - 1), @attr, @prefix, @attr2);

.@{prefix}-@{count} {
@{attr}: unit(@count, @unit);
@{attr2}: unit(@count, @unit);
}
}

// 百分比计算
.percent(@count, @attr, @prefix) when (@count > 0) {
.percent((@count - 1), @attr, @prefix);
Expand All @@ -29,13 +38,18 @@
.cont(@padding-range, padding-right, pr);
.cont(@padding-range, padding-bottom, pb);
.cont(@padding-range, padding-left, pl);
.cont(@padding-range, padding-left, plr, padding-right);
.cont(@padding-range, padding-top, ptb, padding-bottom);


// margin
.cont(@margin-range, margin, m);
.cont(@margin-range, margin-top, mt);
.cont(@margin-range, margin-right, mr);
.cont(@margin-range, margin-bottom, mb);
.cont(@margin-range, margin-left, ml);
.cont(@margin-range, margin-left, mlr, margin-right);
.cont(@margin-range, margin-top, mtb, margin-bottom);

// line-height
.cont(@line-height-range, line-height, lh);
Expand Down Expand Up @@ -69,7 +83,7 @@
}

// border-radius
.cont(@border-radius-range, border-radius, bd-r);
.cont(@border-radius-range, border-radius, radius);

// 垂直水平居中
.vh-parent {
Expand Down