summaryrefslogtreecommitdiff
path: root/source/features/table-input.css
blob: c7cbbf663d64a35fbb547b83ecdd17e8495d4e06 (plain) (blame)
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
:root {
	--rgh-table-input-size: 40px;
}

:root:root:root:root .rgh-table-input {
	font-size: var(--rgh-table-input-size);
	padding: 3px;
	z-index: 99;
	display: grid !important;
	grid-template: repeat(5, 1em) / repeat(5, 1em);
	width: fit-content;
	height: fit-content;
	margin: auto;
}

:root .rgh-tic {
	padding: 1px;
}

.rgh-tic div {
	height: 100%;
	border: 2px solid var(--rgh-border-color);
	border-radius: 2px;
}

@media screen and (min-width: 768px) {
	:root {
		/* #6511 */
		--rgh-table-input-size: 20px;
	}
}

/** TODO: Drop JS-based version after :has() has full support */
.rgh-table-input:hover .selected div {
	border-color: #79b8ff;
	background-color: var(--color-diff-blob-hunk-num-bg, #dbedff);
}

.rgh-tic:hover div,
.rgh-tic:is(:nth-of-type(5n + 1)):has(~ :hover:nth-of-type(5n + 1)) div,
.rgh-tic:is(:nth-of-type(5n + 1), :nth-of-type(5n + 2)):has(
		~ :hover:nth-of-type(5n + 2)
	)
	div,
.rgh-tic:is(
		:nth-of-type(5n + 1),
		:nth-of-type(5n + 2),
		:nth-of-type(5n + 3)
	):has(~ :hover:nth-of-type(5n + 3))
	div,
.rgh-tic:is(
		:nth-of-type(5n + 1),
		:nth-of-type(5n + 2),
		:nth-of-type(5n + 3),
		:nth-of-type(5n + 4)
	):has(~ :hover:nth-of-type(5n + 4))
	div,
.rgh-tic:is(
		:nth-of-type(5n + 1),
		:nth-of-type(5n + 2),
		:nth-of-type(5n + 3),
		:nth-of-type(5n + 4),
		:nth-of-type(5n + 5)
	):has(~ :hover:nth-of-type(5n + 5))
	div {
	border-color: #79b8ff;
	background-color: var(--color-diff-blob-hunk-num-bg, #dbedff);
}

/* https://github.com/refined-github/refined-github/issues/6515 */
.rgh-table-input .sentinel {
	display: none;
}