-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcube-card-content.js
70 lines (58 loc) · 1.41 KB
/
cube-card-content.js
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
import '@polymer/paper-styles/paper-styles-classes.js';
import {PolymerElement, html} from '@polymer/polymer/polymer-element.js';
class CubeCardContent extends PolymerElement {
static get is() {return 'cube-card-content'}
static get template()
{
return html`<style>
:host {
position: relative;
display: block;
min-height: 40px;
margin: 16px;
margin-top: 0;
}
:host([slim]) {
margin: 0;
}
::slotted(h1), ::slotted(h2), ::slotted(h3), ::slotted(h4), ::slotted(h5), ::slotted(h6) {
@apply --paper-font-body2;
margin: 4px 0 2px 0;
}
::slotted(em) {
@apply --paper-font-display1;
text-decoration: none;
position: absolute;
right: 0;
top: 0;
bottom: 0;
padding: 20px;
}
::slotted(p) {
margin: 1px 0;
@apply --paper-font-body1;
}
::slotted(img) {
width: 100%;
margin: 16px -16px -15px -16px;
}
::slotted(img.thumbnail) {
width: 80px;
height: 80px;
margin: 0 0 16px 16px;
float: right;
}
::slotted(.error) {
color: #ab0000;
}
::slotted(.success) {
color: #00ab00;
}
::slotted(.info) {
color: #0078ab;
}
</style>
<slot></slot>`
}
}
customElements.define(CubeCardContent.is, CubeCardContent);