Pular para o conteúdo
Skillpedia
Sites e telas (frontend)75 mil · #2848

flexbox-patterns

O que ela faz

Esta skill revisa código CSS de flexbox em busca de erros comuns que quebram layouts. É para desenvolvedores que montam layouts de página com flex.

Quando usar

  • ✓Quando o texto transborda ou é cortado dentro de uma linha flex.
  • ✓Quando o espaçamento entre itens flex é irregular ou difícil de controlar.
  • ✓Quando os itens encolhem ou crescem de um jeito que você não pretendia.

Link da skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/flexbox-patterns/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/flexbox-patterns/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Você pode verificar meu CSS de flexbox em busca de erros que quebram o layout?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente procura configurações de flex que causam problemas de encolhimento ou transbordamento, e margens usadas onde gap funcionaria melhor. Ele sugere valores corrigidos e uma correção de min-width quando necessário.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

Apply Flexbox best practices

Flexbox is one of the most used CSS features, but its unintuitive default values (flex-shrink:1, min-width:auto) cause layout bugs that are hard to diagnose. Understanding the flex shorthand and the min-width:0 fix prevents the most common Flexbox breakage scenarios.

Quick Reference

  • Flexbox is for one-dimensional layouts (a row OR a column)
  • Use flex: 1 1 0 (shorthand: flex:1) for equal-width items that fill space
  • Add min-width: 0 to flex children when text overflow truncation doesn't work
  • Use gap instead of margin for spacing between flex items

Check

Review this CSS for common Flexbox mistakes: missing min-width:0 on text-containing flex children, using margin instead of gap for spacing, and improper flex shorthand usage.

Fix

Fix the Flexbox layout issues: add min-width:0 where needed, replace inter-item margins with gap, and correct flex shorthand values.

Explain

Explain how flex-grow, flex-shrink, and flex-basis work, what the flex shorthand means, and why min-width:0 fixes text overflow in flex layouts.

Code Review

Review stylesheets, component styles, and responsive states related to Apply Flexbox best practices. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/css/flexbox-patterns

Perguntas frequentes

Por que o texto transborda em layouts flex?

Itens flex têm uma largura mínima padrão que pode impedir o texto de encolher, e a skill sugere definir min-width como 0 para corrigir.

Devo usar gap ou margin?

A skill recomenda gap para o espaçamento entre itens flex.

O que significa flex 1?

A skill explica que é uma forma abreviada para itens que dividem igualmente o espaço disponível.

Detalhes

Descrição original do autor

Use when reviewing stylesheets, component styles, and responsive behavior related to Apply Flexbox best practices. Check the rendered layout across breakpoints and interaction states before proposing a fix.

repo: thedaviddias/Front-End-Checklist

Popularidade

Estrelas no GitHub
75 mil
Posição no ranking
#2848
Licença
MIT
Atualizada em
31/10/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas