Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 4f9048d

Browse files
author
Robert Messerle
committed
feat(tabs): changes default state of tabs to be transparent.
Closes #1250
1 parent cd5f91d commit 4f9048d

File tree

3 files changed

+43
-35
lines changed

3 files changed

+43
-35
lines changed

src/components/tabs/demoDynamicTabs/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<div class="demo-tab tab{{$index%4}}" layout="column" layout-fill layout-align="space-around center">
99
<div ng-bind="tab.content"></div>
10-
<md-button class="md-warn" ng-click="removeTab( tab )">
10+
<md-button class="md-primary md-raised" ng-click="removeTab( tab )">
1111
Remove Tab
1212
</md-button>
1313
</div>

src/components/tabs/demoDynamicTabs/style.css

+4-23
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,21 @@
33
margin-bottom: 40px;
44
}
55

6-
.md-button {
7-
display:block;
8-
}
9-
106
.demo-tab {
117
height: 300px;
128
text-align: center;
139
}
1410
.tab0, .tab1, .tab2, .tab3 {
15-
background-color: #bbdefb;
1611
}
1712

18-
.md-header {
19-
background-color: #1976D2 !important;
20-
}
21-
md-tab {
22-
color: #90caf9 !important;
23-
}
24-
md-tab.active,
25-
md-tab:focus {
26-
color: white !important;
13+
md-tabs, md-tabs .md-header {
14+
border-bottom: 1px solid #D8D8D8;
2715
}
2816
md-tab[disabled] {
2917
opacity: 0.5;
3018
}
31-
.md-header .md-ripple {
32-
border-color: #FFFF8D !important;
33-
}
34-
md-tabs-ink-bar {
35-
background-color: #FFFF8D !important;
19+
.md-tab-content {
20+
background: white;
3621
}
3722

3823
.title {
@@ -57,10 +42,6 @@ form > [layout] > * {
5742
width: 264px;
5843
}
5944

60-
.md-button {
61-
max-height: 30px;
62-
}
63-
6445
.md-button.add-tab {
6546
margin-top:20px;
6647
max-height:30px !important;

src/components/tabs/tabs-theme.scss

+38-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
md-tabs.md-THEME_NAME-theme {
22
.md-header {
3-
background-color: '{{primary-color}}';
3+
background-color: transparent;
44
}
55

66
&.md-accent {
@@ -16,6 +16,34 @@ md-tabs.md-THEME_NAME-theme {
1616
}
1717
}
1818

19+
&.md-primary {
20+
.md-header {
21+
background-color: '{{primary-color}}';
22+
}
23+
md-tab:not([disabled]) {
24+
color: '{{primary-100}}';
25+
&.active {
26+
color: '{{primary-contrast}}';
27+
}
28+
}
29+
md-tab {
30+
color: '{{primary-100}}';
31+
&[disabled] {
32+
color: '{{foreground-3}}';
33+
}
34+
&:focus {
35+
color: '{{primary-contrast}}';
36+
background-color: '{{primary-contrast-0.1}}';
37+
}
38+
&.active {
39+
color: '{{primary-contrast}}';
40+
}
41+
.md-ripple-container {
42+
color: '{{primary-contrast}}';
43+
}
44+
}
45+
}
46+
1947
&.md-warn {
2048
.md-header {
2149
background-color: '{{warn-color}}';
@@ -31,24 +59,23 @@ md-tabs.md-THEME_NAME-theme {
3159

3260

3361
md-tabs-ink-bar {
34-
color: '{{primary-contrast}}';
35-
background: '{{primary-contrast}}';
62+
color: '{{accent-color}}';
63+
background: '{{accent-color}}';
3664
}
3765

3866
md-tab {
39-
color: '{{primary-100}}';
40-
&.active {
41-
color: '{{primary-contrast}}';
42-
}
67+
color: '{{foreground-2}}';
4368
&[disabled] {
44-
color: '{{foreground-4}}';
69+
color: '{{foreground-3}}';
4570
}
4671
&:focus {
47-
color: '{{primary-contrast}}';
48-
background-color: '{{primary-contrast-0.1}}';
72+
color: '{{foreground-1}}';
73+
}
74+
&.active {
75+
color: '{{primary-color}}';
4976
}
5077
.md-ripple-container {
51-
color: '{{primary-contrast}}';
78+
color: '{{accent-100}}';
5279
}
5380
}
5481
}

0 commit comments

Comments
 (0)