镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

docs: load WordPress global styles in the tutorial's blocks step - #2708

Open
josephfusco wants to merge 5 commits into
canaryfrom
docs/2705-tutorial-global-styles
Open

josephfusco wants to merge 5 commits into
canaryfrom
docs/2705-tutorial-global-styles

Conversation

@josephfusco

@josephfusco josephfusco commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Fixes #2705

Tested in a local copy of the tutorial app (WordPress 7.1.3, Twenty Twenty-Five, @faustwp/cli 3.6.0): before this step the paragraph's font size, padding and margin computed to 16px / 0 / 0; after running the command and adding the import they match the editor (large preset, 10px/30px, 50px). Borders already show either way because the app's Tailwind base styles set border-style.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Assisting with checking the CLI and WordPress sources behind each claim, editing the tutorial, and testing it end to end in a local tutorial app.

The tutorial said Faust loads the CSS for block styles, but nothing in
it did, so font sizes and spacing set in the editor had no effect.
WordPress sets border-style for inline border widths in its block
library CSS, not the global stylesheet, so a border set in the editor
still won't show after this step. Point to the getStyles reference for
adding the block library styles.
Readers set margin in the editor too, and its spacing presets come from
the same global stylesheet as padding.
@josephfusco josephfusco added [Type] Documentation Documentation to be added or enhanced [Area] CLI Issues for the @faustwp/cli package [Area] Blocks Issues for the @faustwp/blocks package labels Oct 27, 2026
@josephfusco
josephfusco marked this pull request as ready for review October 27, 2026 15:52
@josephfusco
josephfusco requested review from a team and colinmurphy as code owners October 27, 2026 15:52
The tutorial app's Tailwind base styles already set border-style, so
the border shows before and after this step. Tested in a local copy of
the tutorial app: font size, padding and margin apply only once the
global stylesheet is imported.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The documented command and import match the CLI behavior and tutorial structure, with no unresolved issues.

No open issues 🎉

What changed in this PR

Updates the Learn Faust blocks tutorial to explicitly load WordPress global styles, addressing #2705’s missing paragraph styling.

Changes:

  • Corrects the claim that Faust automatically loads the required CSS.
  • Adds the stylesheet-generation command and _app.js import.
  • Explains when to regenerate the stylesheet after theme or Site Editor changes.
File Description
docs/​tutorial/​learn-faust/​index.md Adds global stylesheet setup and clarifies how block styling is applied.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Blocks Issues for the @faustwp/blocks package [Area] CLI Issues for the @faustwp/cli package [Type] Documentation Documentation to be added or enhanced

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Learn Faust tutorial: Blocks step says Faust loads block CSS, but no WordPress styles are applied

2 participants