-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy paths-table-lite.html
More file actions
83 lines (62 loc) · 1.64 KB
/
s-table-lite.html
File metadata and controls
83 lines (62 loc) · 1.64 KB
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
<!--
@license
Copyright (c) 2017 The StartPolymer Project Authors. All rights reserved.
This code may only be used under the MIT License found at https://github.com/StartPolymer/license
The complete set of authors may be found at https://github.com/StartPolymer/authors
The complete set of contributors may be found at https://github.com/StartPolymer/contributors
-->
<link rel="import" href="../polymer/polymer.html">
<!--
`s-table-lite`
Responsive HTML table extended with Polymer.
@demo demo/s-table-lite.html
-->
<dom-module id="s-table-lite">
<template>
<style>
:host {
display: block;
position: relative;
border-spacing: 0;
}
:host([fixed-column]) #container {
margin-left: var(--s-table-fixed-column-width, 192px);
}
:host([fixed-column]) #table ::slotted(tbody) tr td:nth-of-type(1),
:host([fixed-column]) #table ::slotted(tfoot) tr td:nth-of-type(1),
:host([fixed-column]) #table ::slotted(thead) tr th:nth-of-type(1) {
position: absolute;
left: 0;
width: var(--s-table-fixed-column-width, 192px);
}
#container {
overflow-x: auto;
}
#container::-webkit-scrollbar {
height: var(--s-table-scrollbar-height, 8px);
}
#container::-webkit-scrollbar-track {
border-radius: var(--s-table-scrollbar-border-radius, 2px);
}
#container::-webkit-scrollbar-thumb {
border-radius: var(--s-table-scrollbar-border-radius, 2px);
background-color: var(--s-table-scrollbar-color, #C1C1C1); /* Chrome scrollbar color */
}
#table {
display: table;
width: 100%;
}
</style>
<div id="container">
<div id="table">
<slot></slot>
</div>
</div>
</template>
<script>
Polymer({
is: 's-table-lite',
extends: 'table'
});
</script>
</dom-module>