Skip to content

Commit 1d31578

Browse files
authored
refactor(tabs): scope styles to component (#15659)
1 parent 12d60a1 commit 1d31578

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+833
-156
lines changed

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
@@ -600,13 +600,13 @@
600600
// @include switch($switch-theme-map);
601601
// }
602602

603-
@if is-used('igx-tabs', $exclude) {
604-
$tabs-theme-map: tabs-theme(
605-
$schema: $schema,
606-
);
607-
$tabs-theme-map: meta.call($theme-handler, $tabs-theme-map);
608-
@include tabs($tabs-theme-map);
609-
}
603+
//@if is-used('igx-tabs', $exclude) {
604+
// $tabs-theme-map: tabs-theme(
605+
// $schema: $schema,
606+
// );
607+
// $tabs-theme-map: meta.call($theme-handler, $tabs-theme-map);
608+
// @include tabs($tabs-theme-map);
609+
//}
610610

611611
//@if is-used('igx-stepper', $exclude) {
612612
// $stepper-theme-map: stepper-theme(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
@include switch-typography($categories: (
103103
label: 'body-1'
104104
));
105-
@include tabs-typography();
105+
//@include tabs-typography();
106106
@include time-picker-typography($categories: (
107107
header-hour: 'h4',
108108
selected-time: 'h4'

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@
107107
@include switch-typography($categories: (
108108
label: 'body-2'
109109
));
110-
@include tabs-typography($categories: (
111-
label: 'body-2'
112-
));
110+
//@include tabs-typography($categories: (
111+
// label: 'body-2'
112+
//));
113113
@include time-picker-typography();
114114
//@include stepper-typography();
115115
// @include toast-typography($categories: (

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@
103103
@include switch-typography($categories: (
104104
label: 'body-2'
105105
));
106-
@include tabs-typography($categories: (
107-
label: 'subtitle-2',
108-
)) {
109-
--ig-subtitle-2-text-transform: uppercase;
110-
};
106+
//@include tabs-typography($categories: (
107+
// label: 'subtitle-2',
108+
//)) {
109+
// --ig-subtitle-2-text-transform: uppercase;
110+
//};
111111
@include time-picker-typography($categories: (
112112
header-hour: 'h5',
113113
selected-time: 'h6'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
// @include slider-typography();
6161
// @include snackbar-typography();
6262
@include switch-typography();
63-
@include tabs-typography();
63+
//@include tabs-typography();
6464
@include time-picker-typography();
6565
//@include stepper-typography();
6666
// @include toast-typography();

projects/igniteui-angular/src/lib/tabs/tabs/tab-content.component.html renamed to projects/igniteui-angular/src/lib/tabs/tabs/content/tab-content.component.html

File renamed without changes.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@use 'igniteui-theming/sass/animations' as *;
2+
@use 'sass:map';
3+
@use 'igniteui-theming/sass/bem' as *;
4+
@use 'igniteui-theming/sass/typography' as *;
5+
@use 'igniteui-theming/sass/themes' as *;
6+
@use 'styles/themes/standalone' as *;
7+
8+
@include layer(base) {
9+
@include b(igx-tabs-content) {
10+
position: relative;
11+
overflow: hidden;
12+
display: flex;
13+
flex-direction: column;
14+
flex: 1 1 auto;
15+
16+
@include e(inner) {
17+
position: absolute;
18+
inset: 0;
19+
overflow-x: hidden;
20+
overflow-y: auto;
21+
flex: 1 1 auto;
22+
23+
&::-moz-focus-inner {
24+
// remove dotted border on :focus in firefox
25+
border: 0;
26+
}
27+
28+
&:focus {
29+
outline-width: 0;
30+
}
31+
32+
&[tabindex='0'] {
33+
position: relative;
34+
}
35+
}
36+
}
37+
38+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import {Component, HostBinding, ViewEncapsulation} from '@angular/core';
2+
import { IgxTabContentDirective } from '../../tab-content.directive';
3+
import { IgxTabContentBase } from '../../tabs.base';
4+
5+
@Component({
6+
selector: 'igx-tab-content',
7+
templateUrl: 'tab-content.component.html',
8+
styleUrl: 'tab-content.component.css',
9+
encapsulation: ViewEncapsulation.None,
10+
providers: [{ provide: IgxTabContentBase, useExisting: IgxTabContentComponent }],
11+
})
12+
export class IgxTabContentComponent extends IgxTabContentDirective {
13+
/** @hidden */
14+
@HostBinding('class.igx-tabs-content__inner')
15+
public cssClass = true;
16+
}

projects/igniteui-angular/src/lib/tabs/tabs/tab-header.component.html renamed to projects/igniteui-angular/src/lib/tabs/tabs/header/tab-header.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<ng-content select="igx-prefix,[igxPrefix]"></ng-content>
22

3-
<div class="igx-tabs__header-item-inner">
3+
<div class="igx-tab-header__inner">
44
<ng-content></ng-content>
55
</div>
66

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@use 'themes/base';
2+
@use 'themes/shared';

0 commit comments

Comments
 (0)