Skip to content

Conversation

crisbeto
Copy link
Member

Currently we style the content in the docs by setting a docs-markdown class around it which then targets element tags that can be produced by the markdown renderer like p and h1. The problem with this is that some components use these elements for their own styling, e.g. the main mat-card example looks off because its p tag styling is overridden by docs-markdown.

These changes update the docs generation script to exclude the component styles from the markdown styles.

Example of the card docs now:
image

After the changes:
image

@crisbeto crisbeto requested a review from a team as a code owner June 14, 2025 08:53
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Jun 14, 2025
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Jun 14, 2025
Currently we style the content in the docs by setting a `docs-markdown` class around it which then targets element tags that can be produced by the markdown renderer like `p` and `h1`. The problem with this is that some components use these elements for their own styling, e.g. the main `mat-card` example looks off because its `p` tag styling is overridden by `docs-markdown`.

These changes update the docs generation script to exclude the component styles from the markdown styles.
@crisbeto crisbeto force-pushed the docs-paragraph-style branch from 9d2f82b to e54429a Compare June 14, 2025 08:55
@crisbeto crisbeto requested a review from andrewseguin June 14, 2025 08:55
@crisbeto crisbeto removed the request for review from a team June 14, 2025 11:53
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jun 14, 2025
@crisbeto crisbeto merged commit c771a01 into angular:main Jun 14, 2025
24 of 25 checks passed
@crisbeto
Copy link
Member Author

The changes were merged into the following branches: main, 20.0.x

crisbeto added a commit that referenced this pull request Jun 14, 2025
Currently we style the content in the docs by setting a `docs-markdown` class around it which then targets element tags that can be produced by the markdown renderer like `p` and `h1`. The problem with this is that some components use these elements for their own styling, e.g. the main `mat-card` example looks off because its `p` tag styling is overridden by `docs-markdown`.

These changes update the docs generation script to exclude the component styles from the markdown styles.

(cherry picked from commit c771a01)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants