Skip to content

Commit 3c2598b

Browse files
improvements
1 parent 2e28ef8 commit 3c2598b

4 files changed

Lines changed: 344 additions & 85 deletions

File tree

client/docs-lib.css

Lines changed: 62 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ html, body.bespoke {
118118
.bespoke .docs-viewer-body {
119119
flex: 1;
120120
overflow-y: auto;
121-
display: flex;
122-
justify-content: center;
121+
position: relative;
123122
background: var(--Colors-Backgrounds-Main-Default);
124123
}
125124

@@ -135,9 +134,9 @@ html, body.bespoke {
135134

136135
/* The document "page" */
137136
.bespoke .docs-page {
138-
max-width: 720px;
137+
max-width: 560px;
139138
width: 100%;
140-
padding: var(--UI-Spacing-spacing-mxl) var(--UI-Spacing-spacing-max);
139+
padding: var(--UI-Spacing-spacing-mxl) var(--UI-Spacing-spacing-ml) var(--UI-Spacing-spacing-mxl) var(--UI-Spacing-spacing-max);
141140
color: var(--Colors-Text-Body-Default);
142141
line-height: 1.7;
143142
}
@@ -190,38 +189,66 @@ html, body.bespoke {
190189
background: var(--Colors-Backgrounds-Main-Top);
191190
}
192191

193-
.bespoke .status-ready {
194-
color: var(--Colors-Base-Success-600);
195-
font-weight: 600;
196-
}
197-
198-
.bespoke .status-pending {
199-
color: var(--Colors-Base-Warning-600);
200-
font-weight: 600;
201-
}
202-
203192
/* Commentable sections */
204193
.bespoke .docs-commentable {
205194
position: relative;
206195
padding: var(--UI-Spacing-spacing-xs) var(--UI-Spacing-spacing-s);
207196
margin: 0 calc(-1 * var(--UI-Spacing-spacing-s));
208197
border-radius: var(--UI-Radius-radius-s);
209198
cursor: pointer;
210-
transition: background 0.15s;
199+
transition: background 0.15s, box-shadow 0.15s;
211200
}
212201

213202
.bespoke .docs-commentable:hover {
214203
background: var(--Colors-Backgrounds-Main-Top);
215204
}
216205

206+
/* Editing state */
207+
.bespoke .docs-commentable.editing {
208+
background: var(--Colors-Backgrounds-Main-Top);
209+
box-shadow: 0 0 0 2px var(--Colors-Primary-Default);
210+
cursor: text;
211+
}
212+
213+
.bespoke .docs-editable {
214+
outline: none;
215+
border-radius: 2px;
216+
min-height: 1em;
217+
}
218+
219+
.bespoke .docs-editable:focus {
220+
background: var(--Colors-Backgrounds-Main-Default);
221+
}
222+
223+
/* Edit indicator (pencil icon on hover) */
224+
.bespoke .docs-edit-indicator {
225+
position: absolute;
226+
right: -36px;
227+
top: 50%;
228+
transform: translateY(-50%);
229+
font-size: 18px;
230+
color: var(--Colors-Text-Body-Secondary);
231+
opacity: 0;
232+
transition: opacity 0.15s;
233+
pointer-events: none;
234+
}
235+
236+
.bespoke .docs-commentable:hover .docs-edit-indicator {
237+
opacity: 0.7;
238+
}
239+
217240
.bespoke .docs-commentable.has-comments {
218241
border-left: 3px solid var(--Colors-Primary-Default);
219242
padding-left: calc(var(--UI-Spacing-spacing-s) - 3px);
220243
}
221244

245+
.bespoke .docs-commentable.comment-active {
246+
background: var(--Colors-Backgrounds-Main-Top);
247+
}
248+
222249
.bespoke .docs-comment-indicator {
223250
position: absolute;
224-
right: var(--UI-Spacing-spacing-s);
251+
right: -60px;
225252
top: 50%;
226253
transform: translateY(-50%);
227254
background: var(--Colors-Primary-Default);
@@ -243,22 +270,24 @@ html, body.bespoke {
243270
opacity: 1;
244271
}
245272

246-
/* Comment panel (inline, below the section) */
247-
.bespoke .docs-comment-panel {
248-
margin-top: var(--UI-Spacing-spacing-s);
273+
/* Side comment panel */
274+
.bespoke .docs-side-comments {
275+
position: absolute;
276+
right: 15%;
277+
width: 250px;
249278
padding: var(--UI-Spacing-spacing-ms);
250279
background: var(--Colors-Backgrounds-Main-Top);
251280
border-radius: var(--UI-Radius-radius-s);
252281
border: 1px solid var(--Colors-Stroke-Default);
282+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
283+
z-index: 5;
284+
max-height: 300px;
285+
overflow-y: auto;
286+
transition: top 0.15s ease;
253287
}
254288

255289
.bespoke .docs-comment {
256290
padding: var(--UI-Spacing-spacing-s) 0;
257-
border-bottom: 1px solid var(--Colors-Stroke-Default);
258-
}
259-
260-
.bespoke .docs-comment:last-of-type {
261-
border-bottom: none;
262291
}
263292

264293
.bespoke .docs-comment-header {
@@ -292,9 +321,18 @@ html, body.bespoke {
292321

293322
.bespoke .docs-comment-form .input {
294323
flex: 1;
324+
padding: var(--UI-Spacing-spacing-xs) var(--UI-Spacing-spacing-s);
295325
font-size: 13px;
296326
}
297327

298328
.bespoke .docs-comment-form .button {
299329
flex-shrink: 0;
300330
}
331+
332+
.bespoke .docs-side-comments .docs-comment-form {
333+
flex-direction: column;
334+
}
335+
336+
.bespoke .docs-side-comments .docs-comment-form .button {
337+
align-self: flex-end;
338+
}

0 commit comments

Comments
 (0)