Add support and styling for custom <callout-box> HTML tags#4264
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces built-in CSS styling and support for a custom <example> HTML tag to display highlighted code examples. The reviewer feedback recommends renaming the custom element to include a hyphen (e.g., <dartdoc-example>) to comply with the HTML specification. Additionally, the reviewer suggests centralizing theme variables by using a CSS custom property --example-bg-color and advises regenerating the lib/resources/styles.css file using the project's task runner instead of editing it manually.
jonasfj
approved these changes
Jul 1, 2026
sigurdm
approved these changes
Jul 2, 2026
sigurdm
left a comment
Contributor
There was a problem hiding this comment.
Would be cool with a screenshot in the PR description.
Contributor
Author
|
Fixes #4243 |
This was referenced Jul 6, 2026
auto-submit Bot
pushed a commit
to flutter/packages
that referenced
this pull request
Jul 9, 2026
…12120) ## Background [Dartdoc 9.0.7](dart-lang/dartdoc#4264) added support for `<callout-box>` (what we used to call the _blue container_). ## What's changed This PR migrates all should-be Dartpad instances in API docs to `<callout-box>`. This is what it looks like: <img width="722" height="640" alt="image" src="https://github.com/user-attachments/assets/c508c8b1-9b97-4500-9aea-cf2bce81df0a" /> This PR also disables `unintended_html_in_doc_comment` because `<callout-box>` is not recognized by the linter for now. An issue has been filed: dart-lang/sdk#63782 ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
auto-submit Bot
pushed a commit
to flutter/packages
that referenced
this pull request
Jul 11, 2026
…12146) ## Background [Dartdoc 9.0.7](dart-lang/dartdoc#4264) added support for `<callout-box>` (what we used to call the _blue container_). ## What's changed This PR migrates all former snippet instances in API docs to `<callout-box>`. This is what it looks like: <img width="734" height="302" alt="image" src="https://github.com/user-attachments/assets/cd0bd77c-4ab2-4875-8fbe-e838e0902c16" /> This PR also disables `unintended_html_in_doc_comment` because `<callout-box>` is not recognized by the linter for now. An issue has been filed: dart-lang/sdk#63782 ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.