Skip to content

Commit ef6bc93

Browse files
committed
perf(docs): add static highlighting and deferred hydration variants
1 parent c687125 commit ef6bc93

19 files changed

Lines changed: 4157 additions & 8 deletions

File tree

docs/api-reference/special_events.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ Set the specified text content to the clipboard.
7979
rx.button(
8080
'Copy "Hello World" to clipboard',
8181
on_click=rx.set_clipboard("Hello World"),
82+
custom_attrs={
83+
"data-reflex-prehydrate-action": "copy-text",
84+
"data-reflex-copy-text": "Hello World",
85+
},
8286
)
8387
```
8488

docs/app/assets/tailwind-theme.css

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33

44
@custom-variant dark (&:where(.dark, .dark *));
55

6+
.dark .static-shiki .shiki {
7+
color: var(--shiki-dark) !important;
8+
background-color: var(--shiki-dark-bg) !important;
9+
font-style: var(--shiki-dark-font-style) !important;
10+
font-weight: var(--shiki-dark-font-weight) !important;
11+
text-decoration: var(--shiki-dark-text-decoration) !important;
12+
}
13+
14+
.dark .static-shiki .shiki span {
15+
color: var(--shiki-dark) !important;
16+
background-color: transparent !important;
17+
font-style: var(--shiki-dark-font-style) !important;
18+
font-weight: var(--shiki-dark-font-weight) !important;
19+
text-decoration: var(--shiki-dark-text-decoration) !important;
20+
}
21+
622
:root {
723
/* Primary */
824
--primary-1: var(--violet-1);
@@ -2184,4 +2200,4 @@
21842200

21852201
#ph-conversations-widget-container button[aria-label^="Open chat"]+div {
21862202
display: none !important;
2187-
}
2203+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""Docs-only deferred hydration experiment."""
2+
3+
from ._plugin import DeferredHydrationPlugin, deferred_hydration_plugins
4+
5+
__all__ = ["DeferredHydrationPlugin", "deferred_hydration_plugins"]

0 commit comments

Comments
 (0)