You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify how custom CSS files are loaded and how to use custom class names in MDX, based on recurring confusion in the theme customization assistant bucket.
Changes
Rewrite the intro of the "Add custom CSS" section in customize/custom-scripts.mdx to state explicitly that any .css file in the content directory is automatically included on every page (mirroring the existing behavior documented for .js files).
Add a short example showing how to define a class in a .css file and use it via className in an MDX file.
Note that custom classes can be combined with Tailwind CSS classes on the same element.
Context
Assistant conversations in the theme customization bucket showed users unsure whether custom CSS files are auto-loaded and how to reference custom class names from MDX. The behavior existed but was not spelled out on the page.
Note
Low Risk
Documentation-only updates to the custom scripts guide; no product or runtime behavior changes.
Overview Add custom CSS in customize/custom-scripts.mdx (and es, fr, zh locales) is expanded so readers know how .css files are picked up and how to use custom classes in MDX.
The section now states that any .css file under the content directory is automatically included on every page, the same way as custom .js files, with no import in docs.json or MDX. It adds steps to place a file such as style.css at any depth in the content tree, a .my-callout CSS + className MDX example, and a note that custom classes can be mixed with Tailwind on one element.
Reviewed by Cursor Bugbot for commit 5f12269. Bugbot is set up for automated code reviews on this repo. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Clarify how custom CSS files are loaded and how to use custom class names in MDX, based on recurring confusion in the theme customization assistant bucket.
Changes
customize/custom-scripts.mdxto state explicitly that any.cssfile in the content directory is automatically included on every page (mirroring the existing behavior documented for.jsfiles)..cssfile and use it viaclassNamein an MDX file.Context
Assistant conversations in the theme customization bucket showed users unsure whether custom CSS files are auto-loaded and how to reference custom class names from MDX. The behavior existed but was not spelled out on the page.
Note
Low Risk
Documentation-only updates to the custom scripts guide; no product or runtime behavior changes.
Overview
Add custom CSS in
customize/custom-scripts.mdx(and es, fr, zh locales) is expanded so readers know how.cssfiles are picked up and how to use custom classes in MDX.The section now states that any
.cssfile under the content directory is automatically included on every page, the same way as custom.jsfiles, with no import indocs.jsonor MDX. It adds steps to place a file such asstyle.cssat any depth in the content tree, a.my-calloutCSS +classNameMDX example, and a note that custom classes can be mixed with Tailwind on one element.Reviewed by Cursor Bugbot for commit 5f12269. Bugbot is set up for automated code reviews on this repo. Configure here.