Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_table.scss « components « sass « assets « static - github.com/curttimson/hugo-theme-massively.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 60d24c24893c80a6fc81a652838ba61b33a07735 (plain)
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
///
/// Massively by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///

/* Table */

	.table-wrapper {
		-webkit-overflow-scrolling: touch;
		overflow-x: auto;
	}

	table {
		margin: 0 0 _size(element-margin) 0;
		width: 100%;

		tbody {
			tr {
				border: solid 1px;
				border-left: 0;
				border-right: 0;
			}
		}

		td {
			padding: 0.75rem 0.75rem;
		}

		th {
			font-family: _font(family-heading);
			font-size: 0.8rem;
			font-weight: _font(weight-heading);
			letter-spacing: 0.075em;
			line-height: 1.5;
			padding: 0 0.75rem 0.75rem 0.75rem;
			text-align: left;
			text-transform: uppercase;

			@include breakpoint(medium) {
				font-size: 0.9rem;
			}
		}

		thead {
			border-bottom: solid 2px;
		}

		tfoot {
			border-top: solid 2px;
		}

		&.alt {
			border-collapse: separate;

			tbody {
				tr {
					td {
						border: solid 1px;
						border-left-width: 0;
						border-top-width: 0;

						&:first-child {
							border-left-width: 1px;
						}
					}

					&:first-child {
						td {
							border-top-width: 1px;
						}
					}
				}
			}

			thead {
				border-bottom: 0;
			}

			tfoot {
				border-top: 0;
			}
		}
	}

	@mixin color-table($p: null) {
		table {
			tbody {
				tr {
					border-color: _palette($p, border);

					&:nth-child(2n + 1) {
						background-color: _palette($p, border-bg);
					}
				}
			}

			th {
				color: _palette($p, fg-bold);
			}

			thead {
				border-bottom-color: _palette($p, border);
			}

			tfoot {
				border-top-color: _palette($p, border);
			}

			&.alt {
				tbody {
					tr {
						td {
							border-color: _palette($p, border);
						}
					}
				}
			}
		}
	}

	@include color-table;