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

267
Visualizações
In Tailwind's config, what is the difference between adding properties to theme VS theme.extend?

Tailwind's documentation on its configuration makes multiple uses of the extend property, but doesn't clarify the difference of making customizations on the theme property VS the theme.extend property.

module.exports = {
  content: ['./src/**/*.{html,js}'],
  theme: {
    colors: {
      'blue': '#1fb6ff',
      'purple': '#7e5bef',
      'pink': '#ff49db',
    },
    extend: {
      spacing: {
        '8xl': '96rem',
        '9xl': '128rem',
      },
    }
  },
}

What is the difference here? I've tested and it's possible to switch the colors and spacing properties around and they still work.

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

0

It's pretty easy, extend extends default theme, while not using extend will completely override default theme for that property.

So in your example you will only have 3 colors in total, because all the default ones will be overridden.

But the spacing will be extended with additional values while preserving defaults too.

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