forked from material-components/material-components-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.html
145 lines (140 loc) · 6.06 KB
/
theme.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<!--
Copyright 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License
-->
<html>
<head>
<meta charset="utf-8">
<title>MDC Theme Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<script src="assets/material-components-web.css.js" charset="utf-8"></script>
<style>
.demo-theme__color {
display: inline-flex;
flex-direction: column;
}
.demo-theme__color__label {
display: inline-block;
box-sizing: border-box;
width: 130px;
}
.demo-theme__color__block {
display: inline-block;
box-sizing: border-box;
width: 130px;
height: 50px;
line-height: 50px;
text-align: center;
border: 1px solid black;
}
.demo-theme__text-styles {
display: inline-flex;
box-sizing: border-box;
padding: 16px;
border: 1px solid black;
align-items: center;
flex-direction: column;
}
@media(min-width: 768px) {
.demo-theme__text-styles {
flex-direction: row;
}
}
.demo-theme__text-styles > span {
padding: 0 16px;
}
.demo-theme--custom-light-bg {
background-color: #dddddd;
}
.demo-theme--custom-dark-bg {
background-color: #1d1d1d;
}
</style>
</head>
<body>
<main>
<h1>MDC Theme</h1>
<h2>Theme colors</h2>
<section>
<h3>Theme colors as text</h3>
<div class="demo-theme__color">
<div class="demo-theme__color__label">Primary</div>
<div class="demo-theme__color__block mdc-theme--primary mdc-typography mdc-typography--body2">Lorem ipsum</div>
</div>
<div class="demo-theme__color">
<div class="demo-theme__color__label">Accent</div>
<div class="demo-theme__color__block mdc-theme--accent mdc-typography mdc-typography--body2">Lorem ipsum</div>
</div>
</section>
<section>
<h3>Theme colors as background</h3>
<div class="demo-theme__color">
<div class="demo-theme__color__label">Primary</div>
<div class="demo-theme__color__block mdc-theme--primary-bg"></div>
</div>
<div class="demo-theme__color">
<div class="demo-theme__color__label">Accent</div>
<div class="demo-theme__color__block mdc-theme--accent-bg"></div>
</div>
<div class="demo-theme__color">
<div class="demo-theme__color__label">Background</div>
<div class="demo-theme__color__block mdc-theme--background"></div>
</div>
</section>
<h2>Text colors for contrast</h2>
<section>
<h3>Text on background</h3>
<div class="demo-theme__text-styles mdc-theme--background mdc-typography mdc-typography--body2">
<span class="mdc-theme--text-primary-on-background">Primary</span>
<span class="mdc-theme--text-secondary-on-background">Secondary</span>
<span class="mdc-theme--text-hint-on-background">Hint</span>
<span class="mdc-theme--text-disabled-on-background">Disabled</span>
<span class="mdc-theme--text-icon-on-background material-icons">favorite</span>
</div>
<h3>Text on primary</h3>
<div class="demo-theme__text-styles mdc-theme--primary-bg mdc-typography mdc-typography--body2">
<span class="mdc-theme--text-primary-on-primary">Primary</span>
<span class="mdc-theme--text-secondary-on-primary">Secondary</span>
<span class="mdc-theme--text-hint-on-primary">Hint</span>
<span class="mdc-theme--text-disabled-on-primary">Disabled</span>
<span class="mdc-theme--text-icon-on-primary material-icons">favorite</span>
</div>
<h3>Text on accent</h3>
<div class="demo-theme__text-styles mdc-theme--accent-bg mdc-typography mdc-typography--body2">
<span class="mdc-theme--text-primary-on-accent">Primary</span>
<span class="mdc-theme--text-secondary-on-accent">Secondary</span>
<span class="mdc-theme--text-hint-on-accent">Hint</span>
<span class="mdc-theme--text-disabled-on-accent">Disabled</span>
<span class="mdc-theme--text-icon-on-accent material-icons">favorite</span>
</div>
<h3>Text on user-defined light background</h3>
<div class="demo-theme__text-styles demo-theme--custom-light-bg mdc-typography mdc-typography--body2">
<span class="mdc-theme--text-primary-on-light">Primary</span>
<span class="mdc-theme--text-secondary-on-light">Secondary</span>
<span class="mdc-theme--text-hint-on-light">Hint</span>
<span class="mdc-theme--text-disabled-on-light">Disabled</span>
<span class="mdc-theme--text-icon-on-light material-icons">favorite</span>
</div>
<h3>Text on user-defined dark background</h3>
<div class="demo-theme__text-styles demo-theme--custom-dark-bg mdc-typography mdc-typography--body2">
<span class="mdc-theme--text-primary-on-dark">Primary</span>
<span class="mdc-theme--text-secondary-on-dark">Secondary</span>
<span class="mdc-theme--text-hint-on-dark">Hint</span>
<span class="mdc-theme--text-disabled-on-dark">Disabled</span>
<span class="mdc-theme--text-icon-on-dark material-icons">favorite</span>
</div>
</section>
</main>
</body>
</html>