1515 --ddoc-selection-selected-border-color : # 2564eb ;
1616 --ddoc-selection-selected-bg : # 056cf00c ;
1717 --ddoc-selection-padding : 9px 15px ;
18+ --ddoc-usage-active-bg : # ebf6ff ;
19+
20+ & : is (.dark * ) {
21+ --ddoc-usage-active-bg : theme ("colors.stone.800" );
22+ }
1823}
1924
2025.link {
6368.docEntry {
6469 @apply mb-4 space-y-2;
6570
71+ & : hover .sourceButton {
72+ @apply flex;
73+ }
74+
6675 .docEntryHeader {
6776 @apply flex justify-between items-start md:text-base;
6877
7988 @apply space-y-2;
8089
8190 > h2 {
82- @apply text-xl leading-6 font-semibold py-1 mb-0 ;
91+ @apply text-xl leading-6 font-semibold py-1 mb-4 ;
8392 }
8493
8594 /* markdown */
9099}
91100
92101.namespaceSection {
93- @apply space-y-4 mt-4 max-w-prose;
102+ @apply space-y-3 mt-4 max-w-prose;
94103
95104 .namespaceItem {
96105 @apply flex gap-x-2.5 md:min-h-[4rem ] lg:pr-4 min-h-0;
@@ -112,12 +121,12 @@ a {
112121 }
113122
114123 .namespaceItemContent {
115- > a , . namespaceItemContentSubItems a {
116- @apply underline decoration-stone-300 dark:decoration-stone-500 ;
124+ flex : 1 ;
125+ width : 0 ;
117126
118- & : hover {
119- @apply no- underline;
120- }
127+ > a , . namespaceItemContentSubItems a {
128+ @apply underline decoration-stone-300 dark:decoration-stone-500
129+ hover:no-underline;
121130 }
122131
123132 > a {
146155 article {
147156 @apply space-y-5;
148157
149- > div : first-child {
158+ . symbolTitle {
150159 @apply flex justify-between items-start;
151160
161+ & : hover .sourceButton {
162+ @apply flex;
163+ }
164+
152165 > div : first-child {
153166 @apply font-medium space-y-1;
154167 }
160173 @apply inline-flex justify-end shrink-0;
161174
162175 div {
163- @apply rounded-full size-5 font-medium text-xs leading-5 text-center
176+ @apply rounded-full size-4 font-medium text-xs leading-4 text-center
164177 align-middle shrink-0 select-none font-mono;
165178 }
166179
@@ -295,20 +308,30 @@ a {
295308 dark:border-gray-600 dark:bg-gray-800;
296309
297310 > code : first-child {
298- @apply py -2 px-3 ;
311+ @apply pt -2 pr-10 pb-2 pl-2 ;
299312 scrollbar-width : thin;
300313 }
301314
302- .context_button {
303- @apply top-1 right-2 opacity-0 hidden ;
315+ .copyButton {
316+ @apply top-1 right-2 opacity-0;
304317 }
305318
306- & : hover .context_button {
307- @apply opacity-100 block ;
319+ & : hover .copyButton {
320+ @apply opacity-100;
308321 }
309322 }
310323}
311324
325+ pre .highlight {
326+ .copyButton {
327+ @apply absolute opacity-0 top-3 right-4;
328+ }
329+
330+ & : hover .copyButton {
331+ @apply opacity-60 hover:opacity-100;
332+ }
333+ }
334+
312335# categoryPanel {
313336 @apply pt-3 text-sm;
314337
@@ -346,15 +369,25 @@ a {
346369 }
347370}
348371
349- .context_button {
350- @apply z-10 rounded p-1.5 cursor-pointer border bg-inherit hover:bg-stone-200
351- leading-[0 ] dark:bg-inherit dark:hover:bg-stone-800;
352- }
353-
354372.see {
355373 @apply list-disc list-inside;
356374
357375 > li * {
358376 display : inline-block;
359377 }
360378}
379+
380+ .sourceButton , .copyButton {
381+ @apply z-10 rounded no-underline p-1.5 cursor-pointer bg-inherit
382+ hover:bg-stone-200 leading-[0 ] dark:hover:bg-stone-800 transition
383+ duration-75;
384+ }
385+
386+ .sourceButton {
387+ @apply flex-row gap-2 items-center relative mr-2 hidden;
388+
389+ & : before {
390+ content : "View code" ;
391+ @apply hidden md:block text-xs leading-none;
392+ }
393+ }
0 commit comments