-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
122 lines (100 loc) · 2.54 KB
/
Copy pathstyle.css
File metadata and controls
122 lines (100 loc) · 2.54 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
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
/* Collaborative Todo — styles for inline CRDT text editing */
body {
font-family: system-ui, -apple-system, sans-serif;
max-width: 480px;
margin: 40px auto;
padding: 0 20px;
color: #222;
}
h1 {
margin-bottom: 20px;
font-size: 1.4em;
}
/* ── Add bar ─────────────────────────────────────────────────────────── */
.add-bar {
margin-bottom: 16px;
}
.add-bar button {
padding: 8px 16px;
cursor: pointer;
border: 1px solid #ccc;
border-radius: 4px;
background: #fafafa;
font-size: 14px;
}
.add-bar button:hover {
background: #f0f0f0;
}
/* ── Todo list ───────────────────────────────────────────────────────── */
ul {
list-style: none;
padding: 0;
margin: 0;
}
li {
display: flex;
align-items: center;
padding: 4px 0;
border-bottom: 1px solid #eee;
gap: 8px;
}
li input[type="checkbox"] {
flex-shrink: 0;
}
/* ── Collaborative text input ────────────────────────────────────────── */
/*
Each todo's text is bound to a CRDT via useText(). The <input> is
uncontrolled — the adapter manages its value imperatively. We style
it to look like inline text, not a form field.
*/
.todo-text {
flex: 1;
padding: 6px 8px;
border: 1px solid transparent;
border-radius: 3px;
font: inherit;
font-size: 14px;
background: transparent;
outline: none;
min-width: 0;
}
.todo-text:focus {
border-color: #acd;
background: #f8fbff;
}
.todo-text::placeholder {
color: #aaa;
font-style: italic;
}
.todo-text.done {
text-decoration: line-through;
color: #888;
}
/* ── Remove button ───────────────────────────────────────────────────── */
li button {
flex-shrink: 0;
background: none;
border: none;
cursor: pointer;
font-size: 18px;
color: #bbb;
padding: 0 4px;
line-height: 1;
}
li button:hover {
color: #c00;
}
/* ── Empty state & hints ─────────────────────────────────────────────── */
.empty-state {
color: #888;
font-style: italic;
}
.hint {
color: #888;
font-size: 12px;
margin-top: 20px;
}
.sync-indicator {
font-size: 14px;
margin-left: 8px;
}