Skip to content

Commit

Permalink
fix(table): change table td padding (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
HandsomeButterball authored Jun 3, 2020
1 parent a66964a commit 41d89d9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion example/src/app/examples/examples.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="content">
<ngx-gantt start="1514736000" end="1609430400" [items]="items" [groups]="groups" [draggable]="true">
<ngx-gantt-table>
<ngx-gantt-column [width]="200" name="标题">
<ngx-gantt-column name="标题" [width]="400">
<ng-template #cell let-item>
{{ item.title }}
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
></ng-template>
</ng-container>
<ng-template #default>
<span class="group-title"> {{ group.title }}</span>
<span class="group-title">{{ group.title }}</span>
</ng-template>
</div>
</td>
Expand Down
10 changes: 7 additions & 3 deletions packages/gantt/src/components/table/gantt-table.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
.gantt-table-group {
background: $gantt-group-background-color;
td {
&::after {
background: transparent;
}
padding: 0 10px !important;
}
.gantt-table-group-title {
cursor: pointer;
.expand-icon {
color: #aaa;
margin-right: 6px;
}
}
}
Expand All @@ -36,7 +35,12 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 150px;
min-width: 100px;

&:first-child {
padding: 0 50px;
}
&::before {
position: absolute;
top: 0;
Expand Down
4 changes: 2 additions & 2 deletions packages/gantt/src/gantt.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
}

.gantt-side-container {
// height: calc(100% - #{$gantt-header-height});
height: 100%;
overflow: auto;
overflow-y: auto;
overflow-x: scroll;

&::-webkit-scrollbar {
display: none;
Expand Down
2 changes: 1 addition & 1 deletion packages/gantt/src/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $gantt-container-background-color: #fafafa !default;
$gantt-item-height: 44px !default;
$gantt-group-background-color: rgba($color: #f3f3f3, $alpha: 0.5) !default;
$gantt-group-height: 44px !default;
$gantt-table-td-padding: 0 15px !default;
$gantt-table-td-padding: 0 20px !default;

// calendar
$gantt-date-primary-color: #888 !default;
Expand Down

0 comments on commit 41d89d9

Please sign in to comment.