Skip to content

Commit db4a4cd

Browse files
authored
refactor(drop-down): bundle styles with component (#15630)
1 parent b077410 commit db4a4cd

32 files changed

+345
-75
lines changed

projects/igniteui-angular/src/lib/action-strip/action-strip.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations';
88
import { IgxIconComponent } from '../icon/icon.component';
99

1010
const ACTION_STRIP_CONTAINER_CSS = 'igx-action-strip__actions';
11-
const DROP_DOWN_LIST = 'igx-drop-down__list';
11+
const DROP_DOWN_LIST = 'igx-drop-down';
1212

1313
describe('igxActionStrip', () => {
1414
let fixture;

projects/igniteui-angular/src/lib/carousel/carousel.component.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ export class CarouselHammerConfig extends HammerGestureConfig {
8080
],
8181
selector: 'igx-carousel',
8282
templateUrl: 'carousel.component.html',
83-
styles: [`
84-
:host {
85-
display: block;
86-
outline-style: none;
87-
}`],
8883
styleUrl: 'carousel.component.css',
8984
encapsulation: ViewEncapsulation.None,
9085
imports: [IgxButtonDirective, IgxIconComponent, NgClass, NgTemplateOutlet]

projects/igniteui-angular/src/lib/combo/combo-dropdown.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import {
2-
ChangeDetectorRef, Component, ElementRef, Inject, QueryList, OnDestroy, AfterViewInit, ContentChildren, Input, booleanAttribute
2+
ChangeDetectorRef, Component, ElementRef, Inject, QueryList, OnDestroy, AfterViewInit, ContentChildren, Input, booleanAttribute,
3+
ViewEncapsulation,
4+
HostBinding
35
} from '@angular/core';
46
import { IgxComboBase, IGX_COMBO_COMPONENT } from './combo.common';
57
import { IDropDownBase, IGX_DROPDOWN_BASE } from '../drop-down/drop-down.common';
@@ -17,6 +19,8 @@ import { IgxToggleDirective } from '../directives/toggle/toggle.directive';
1719
@Component({
1820
selector: 'igx-combo-drop-down',
1921
templateUrl: '../drop-down/drop-down.component.html',
22+
styleUrl: '../drop-down/drop-down.component.css',
23+
encapsulation: ViewEncapsulation.None,
2024
providers: [{ provide: IGX_DROPDOWN_BASE, useExisting: IgxComboDropDownComponent }],
2125
imports: [IgxToggleDirective]
2226
})

projects/igniteui-angular/src/lib/combo/combo.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { DOCUMENT, NgClass, NgTemplateOutlet } from '@angular/common';
22
import {
33
AfterViewInit, ChangeDetectorRef, Component, ElementRef, OnInit, OnDestroy,
4-
Optional, Inject, Injector, ViewChild, Input, Output, EventEmitter, HostListener, DoCheck, booleanAttribute
4+
Optional, Inject, Injector, ViewChild, Input, Output, EventEmitter, HostListener, DoCheck, booleanAttribute,
5+
ViewEncapsulation
56
} from '@angular/core';
67

78
import { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
@@ -95,6 +96,7 @@ const diffInSets = (set1: Set<any>, set2: Set<any>): any[] => {
9596
@Component({
9697
selector: 'igx-combo',
9798
templateUrl: 'combo.component.html',
99+
encapsulation: ViewEncapsulation.None,
98100
providers: [
99101
IgxComboAPIService,
100102
{ provide: IGX_COMBO_COMPONENT, useExisting: IgxComboComponent },

projects/igniteui-angular/src/lib/core/styles/components/drop-down/_drop-down-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
$size: null
8282
) {
8383
$name: 'igx-drop-down';
84-
$selector: '.igx-drop-down__list, .igx-grid-toolbar__dd-list';
84+
$selector: '.igx-drop-down, .igx-grid-toolbar__dd-list';
8585
$drop-down-schema: ();
8686

8787
@if map.has-key($schema, 'drop-down') {

projects/igniteui-angular/src/lib/core/styles/themes/generators/_base.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -408,13 +408,13 @@
408408
@include rating($rating-theme-map);
409409
}
410410

411-
@if is-used('igx-drop-down', $exclude) {
412-
$drop-down-theme-map: drop-down-theme(
413-
$schema: $schema,
414-
);
415-
$drop-down-theme-map: meta.call($theme-handler, $drop-down-theme-map);
416-
@include drop-down($drop-down-theme-map);
417-
}
411+
// @if is-used('igx-drop-down', $exclude) {
412+
// $drop-down-theme-map: drop-down-theme(
413+
// $schema: $schema,
414+
// );
415+
// $drop-down-theme-map: meta.call($theme-handler, $drop-down-theme-map);
416+
// @include drop-down($drop-down-theme-map);
417+
// }
418418

419419
// @if is-used('igx-expansion-panel', $exclude) {
420420
// $expansion-panel-theme-map: expansion-panel-theme(

projects/igniteui-angular/src/lib/core/styles/typography/_bootstrap.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@
6464
content: 'body-1'
6565
));
6666
@include dock-manager-typography();
67-
@include drop-down-typography($categories: (
68-
header: 'overline',
69-
item: 'body-2',
70-
select-item: 'body-2'
71-
));
67+
// @include drop-down-typography($categories: (
68+
// header: 'overline',
69+
// item: 'body-2',
70+
// select-item: 'body-2'
71+
// ));
7272
// @include expansion-panel-typography($categories: (
7373
// title: 'h5',
7474
// description: 'subtitle-2',

projects/igniteui-angular/src/lib/core/styles/typography/_fluent.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@
6767
content: 'body-2'
6868
));
6969
@include dock-manager-typography();
70-
@include drop-down-typography($categories: (
71-
header: 'subtitle-2',
72-
item: 'body-2',
73-
select-item: 'body-2'
74-
));
70+
// @include drop-down-typography($categories: (
71+
// header: 'subtitle-2',
72+
// item: 'body-2',
73+
// select-item: 'body-2'
74+
// ));
7575
// @include expansion-panel-typography($categories: (
7676
// title: 'subtitle-1',
7777
// description: 'body-2',

projects/igniteui-angular/src/lib/core/styles/typography/_indigo.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
content: 'body-1',
6767
));
6868
@include dock-manager-typography();
69-
@include drop-down-typography();
69+
// @include drop-down-typography();
7070
// @include expansion-panel-typography($categories: (
7171
// title: 'body-2',
7272
// body: 'body-2',

projects/igniteui-angular/src/lib/core/styles/typography/_material.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
@include date-range-typography();
4848
@include dialog-typography();
4949
@include dock-manager-typography();
50-
@include drop-down-typography();
50+
// @include drop-down-typography();
5151
// @include expansion-panel-typography();
5252
@include excel-filtering-typography();
5353
@include icon-button-typography();

0 commit comments

Comments
 (0)