Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 2daaf26

Browse files
committed
fix typography
1 parent aa8c77e commit 2daaf26

File tree

6 files changed

+35
-39
lines changed

6 files changed

+35
-39
lines changed

examples/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "svelte-flat-docs",
3-
"version": "0.1.0",
3+
"version": "0.1.3",
44
"description": "Documentation for svelte-flat",
55
"main": "src/index.js",
66
"scripts": {
@@ -34,7 +34,7 @@
3434
"extract-text-webpack-plugin": "^2.0.0-beta.4",
3535
"file-loader": "^0.9.0",
3636
"html-loader": "^0.4.4",
37-
"html-webpack-plugin": "^2.25.0",
37+
"html-webpack-plugin": "^2.26.0",
3838
"markdown-loader": "^0.1.7",
3939
"postcss-cssnext": "^2.9.0",
4040
"postcss-import": "^9.0.0",
@@ -43,6 +43,6 @@
4343
"style-loader": "^0.13.1",
4444
"webpack": "^2.2.0-rc.3",
4545
"webpack-dev-middleware": "^1.9.0",
46-
"webpack-hot-middleware": "^2.14.0"
46+
"webpack-hot-middleware": "^2.15.0"
4747
}
4848
}

examples/src/router/Home/examples.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,25 @@ import 'svelte-flat/lib/theme-default/button.css'
2222
```
2323

2424
### 按需引入
25-
如果你使用babel的话,可以安装[`babel-plugin-component`](https://github.com/QingWei-Li/babel-plugin-component)插件自动按需引入组件。
25+
如果你使用babel的话,可以安装[`babel-plugin-svelteflat`](https://github.com/jikkai/babel-plugin-svelteflat)插件自动按需引入组件。
2626

2727
#### 安装依赖
2828
```bash
29-
yarn add babel-plugin-component --dev
29+
yarn add babel-plugin-svelteflat --dev
3030
```
3131

3232
#### 配置及使用
33-
`.babelrc`中配置:
33+
`.babelrc`中按下例配置,`typoCss`是一个可选项,默认为`true`,用于选择是否使用默认的`typo.css`重设浏览器样式。
3434
```json
3535
{
3636
"plugins": [
37-
["component", [{
38-
"libraryName": "svelte-flat",
39-
"styleLibraryName": "theme-default"
40-
}]]
37+
["svelteflat", [
38+
{
39+
"libraryName": "svelte-flat",
40+
"styleLibraryName": "theme-default",
41+
"typoCss": true
42+
}
43+
]]
4144
]
4245
}
4346
```

examples/src/router/Typography/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class TypographyRouter extends React.Component {
1010
<div className="examples-router examples-router-typography">
1111
<h2>Typography 排版</h2>
1212

13+
<p>基于<code>typo.css</code>的排版系统。</p>
14+
1315
<section className="examples">
1416
<div>
1517
<label>Header 1</label>

examples/yarn.lock

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -930,9 +930,9 @@ block-stream@*:
930930
dependencies:
931931
inherits "~2.0.0"
932932

933-
bluebird@^3.4.6:
934-
version "3.4.6"
935-
resolved "http://registry.npm.taobao.org/bluebird/download/bluebird-3.4.6.tgz#01da8d821d87813d158967e743d5fe6c62cf8c0f"
933+
bluebird@^3.4.7:
934+
version "3.4.7"
935+
resolved "http://registry.npm.taobao.org/bluebird/download/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3"
936936

937937
bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0:
938938
version "4.11.6"
@@ -2316,7 +2316,7 @@ html-loader@^0.4.4:
23162316
loader-utils "^0.2.15"
23172317
object-assign "^4.1.0"
23182318

2319-
html-minifier@^3.0.1, html-minifier@^3.1.0:
2319+
html-minifier@^3.0.1, html-minifier@^3.2.3:
23202320
version "3.2.3"
23212321
resolved "http://registry.npm.taobao.org/html-minifier/download/html-minifier-3.2.3.tgz#d2ff536e24d95726c332493d8f77d84dbed85372"
23222322
dependencies:
@@ -2329,14 +2329,14 @@ html-minifier@^3.0.1, html-minifier@^3.1.0:
23292329
relateurl "0.2.x"
23302330
uglify-js "2.7.x"
23312331

2332-
html-webpack-plugin@^2.25.0:
2333-
version "2.25.0"
2334-
resolved "http://registry.npm.taobao.org/html-webpack-plugin/download/html-webpack-plugin-2.25.0.tgz#945c860c9bf413d725a09f773d09cfeca72e8f8a"
2332+
html-webpack-plugin@^2.26.0:
2333+
version "2.26.0"
2334+
resolved "http://registry.npm.taobao.org/html-webpack-plugin/download/html-webpack-plugin-2.26.0.tgz#ba97c8a66f912b85df80d2aeea65966c8bd9249e"
23352335
dependencies:
2336-
bluebird "^3.4.6"
2337-
html-minifier "^3.1.0"
2336+
bluebird "^3.4.7"
2337+
html-minifier "^3.2.3"
23382338
loader-utils "^0.2.16"
2339-
lodash "^4.16.4"
2339+
lodash "^4.17.3"
23402340
pretty-error "^2.0.2"
23412341
toposort "^1.0.0"
23422342

@@ -2791,10 +2791,14 @@ lodash.uniq@^4.3.0:
27912791
version "4.5.0"
27922792
resolved "http://registry.npm.taobao.org/lodash.uniq/download/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
27932793

2794-
lodash@^4.0.0, lodash@^4.14.0, lodash@^4.16.4, lodash@^4.2.0, lodash@^4.3.0:
2794+
lodash@^4.0.0, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.3.0:
27952795
version "4.17.2"
27962796
resolved "http://registry.npm.taobao.org/lodash/download/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42"
27972797

2798+
lodash@^4.17.3:
2799+
version "4.17.4"
2800+
resolved "http://registry.npm.taobao.org/lodash/download/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
2801+
27982802
longest@^1.0.1:
27992803
version "1.0.1"
28002804
resolved "http://registry.npm.taobao.org/longest/download/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
@@ -4670,9 +4674,9 @@ webpack-dev-middleware@^1.9.0:
46704674
path-is-absolute "^1.0.0"
46714675
range-parser "^1.0.3"
46724676

4673-
webpack-hot-middleware@^2.14.0:
4674-
version "2.14.0"
4675-
resolved "http://registry.npm.taobao.org/webpack-hot-middleware/download/webpack-hot-middleware-2.14.0.tgz#64bb8cf056ba84c699d148840ae77e54179abb6d"
4677+
webpack-hot-middleware@^2.15.0:
4678+
version "2.15.0"
4679+
resolved "http://registry.npm.taobao.org/webpack-hot-middleware/download/webpack-hot-middleware-2.15.0.tgz#71995af7c0025f109df482f86f1e10379526d026"
46764680
dependencies:
46774681
ansi-html "0.0.6"
46784682
html-entities "^1.2.0"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "svelte-flat",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "Flat UI Components with SvelteJS",
55
"main": "lib/index.js",
66
"author": "Jikkai Xiao <[email protected]>",

packages/theme-default/src/base.css

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@ main {
88

99
/* 修改typo.css的默认字体 */
1010
body, button, input, select, textarea {
11-
font-weight: 400;
12-
font-family: Helvetica Neue, Helvetica, Arial, Han Heiti, sans-serif;
11+
font-weight: inherit;
1312
}
1413

1514
h1, h2, h3, h4, h5, h6 {
16-
font-family: PingFang SC, Verdana, Helvetica Neue, Microsoft Yahei, Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans-serif;
17-
font-weight: bold;
1815
color: inherit;
1916
}
2017

@@ -26,16 +23,6 @@ h1, h2, h3, h4, h5, h6 {
2623
line-height: 1.1;
2724
}
2825

29-
h1, h2, h3 {
30-
margin-top: 20px;
31-
margin-bottom: 10px;
32-
}
33-
34-
h4, h5, h6 {
35-
margin-top: 10px;
36-
margin-bottom: 10px;
37-
}
38-
3926
h1 {
4027
font-size: 36px;
4128
}

0 commit comments

Comments
 (0)