Skip to content

Commit 25aeb06

Browse files
authored
Merge pull request #9 from hiui-group/develop
release: 2.0.0
2 parents 86f8493 + 4d70a56 commit 25aeb06

12 files changed

+45
-47
lines changed

README-zh.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ HIUI 模板核心样式文件,包含初始化、布局、排版等样式。
77
## 使用
88

99
### 组件
10-
组件依赖直接引入 `@import '@hi-ui/core-css';`,只包含变量和函数,不会插入任何实质代码。
10+
组件依赖直接引入 `@import '@hi-ui/core-css/index.scss';`,只包含变量和函数,不会插入任何实质代码。
1111

1212
### 主题
1313
主题依赖包含了核心文件以及必备的 normalize、helper classes、排版、多语言等支持,使用方法如下:
1414

15-
```scss
15+
``` scss
1616
@import '@hi-ui/core-css/i18n/zh-CN.scss';
1717
@import '@hi-ui/core-css/base.scss';
1818
```

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ HIUI core styles, include common reset, helper classes and typography. i18n supp
77
## Usage
88

99
### Components
10-
For component usage, just use `@import '@hi-ui/core-css';` imports variables and mix-ins.
10+
For component usage, just use `@import '@hi-ui/core-css/index.scss';` imports variables and mix-ins.
1111

1212
### Themes
1313
For theme usage, use code below to import variables, mix-ins, normalize, helper classes etc.
1414

15-
```scss
15+
``` scss
1616
@import '@hi-ui/core-css/i18n/zh-CN.scss';
1717
@import '@hi-ui/core-css/base.scss';
1818
```

lib/base/_typography.scss

+7-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
* Description: typo styles.
55
*/
66

7-
@import './typography/base';
8-
@import './typography/headings';
9-
@import './typography/lists';
10-
@import './typography/images';
11-
@import './typography/code';
7+
#{$entry-selector} {
8+
@include typoBase;
9+
@include typoCode;
10+
@include typoHeadings;
11+
@include typoImages;
12+
@include typoLists;
13+
}

lib/core/_palettes.scss

+8-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
$theme-colors: (
99
'orange': #f63,
1010
'cyan': #46bc99,
11+
'magenta': #ff5975,
12+
'lavender': #b450de,
1113
'blue': #3da8f5,
12-
'purple': #8a8acb,
13-
'green': #1da653
14+
'purple': #8a8acb
1415
) !default;
1516

1617
$palette-primary: map-merge(
@@ -20,8 +21,8 @@ $palette-primary: map-merge(
2021

2122
$palette-secondary: (
2223
'success': #1da653,
23-
'danger': #eb5252,
24-
'warning': #e19d0c
24+
'warning': #e19d0c,
25+
'danger': #f44141
2526
) !default;
2627

2728
$palette-tertiary: (
@@ -31,13 +32,16 @@ $palette-tertiary: (
3132
'gray': #d8d8d8,
3233
'gray-light': #e7e7e7,
3334
'gray-lighter': #f6f6f6,
35+
'blue-lighter': #ecf2fe,
3436
'white': #fff
3537
) !default;
3638

3739
// Color palettes
3840
$palette-hiui: get-palette(get-color($palette-primary, 'hiui-blue')) !default;
3941
$palette-orange: get-palette(get-color($palette-primary, 'orange')) !default;
4042
$palette-cyan: get-palette(get-color($palette-primary, 'cyan')) !default;
43+
$palette-magenta: get-palette(get-color($palette-primary, 'magenta')) !default;
44+
$palette-lavender: get-palette(get-color($palette-primary, 'lavender')) !default;
4145
$palette-blue: get-palette(get-color($palette-primary, 'blue')) !default;
4246
$palette-purple: get-palette(get-color($palette-primary, 'purple')) !default;
4347

lib/core/index.scss

+5
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@
77
@import './variables';
88
@import './mixins';
99
@import './palettes';
10+
@import './typography/base';
11+
@import './typography/code';
12+
@import './typography/headings';
13+
@import './typography/images';
14+
@import './typography/lists';

lib/base/typography/_base.scss lib/core/typography/_base.scss

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
* Description: base typo reset and .entry styles.
55
*/
66

7-
@import '../../core/index';
8-
9-
#{$entry-selector} {
7+
@mixin typoBase {
108
@include clearfix();
119

1210
// Be careful about CSS selector specificity!

lib/base/typography/_code.scss lib/core/typography/_code.scss

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
* Description: code preview styles.
55
*/
66

7-
@import '../../core/index';
8-
9-
#{$entry-selector} {
7+
@mixin typoCode {
108
code,
119
pre,
1210
kbd {

lib/base/typography/_headings.scss lib/core/typography/_headings.scss

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
* Description: heading styles.
55
*/
66

7-
@import '../../core/index';
8-
9-
#{$entry-selector} {
7+
@mixin typoHeadings {
108
// Only reset headings at entry root
119
> {
1210
h1,
@@ -15,7 +13,7 @@
1513
h4,
1614
h5,
1715
h6 {
18-
margin-top: $spacer-6;
16+
margin-top: $spacer-10;
1917
margin-bottom: $spacer-4;
2018
font-weight: $font-weight-bold;
2119
}

lib/base/typography/_images.scss lib/core/typography/_images.scss

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
* Description: image styles.
55
*/
66

7-
@import '../../core/index';
8-
9-
#{$entry-selector} {
7+
@mixin typoImages {
108
// Only add to imgs at entry root
119
> {
1210
img,

lib/base/typography/_lists.scss lib/core/typography/_lists.scss

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
* Description: <ul>, <ol>, <dl> styles.
55
*/
66

7-
@import '../../core/index';
8-
9-
#{$entry-selector} {
7+
@mixin typoLists {
108
// Only add to lists at entry root
119
> {
1210
ul,
@@ -31,7 +29,7 @@
3129
}
3230

3331
& + li {
34-
margin-top: $spacer-1;
32+
margin-top: $spacer-3;
3533
}
3634
}
3735
}

lib/i18n/zh-CN.scss

+13-16
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,19 @@ $font-family-base: $_chs-sans-font-stack, $_symbol-font-stack;
1616
$font-family-alt: $_chs-serif-font-stack, $_symbol-font-stack;
1717

1818
#{$entry-selector}:lang(zh) {
19-
> {
20-
// 标题中文不加粗
21-
h1,
22-
h2,
23-
h3,
24-
h4,
25-
h5,
26-
h6 {
27-
font-weight: $font-weight-normal;
28-
}
19+
// 修改中文标题文字渲染
20+
h1,
21+
h2,
22+
h3,
23+
h4,
24+
h5,
25+
h6 {
26+
-webkit-font-smoothing: antialiased;
27+
}
2928

30-
// 中文不使用斜体
31-
dl {
32-
dt {
33-
font-style: normal;
34-
}
35-
}
29+
// 中文不使用斜体
30+
dt,
31+
em {
32+
font-style: normal;
3633
}
3734
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hi-ui/core-css",
3-
"version": "2.0.0-beta.3",
3+
"version": "2.0.0",
44
"description": "HIUI core styles, include common reset, helper classes and typography. i18n supported.",
55
"main": "index.scss",
66
"directories": {

0 commit comments

Comments
 (0)