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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website build gets unwanted styling changes/issues once deployed #4864

Closed
idontknowjs opened this issue May 28, 2021 · 4 comments
Closed

Website build gets unwanted styling changes/issues once deployed #4864

idontknowjs opened this issue May 28, 2021 · 4 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution external This issue is caused by an external dependency and not Docusaurus.

Comments

@idontknowjs
Copy link
Contributor

馃悰 Bug Report

I'm having a website, which looks absolutely fine when running it locally. But unwanted CSS wierd changes occur, whenever the website is deployed as well as the build is served, tested locally.

Have you read the Contributing Guidelines on issues?

Yes.

To Reproduce

  • Clone the specific branch: git clone --branch zowe-docs-v2 https://github.com/zowe/docs-site.git
  • Install dependencies: npm install
  • Start the server: npm start. Website looks as expected when viewed locally!
  • Stop the server and run npm run build
  • Serve the build locally: npm run serve. Now the website looks different - having unwanted changes in CSS of certain elements. Also happens when the [website is getting deployed]((https://60aae1b4e29832425469bf29--zowe-docs.netlify.app/).

Expected behavior

The website should look same after getting build as when viewed locally.

While viewing locally, the Zowe Docs text looks bold, font-weight is shown with a value 700 as in the image.

image

Actual Behavior

1. When inspecting the Zowe Docs element on the deployed version, the font-weight is getting value #700. Not just 700. That is the reason the text is not bold when viewing on deployed link. But looks bold when viewed locally.

image

2. While viewing any docs:

  • The navbar is not able to get correct z-index. When inspecting the navbar z-index: var(--ifm-z-index-fixed). But the final value of z-index is shown as #200. Which is not a valid z-index.
  • Badge, headings have similar font-weight issue.
  • Similar to navbar, the dropdown is getting z-index value as #100 - instead of just 100 when deployed.

image

3. Sidebar when toggled on smaller viewport overlaps with landing page.

Expected - when viewed locally vs when deployed:

image

Your Environment

@idontknowjs idontknowjs added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels May 28, 2021
@lex111
Copy link
Contributor

lex111 commented May 28, 2021

This is bug in one of our dependencies and has already been fixed. To get fix for this bug, you only need to completely reinstall dependencies of your site, by removing package-lock.json file and then run npm i.

@idontknowjs
Copy link
Contributor Author

Thank you, it worked! 馃殌

@slorber
Copy link
Collaborator

slorber commented Jun 2, 2021

@lex111 what dependency caused this issue? Noticed this on the Relay website too: https://relay.dev/docs/

@slorber
Copy link
Collaborator

slorber commented Jun 2, 2021

Nevermind just found the cssnano comment: #4826 (comment)

@Josh-Cena Josh-Cena added external This issue is caused by an external dependency and not Docusaurus. and removed status: needs triage This issue has not been triaged by maintainers labels Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution external This issue is caused by an external dependency and not Docusaurus.
Projects
None yet
Development

No branches or pull requests

4 participants