Some styling in globals.css works in localhost but not when deployed.
Answered
English Angora posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
English AngoraOP
My site:https://mark-valentino.vercel.app/
My Repo:https://github.com/M-Valentino/M-Valentino_NextJS
The subheading class should make the font size a little bit large on desktop browsers but it doesn't. I've attached screenshots of what appears deployed and what appears on localhost.
component for the subheading:
I've tried clearing my cache too.
My Repo:https://github.com/M-Valentino/M-Valentino_NextJS
The subheading class should make the font size a little bit large on desktop browsers but it doesn't. I've attached screenshots of what appears deployed and what appears on localhost.
@media only screen and (min-width:429px) {
.linkCopied {
font-size: 14px;
}
.subHeading {
font-size: 34px;
}
}
@media only screen and (max-width:428px) {
.linkCopied {
font-size: 11px;
}
.subHeading {
font-size: 24px;
}
}
component for the subheading:
import React from "react";
import { Typography } from "@mui/material";
import { SHADOWS } from "@/consts/stylingValues";
export const MainHeading = ({ children, shrinkFontOn, addMarginBottomOn }) => {
return (
<Typography
variant={shrinkFontOn ? "h4" : "h3"}
fontWeight={600}
textAlign={"center"}
style={{
textShadow: SHADOWS.small,
marginBottom: !addMarginBottomOn ? 0 : 20,
}}
>
{children}
</Typography>
);
};
export const SubHeading = ({ children }) => {
return (
<Typography
className="subHeading"
color="text.primary"
style={{
marginBottom: 15,
textShadow: SHADOWS.minute,
fontWeight: "bolder",
textAlign: "center",
}}
>
{children}
</Typography>
);
};
I've tried clearing my cache too.
![Image](https://cdn.discordapp.com/attachments/1182247048104390737/1182247049249443940/Screenshot_2023-12-07_at_4.00.36_AM.png?ex=6584005d&is=65718b5d&hm=1e7935a7653aa4df29c016f084596c9b852f21e1e339081bc6b732eb7de6dc7a&)
![Image](https://cdn.discordapp.com/attachments/1182247048104390737/1182247049597558825/Screenshot_2023-12-07_at_4.01.20_AM.png?ex=6584005d&is=65718b5d&hm=48a9b7337bd75f3275c7cdd158b413ed6c12bf804bfbec38cf480fca9eeb5235&)
Answered by English Angora
I added !important in lines of css. I noticed the css not applying was with MUI components.
3 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
English AngoraOP
I'm doing a test to see if importing the stylesheet in the head will fix my issue.
it didnt work!
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
English AngoraOP
I added !important in lines of css. I noticed the css not applying was with MUI components.
Answer