-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
gatsby build results in different CSS to that of gatsby develop #5734
Comments
It seems your Gatsby version is outdated. Can you try upgrading all of your packages (including the Emotion-related ones) and see if the problem persists? |
Updated all of my packages. Problem persists! Any other suggestions? |
Can you send a repo? Or a link to the built version of the site. |
Trash the 👉 Check out this past issue to see if it pertains to your problem: #4816 |
@calebsylvest I'll give that a try and I'll get back to you. I took a look at your deploy, and it's showing the same problem as before. The font-size property is not being set in the html selector as it should be. Compare the A screenshot of the inspector on your deploy, note there is no font-size property being set: |
@ylorenzana are you using Other ran into this too and someone from the team told me the plugin doesnt work. In my case you can see that for some reason when content is served from cache the "BodyGrid" class is missing and it breaks my rendering. There are other odd cases like this throughout. Generally if I clear the app cache and destroy the service worker the app will work on the next reload - then break again after that. |
@bradennapier my project was based on the gatsby-starter-blog package, apparently, it includes that plugin in the gatsby-config—I'll remove it from the config for the time being. Perhaps it should be mentioned in the README.md of the starter repo? Thanks for the tip! I moved around the css in my global stylesheet, and removed an empty selector I had forgotten about. This for some reason fixed the problem I was having, and the font-size is now being set properly for the production build. I'm not familiar with the bundling process of the prod build to have any idea of why this was happening, but thanks to everyone who took their time to help! |
Yea I also used that and i would not assume its fixed unless you remove offline ;-) just got done with 3 hours of dealing with it again when i added it back today haha |
Having same issue.
|
Same issue here. I didnt change anything, atleast I think. Now its just broken on deployment. Looks great on development mode, very frustrating. Probably will look at earlier commits to isolate thr problem. |
Any updates on this? Experiencing the same issue. |
Change ur code to look like this. height: calc(100% - #{$body_padding}) |
Having the same problem....super hard to figure out. |
Same issue — I've found that in some situations, it can be related to utilizing react fragments or not. But there are other situations where it just makes no sense why a certain class isn't getting applied. |
I had similar issue while conditionally trying to load a component based on the cookie value. Of course, this did not work as you have SSR on production (not sure why it works in dev mode though). Anyway, what I ended up doing is wrapping my check inside |
Hi, I'm running into same issue here @ylorenzana what did you do exactly ? |
Someone please help |
Same here! Any update on this? |
gatsby v1.1.45
node v9.8.0
When I run gatsby build, some styles from my global stylesheet (using emotion with injectGlobal) aren't rendering, specifically, the font-size property set to 62.5% in the html selector. I noticed this last night when deploying my site. I thought maybe there was some conflict in the css with specificity because I also use a normalize stylesheet (from npm), but this wasn't the case.
Site is based off of the gatsby-starter-blog-no-styles
Steps:
gatsby build
gatsby serve
Expected:
production build to look the same as my dev build
Actual:
prod. build has a very large font size—I use rem so pretty much everything in my site is 40% bigger
My global styles module:
edit: fixed backticks for code block
The text was updated successfully, but these errors were encountered: