Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

287
Visualizações
Why are the Styled Component CSS Styles I specified for a larger screen (1440px) overridden those I specified for lower screen(1280px)?
import styled from "styled-components";
import { devices } from "./devices";


export const HeaderContainer = styled.div`
  padding: 20px;
  @media ${devices.lg} {
    padding: 40px 90px;
  }
  @media ${devices.xl} {
    padding: 40px 215px 40px 150px;
  }
  @media ${devices.xxl} {
    padding: 40px 150px;
  }
`;

Also, it occurs in other components. Especially on Screens 1440px and 1280px.

This is what is seen, as indicated by the image below using the Chrome Dev Tool:

Screenshot from Chrome Dev Tool

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

In your screenshot, you are receiving an invalid property value warning for the below:

  @media ${devices.xl} {
    padding: 40px 215px, 40px, 150px;
  }

There should be no commas, as in the code you have shared in the snippet. If there are no commas in your code, perhaps a restart of the development server or a clear browser cache will solve your issue as it looks like it simply hasn't updated.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda