Skip to content

Commit f8f50a3

Browse files
authored
Merge pull request #5725 from IgniteUI/fix-typography
refactor(themes): update typography and a few broken styles
2 parents b250661 + 887fb2a commit f8f50a3

File tree

4 files changed

+64
-54
lines changed

4 files changed

+64
-54
lines changed

projects/igniteui-angular/src/lib/core/styles/components/calendar/_calendar-theme.scss

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@
421421
color: --var($theme, 'content-text-color');
422422
cursor: pointer;
423423
outline: none;
424+
flex-basis: 14.28%;
424425
// transition: background .15s ease-out;
425426

426427
&:hover,
@@ -462,12 +463,9 @@
462463
}
463464

464465
%cal-value--year {
465-
display: flex;
466466
margin: 0;
467-
justify-content: center;
468-
align-items: center;
469467
min-width: 8ch;
470-
height: rem(52px);
468+
line-height: rem(52px);
471469
}
472470

473471
%cal-value--year-current {
@@ -639,37 +637,35 @@
639637
$picker-date: map-get($categories, 'picker-date');
640638
$content: map-get($categories, 'content');
641639

642-
@include igx-scope('.igx-typography') {
643-
%cal-header-year {
644-
@include igx-type-style($type-scale, $header-year) {
645-
margin: 0;
646-
}
640+
%cal-header-year {
641+
@include igx-type-style($type-scale, $header-year) {
642+
margin: 0;
647643
}
644+
}
648645

649-
%cal-header-date {
650-
@include igx-type-style($type-scale, $header-date) {
651-
line-height: rem(42px);
652-
margin: 0;
653-
}
646+
%cal-header-date {
647+
@include igx-type-style($type-scale, $header-date) {
648+
line-height: rem(42px);
649+
margin: 0;
654650
}
651+
}
655652

656-
%cal-picker-date {
657-
@include igx-type-style($type-scale, $picker-date) {
658-
margin: 0;
659-
}
653+
%cal-picker-date {
654+
@include igx-type-style($type-scale, $picker-date) {
655+
margin: 0;
660656
}
657+
}
661658

662-
%cal-value {
663-
@include igx-type-style($type-scale, $content) {
664-
margin: 0;
665-
}
659+
%cal-value {
660+
@include igx-type-style($type-scale, $content) {
661+
margin: 0;
666662
}
663+
}
667664

668-
%cal-value--year-current {
669-
@include igx-type-style($type-scale, $content) {
670-
font-size: rem(24px);
671-
margin: 0;
672-
}
665+
%cal-value--year-current {
666+
@include igx-type-style($type-scale, $content) {
667+
font-size: rem(24px);
668+
margin: 0;
673669
}
674670
}
675671
}

projects/igniteui-angular/src/lib/core/styles/components/navdrawer/_navdrawer-theme.scss

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -346,15 +346,13 @@
346346
$item: map-get($categories, 'item');
347347
$header: map-get($categories, 'header');
348348

349-
@include igx-scope('.igx-typography') {
350-
%item {
351-
@include igx-type-style($type-scale, $item);
352-
}
349+
%item {
350+
@include igx-type-style($type-scale, $item);
351+
}
353352

354-
%item--header {
355-
@include igx-type-style($type-scale, $header) {
356-
margin: 0;
357-
}
353+
%item--header {
354+
@include igx-type-style($type-scale, $header) {
355+
margin: 0;
358356
}
359357
}
360358
}

src/app/hierarchical-grid/hierarchical-grid.sample.ts

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import { Component, ViewChild } from '@angular/core';
2-
import { IgxRowIslandComponent, IgxHierarchicalGridComponent, IPathSegment, IGridCellEventArgs } from 'igniteui-angular';
2+
import {
3+
IgxRowIslandComponent,
4+
IgxHierarchicalGridComponent,
5+
IPathSegment,
6+
IGridCellEventArgs
7+
} from 'igniteui-angular';
38

49
@Component({
510
selector: 'app-hierarchical-grid-sample',
@@ -15,7 +20,6 @@ export class HierarchicalGridSampleComponent {
1520
displayDensities;
1621
riToggle = true;
1722

18-
1923
public columns;
2024
public childColumns;
2125

@@ -25,7 +29,6 @@ export class HierarchicalGridSampleComponent {
2529
@ViewChild('hGrid', { static: true })
2630
hGrid: IgxHierarchicalGridComponent;
2731

28-
2932
constructor() {
3033
// this.localData.push({ ID: -1, Name: ''});
3134
// for (let i = 0; i < 10000; i++) {
@@ -51,12 +54,19 @@ export class HierarchicalGridSampleComponent {
5154
const currLevel = level;
5255
let children;
5356
for (let i = 0; i < count; i++) {
54-
if (level > 0 ) {
55-
children = this.generateData(count / 2 , currLevel - 1);
56-
}
57-
prods.push({
58-
ID: i, ChildLevels: currLevel, ProductName: 'Product: A' + i, 'Col1': i,
59-
'Col2': i, 'Col3': i, childData: children, childData2: children });
57+
if (level > 0) {
58+
children = this.generateData(count / 2, currLevel - 1);
59+
}
60+
prods.push({
61+
ID: i,
62+
ChildLevels: currLevel,
63+
ProductName: 'Product: A' + i,
64+
Col1: i,
65+
Col2: i,
66+
Col3: i,
67+
childData: children,
68+
childData2: children
69+
});
6070
}
6171
return prods;
6272
}
@@ -67,19 +77,26 @@ export class HierarchicalGridSampleComponent {
6777
let children;
6878
for (let i = 0; i < count; i++) {
6979
const rowID = parendID ? parendID + i : i.toString();
70-
if (level > 0 ) {
71-
// Have child grids for row with even id less rows by not multiplying by 2
72-
children = this.generateDataUneven((i % 2 + 1) * Math.round(count / 3) , currLevel - 1, rowID);
80+
if (level > 0) {
81+
// Have child grids for row with even id less rows by not multiplying by 2
82+
children = this.generateDataUneven(((i % 2) + 1) * Math.round(count / 3), currLevel - 1, rowID);
7383
}
7484
prods.push({
75-
ID: rowID, ChildLevels: currLevel, ProductName: 'Product: A' + i, 'Col1': i,
76-
'Col2': i, 'Col3': i, childData: children, childData2: children });
85+
ID: rowID,
86+
ChildLevels: currLevel,
87+
ProductName: 'Product: A' + i,
88+
Col1: i,
89+
Col2: i,
90+
Col3: i,
91+
childData: children,
92+
childData2: children
93+
});
7794
}
7895
return prods;
7996
}
8097

8198
setterChange() {
82-
this.layout1.rowSelectable = !this.layout1.rowSelectable;
99+
this.layout1.rowSelectable = !this.layout1.rowSelectable;
83100
}
84101

85102
setterBindingChange() {
@@ -94,16 +111,15 @@ export class HierarchicalGridSampleComponent {
94111
this.firstLevelExpanded = !this.firstLevelExpanded;
95112
}
96113

97-
testApis() {
98-
}
114+
testApis() {}
99115

100116
selectDensity(event) {
101117
this.density = this.displayDensities[event.index].label;
102118
}
103119

104120
cellClick($evt: IGridCellEventArgs) {
105121
console.log('Cell Click', $evt);
106-
console.log($evt.context);
122+
// console.log($evt.context);
107123
}
108124

109125
public LoadMoreColumns() {

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99
<link rel="icon" type="image/x-icon" href="favicon.ico">
1010
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"></head>
11-
<body class="igx-typography fluent-excel-dark-theme">
11+
<body class="igx-typography default-theme">
1212
<app-root></app-root>
1313
</body>
1414
</html>

0 commit comments

Comments
 (0)