Refine getting-started docs typography and preview styling#1818
Refine getting-started docs typography and preview styling#1818
Conversation
Tighten docs layout, typography, and preview containers so the Getting Started pages feel closer to modern docs aesthetic: - Headings: size down (h1 lg:5xl→4xl, h2 lg:4xl→3xl, etc.), font-semibold, reduce gap/mb from 6→2/3 - Body text: font-[475] → font-normal for clearer hierarchy - Content column: widen 42rem→52rem and 56rem→64rem - Right sidebar: show only at 2xl (was xl) so docs breathe at mid widths - Navbar tabs: visible from md: (was xl:) so tabs stay on screen earlier - Sidebar order: Installation before Introduction under Getting Started - docgen section/tabs renderers: cleaner typography, pill-style tabs, proper gap + padding inside sections - Tailwind theme: pill-tab/pill-tab-list classes, slate-tinted inline code override, copy button reveal on hover with "Copy" label, softer borders/radii Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR tightens docs typography (smaller headings, lighter body weight, reduced gaps), widens the content column, shifts sidebar breakpoints for better mid-width readability, reorders Getting Started to show Installation first, and introduces pill-style tabs with a hover-reveal copy button for code blocks. Confidence Score: 5/5Safe to merge after removing the extra blank line that will break pre-commit. All findings are P2 — one trivial blank-line removal to pass Ruff E303, and two CSS observations (pointer-events !important consistency, top/right positioning relying on Reflex library CSS). No logic bugs or data integrity issues. pcweb/flexdown.py (extra blank line) and assets/tailwind-theme.css (pointer-events consistency, verify top/right positioning). Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Markdown / Flexdown source] --> B[flexdown.py SectionBlock]
A --> C[docgen_pipeline.py\nReflexDocTransformer]
B --> D[rx.el.div\npill-style section layout]
C --> E[_render_tabs\npill-tab / pill-tab-list]
C --> F[_render_section\nrx.el.div + CSS vars]
D --> G[docpage template]
E --> G
F --> G
G --> H{Screen width}
H -->|>= 2xl 1536px| I[Content + Right sidebar\nmax-w-52rem]
H -->|lg to 2xl| J[Content only\nmax-w-52rem, sidebar hidden]
H -->|md to lg| K[Content + full navbar tabs\nno hamburger]
H -->|< md| L[Content + hamburger menu]
G --> M[tailwind-theme.css]
M --> N[pill-tab-list / pill-tab styles]
M --> O[Hover-reveal copy button\n::after content Copy]
M --> P[rt-Code slate override]
Reviews (1): Last reviewed commit: "refine getting-started docs typography a..." | Re-trigger Greptile |
|
|
||
|
|
||
|
|
||
| class DefinitionBlock(flexdown.blocks.Block): |
There was a problem hiding this comment.
Extra blank line will fail Ruff E303
Three blank lines between top-level class definitions violates PEP 8's E303 rule (max 2 allowed), which Ruff enforces. This will cause uv run pre-commit run --all-files to fail, as listed in the test plan.
| class DefinitionBlock(flexdown.blocks.Block): | |
| ) | |
| class DefinitionBlock(flexdown.blocks.Block): |
| pointer-events: none; | ||
| display: inline-flex !important; | ||
| align-items: center !important; | ||
| gap: 0.375rem !important; | ||
| font-size: 0.8125rem !important; | ||
| font-weight: 500 !important; | ||
| color: var(--c-slate-11) !important; | ||
| top: 8px !important; | ||
| right: 12px !important; | ||
| padding: 6px 8px !important; | ||
| } | ||
|
|
||
| .code-block button::after, | ||
| .code-block > button::after { | ||
| content: "Copy"; | ||
| } | ||
|
|
||
| .code-block:hover button, | ||
| .code-block:hover > button, | ||
| .code-block button:focus-visible { | ||
| opacity: 1 !important; | ||
| pointer-events: auto; |
There was a problem hiding this comment.
pointer-events inconsistency may allow invisible button clicks
Every adjacent property in this block uses !important, but pointer-events: none and pointer-events: auto do not. If any other rule in the cascade applies pointer-events: all !important (e.g. from Radix or a utility class), the hidden button (opacity: 0) becomes clickable when the code block is not hovered, silently accepting keyboard/mouse events without any visual feedback.
Add !important to both declarations to match the surrounding rules.
| color: var(--c-slate-11) !important; | ||
| top: 8px !important; | ||
| right: 12px !important; | ||
| padding: 6px 8px !important; |
There was a problem hiding this comment.
top/right offsets are inert without position
top: 8px and right: 12px only take effect on positioned elements (absolute, fixed, sticky, or relative). No position property is set anywhere on .code-block button in this stylesheet, so these values will be silently ignored unless Reflex's library CSS already applies position: absolute to the copy button. If that guarantee doesn't hold, the button won't be correctly pinned to the top-right corner of the code block.
masenf
left a comment
There was a problem hiding this comment.
These changes should go in reflex-dev/reflex in docs/app I believe.
This whole repo should have been in public archive, I think it came out of archive because Tom needed a special deploy or something.
Summary
2xl:so mid-width screens get room to readmd:(wasxl:) so they don't collapse to a burger at medium widthsrx.el.divlayouts, pill-style tabs (pill-tab/pill-tab-list), consistent gap + paddingrt-Code, hover-reveal copy button with "Copy" label, softer bordersTest plan
/docs/getting-started/introduction,/installation,/basics,/dashboard-tutorial— verify headings/body typography feels tighter, content column is widermd:, right sidebar hides below2xl:, hamburger only at<md:\like this``) renders with slate color, not purple accentuv run reflex compilesucceedsuv run pre-commit run --all-filespasses🤖 Generated with Claude Code