Giter Club home page Giter Club logo

Comments (9)

einazare avatar einazare commented on May 24, 2024

Hello there, @itportal24 ,

Thank you for your interest in working with our products.
I've searched for the bug, and I believe it comes from the Parallax component. For some reason, when NextJS bundles the styles, it adds the Parallax styles on the Main component as well.
At the moment I honestly do not know what the fix could be other than:

  1. Go inside assets/jss/nextjs-material-kit-pro/pages/presentationStyle.js
  2. Change the following code:
  main: {
    ...main

To

  main: {
    ...main
    overflow: initial !important;
    height: 100% important;
    background-position: unset !important;

Let me know if this solved your issue.

Best,
Manu

from ct-nextjs-material-kit-pro.

itportal24 avatar itportal24 commented on May 24, 2024

Hi, thanks for the quick reply.

While the components are now displayed in Safari, the header image is now gone on all Browsers/Devices. I don't know if its because the image is missing, but the parallax effect is also gone.

2019-12-07-153908_1920x1080_scrot

This is the code I applied, because your suggested changes are not exactly valid jss.

 main: {  
    ...main,  
    overflow: "initial !important",  
    height: "100% !important",  
    backgroundPosition: "unset !important"  
  }  

from ct-nextjs-material-kit-pro.

einazare avatar einazare commented on May 24, 2024

Hello again, @itportal24 ,

What do you mean that the mage is missing?
Did you delete it?

Best,
Manu

from ct-nextjs-material-kit-pro.

itportal24 avatar itportal24 commented on May 24, 2024

I reinstalled from scratch out of the .zip Archive and applied your suggested fix again.
Image is now shown and the components are displayed.

BUT:
On Safari Mobile there is now a grey bar on the top of the site where you can see the background.
Please have a look at the deployment.


I could invite you to the gitlab repo if that helps.

from ct-nextjs-material-kit-pro.

einazare avatar einazare commented on May 24, 2024

Hello again, @itportal24 ,

I've tested your link on an iPhone Safari and on a Mac Safari.
It seems to me that the image appears on both devices.
Can you please send me a screenshot?

Best,
Manu

from ct-nextjs-material-kit-pro.

itportal24 avatar itportal24 commented on May 24, 2024

Hi,
What I meant was, that the picture is now showing but it is not aligned to the top.
There is a small stripe on top. This is only happening is Safari.
I would suspect its from the parallax, something which is not canceld out by your fix?

from ct-nextjs-material-kit-pro.

einazare avatar einazare commented on May 24, 2024

Hello again, @itportal24 ,

Really sorry about this, didn't notice it before.
Please go inside assets/jss/nextjs-material-kit-pro/components/parallaxStyle.js and at line 24 add the following code:

,
    marginTop: "0!important"

Let me know if you have further issues.

Best,
Manu

from ct-nextjs-material-kit-pro.

itportal24 avatar itportal24 commented on May 24, 2024

You are not fusing Material-UI and NextJS together the right way.
Have a look at https://github.com/mui-org/material-ui/tree/master/examples/nextjs
Most importantly you are not removing the Serversheets:

// _app.js
componentDidMount() {
    // Remove the server-side injected CSS.
    const jssStyles = document.querySelector('#jss-server-side');
    if (jssStyles) {
      jssStyles.parentElement.removeChild(jssStyles);
    }
  }

This is why there css-classes which have the same name, but different styles.
Where Firefox/Chrome mostly just use the latest class they see, Safari will default back to User-Agent-Style.

After I changed everything to match the example, everything is working now.

from ct-nextjs-material-kit-pro.

mlasy avatar mlasy commented on May 24, 2024

Hey @itportal24 i'm experiencing the same issue, been trying for a week now but couldnt get it fixed.
I tried the SSR as described here https://material-ui.com/de/guides/server-rendering/
But it didnt work.
Could you provide a link with how you exactly solved it?

from ct-nextjs-material-kit-pro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.