Skip to content

Commit 5eb1627

Browse files
style: subtle color and size adjustment for <details> in the readme (#2392)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 42fc173 commit 5eb1627

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

app/components/Readme.vue

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,20 +112,25 @@ function handleClick(event: MouseEvent) {
112112
.readme :deep([data-level='1']) {
113113
font-size: 1.5rem;
114114
}
115+
115116
.readme :deep([data-level='2']) {
116117
font-size: 1.25rem;
117118
padding-bottom: 0.5rem;
118119
border-bottom: 1px solid var(--border);
119120
}
121+
120122
.readme :deep([data-level='3']) {
121123
font-size: 1.125rem;
122124
}
125+
123126
.readme :deep([data-level='4']) {
124127
font-size: 1rem;
125128
}
129+
126130
.readme :deep([data-level='5']) {
127131
font-size: 0.925rem;
128132
}
133+
129134
.readme :deep([data-level='6']) {
130135
font-size: 0.875rem;
131136
}
@@ -137,9 +142,11 @@ function handleClick(event: MouseEvent) {
137142
.readme :deep(a) {
138143
@apply underline-offset-[0.2rem] underline decoration-1 decoration-fg/30 font-mono text-fg transition-colors duration-200;
139144
}
145+
140146
.readme :deep(a:hover) {
141147
@apply decoration-accent text-accent;
142148
}
149+
143150
.readme :deep(a:focus-visible) {
144151
@apply decoration-accent text-accent;
145152
}
@@ -318,10 +325,12 @@ function handleClick(event: MouseEvent) {
318325
border-inline-start-color: var(--syntax-str);
319326
background: rgba(59, 130, 246, 0.05);
320327
}
328+
321329
.readme :deep(blockquote[data-callout='note']::before) {
322330
content: var(--i18n-note, 'Note');
323331
color: #3b82f6;
324332
}
333+
325334
.readme :deep(blockquote[data-callout='note']::after) {
326335
background-color: #3b82f6;
327336
-webkit-mask: icon('i-lucide:info') no-repeat;
@@ -333,10 +342,12 @@ function handleClick(event: MouseEvent) {
333342
border-inline-start-color: #22c55e;
334343
background: rgba(34, 197, 94, 0.05);
335344
}
345+
336346
.readme :deep(blockquote[data-callout='tip']::before) {
337347
content: var(--i18n-tip, 'Tip');
338348
color: #22c55e;
339349
}
350+
340351
.readme :deep(blockquote[data-callout='tip']::after) {
341352
background-color: #22c55e;
342353
-webkit-mask: icon('i-lucide:lightbulb') no-repeat;
@@ -348,10 +359,12 @@ function handleClick(event: MouseEvent) {
348359
border-inline-start-color: var(--syntax-fn);
349360
background: rgba(168, 85, 247, 0.05);
350361
}
362+
351363
.readme :deep(blockquote[data-callout='important']::before) {
352364
content: var(--i18n-important, 'Important');
353365
color: var(--syntax-fn);
354366
}
367+
355368
.readme :deep(blockquote[data-callout='important']::after) {
356369
background-color: var(--syntax-fn);
357370
-webkit-mask: icon('i-lucide:pin') no-repeat;
@@ -363,10 +376,12 @@ function handleClick(event: MouseEvent) {
363376
border-inline-start-color: #eab308;
364377
background: rgba(234, 179, 8, 0.05);
365378
}
379+
366380
.readme :deep(blockquote[data-callout='warning']::before) {
367381
content: var(--i18n-warning, 'Warning');
368382
color: #eab308;
369383
}
384+
370385
.readme :deep(blockquote[data-callout='warning']::after) {
371386
background-color: #eab308;
372387
-webkit-mask: icon('i-lucide:triangle-alert') no-repeat;
@@ -378,10 +393,12 @@ function handleClick(event: MouseEvent) {
378393
border-inline-start-color: #ef4444;
379394
background: rgba(239, 68, 68, 0.05);
380395
}
396+
381397
.readme :deep(blockquote[data-callout='caution']::before) {
382398
content: var(--i18n-caution, 'Caution');
383399
color: #ef4444;
384400
}
401+
385402
.readme :deep(blockquote[data-callout='caution']::after) {
386403
background-color: #ef4444;
387404
-webkit-mask: icon('i-lucide:circle-alert') no-repeat;
@@ -457,4 +474,18 @@ function handleClick(event: MouseEvent) {
457474
white-space: nowrap;
458475
border-width: 0;
459476
}
477+
478+
/* Details element */
479+
.readme :deep(details) {
480+
/**
481+
* same size as [data-level='5']
482+
*/
483+
font-size: 0.925rem;
484+
color: var(--fg-subtle);
485+
486+
summary {
487+
font-size: 1rem;
488+
color: var(--fg-muted);
489+
}
490+
}
460491
</style>

0 commit comments

Comments
 (0)