Skip to content

Commit

Permalink
feat: use new sass moudle #INFR-2780
Browse files Browse the repository at this point in the history
  • Loading branch information
HandsomeButterball committed May 18, 2022
1 parent 98819e8 commit 8ddd816
Show file tree
Hide file tree
Showing 13 changed files with 2,883 additions and 2,942 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ export class AppModule {

```json
{
"styles": ["node_modules/@worktile/gantt/main.bundle.scss"]
"styles": ["node_modules/@worktile/gantt/styles/index.scss"]
}
```

```scss
@import '@worktile/gantt/main.bundle.scss';
@use '@worktile/gantt/styles/index.scss';
```

### 3. Using component
Expand Down
6 changes: 2 additions & 4 deletions docs/guides/basic/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ path: 'style'
order: 50
---

`ngx-gantt` 使用了 `css` 预处理器 `scss`,支持重写组件的大部分的色值和部分layout样式。

`ngx-gantt` 使用了 `css` 预处理器 `scss`,支持重写组件的大部分的色值和部分 layout 样式。

```scss
// basic
Expand Down Expand Up @@ -54,7 +53,6 @@ $gantt-link-line-color: #348fe4 !default;
// table
$gantt-table-header-drag-line-width: 3px !default;
$gantt-table-header-drag-line-color: #348fe4 !default;

```

示例:
Expand All @@ -63,6 +61,6 @@ $gantt-table-header-drag-line-color: #348fe4 !default;
$gantt-color: #000;
$gantt-bg-color: #fafafa;
@import '~@worktile/gantt/main.bundle.scss';
@import '~@worktile/gantt/styles/index.scss';
```
13 changes: 7 additions & 6 deletions docs/guides/intro/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,23 @@ export class AppModule {
<br/>

### 引入样式

在 angular.json 中引入

```json
{
"styles": [
"node_modules/@worktile/gantt/main.bundle.scss"
]
"styles": ["node_modules/@worktile/gantt/styles/index.scss"]
}
```
在style.scss中引入预构建样式文件

在 style.scss 中引入预构建样式文件

```
@import "~@worktile/gantt/main.bundle.scss";
@import "~@worktile/gantt/styles/index.scss";
```

### 组件中使用


```html
<!-- component.html -->
<ngx-gantt #gantt [items]="items">
Expand Down
2 changes: 1 addition & 1 deletion example/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

$primary: #348fe4;

@import '../../packages/gantt/src/styles/index.scss';
@use '../../packages/gantt/src/styles/index.scss';
@import '~@docgeni/template/styles/index.scss';
@import '~ngx-tethys/styles/index.scss';

Expand Down
Loading

0 comments on commit 8ddd816

Please sign in to comment.