Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - @theme/ApiItem causes undesired website-wide style changes #839

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

hadar-co
Copy link

Description

Adding docItemComponent: "@theme/ApiItem" in the docusaurus config causes undesired behavior in the website, including pages that are completely unrelated to the api.

After investigation, it seems that the main div in each page is missing the markdown classname, causing the following changes in all pages of the site:

  1. My h2 headers change size.
  2. My h2 headers' margins change.

If I inspect the page, and add the markdown classname to the div, the original styling is applied and all is good.

Motivation and Context

This issue affects the styling of the entire docusaurus website, including pages that are unrelated to the api.

How Has This Been Tested?

Tested using Docusaurus V3, using the latest V3 beta of this library.

Screenshots

Here is what the site looks like without the library:
Screenshot 2024-05-22 at 14 21 56


Here is what the site looks like with the library (note the changed header size and missing margin-top):
Screenshot 2024-05-22 at 14 21 13

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

@hadar-co hadar-co changed the title Update index.tsx Fix - @theme/ApiItem causes undesired website-wide style changes Jun 17, 2024
Copy link

Visit the preview URL for this PR (updated for commit e72569f):

https://docusaurus-openapi-36b86--pr839-etum35uy.web.app

(expires Wed, 17 Jul 2024 18:04:19 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@sserrata sserrata merged commit 1de79c0 into PaloAltoNetworks:main Jun 17, 2024
14 checks passed
sserrata pushed a commit that referenced this pull request Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants