Skip to content

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

Merged
sserrata merged 1 commit into
PaloAltoNetworks:mainfrom
port-labs:main
Jun 17, 2024
Merged

sserrata merged 1 commit into
PaloAltoNetworks:mainfrom
port-labs:main

Conversation

@hadar-co

Copy link
Copy Markdown

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
@github-actions

Copy link
Copy Markdown

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
sserrata pushed a commit that referenced this pull request Jun 18, 2024

This branch was previously deployed

1 inactive deployment
default — e72569f4 Deployed Jun 17, 2024 by hadar-co
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