Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

112
Vistas
Minimum Margin in Tailwind

Is there a way to do a minimum margin in tailwind similar to w-min, I can't find it in the docs. I am looking for the margin to be 1/5 of the screen but a minimum of 12 (units).

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can use arbitary values to specify the max() value.

e.g.) According to your spec, 1/5 of the screen is 20vw (or 20vh for height). and 12 units (guessing in pixels?) as 12px.

If you do, mx-[max(20vw,12px)], it will generate the following rule,

.mx-\[max\(20vw\2c 12px\)\] {
  margin-left: max(20vw,12px);
  margin-right: max(20vw,12px);
}

max() lets you choose whichever is bigger.
So if 20vw is less than 12px, then 12px margin will be used, and vice versa.

You can use all variations of margin utilities such as m-*, my-*, m[lrtb]-* as well.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda