Embelezar CSS

Ajusta recuos e formatação do código; não substitui testes de execução.

Entrada: TextoResultado: Texto

Entrada de texto

Opções

Exemplos

Read a responsive two-column card layout

Entrada

.cards{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}@media(max-width:40rem){.cards{grid-template-columns:1fr}}

Expected answer

.cards{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:1rem
}
@media(max-width:40rem){
  .cards{
    grid-template-columns:1fr
  }
}
Indentar string
Inspect focus styles without losing the attribute selector

Entrada

button[data-state="open"]:focus-visible{outline:2px solid #005fcc;outline-offset:3px}

Expected answer

button[data-state="open"]:focus-visible{
    outline:2px solid #005fcc;
    outline-offset:3px
}
Indentar string
Trace a custom property through a dark-mode override

Entrada

:root{--surface:#fff;--ink:#111}.dark{--surface:#111;--ink:#fff}.panel{background:var(--surface);color:var(--ink)}

Expected answer

:root{
	--surface:#fff;
	--ink:#111
}
.dark{
	--surface:#111;
	--ink:#fff
}
.panel{
	background:var(--surface);
	color:var(--ink)
}
Indentar string
Separate the steps of an opacity animation

Entrada

@keyframes fade{0%{opacity:0}50%{opacity:.5}100%{opacity:1}}

Expected answer

@keyframes fade{
  0%{
    opacity:0
  }
  50%{
    opacity:.5
  }
  100%{
    opacity:1
  }
}
Indentar string
Read a print rule that hides navigation

Entrada

/* Paper copy */@media print{nav,.toolbar{display:none}a{color:#000;text-decoration:underline}}

Expected answer

/* Paper copy */
@media print{
    nav,.toolbar{
        display:none
    }
    a{
        color:#000;
        text-decoration:underline
    }
}
Indentar string

Parâmetros

ParâmetroValor padrãoEntrada e opções
Indentar string"\\t"Sequências de escape como \n, \r e \t são aceitas

Ferramentas relacionadas

Organização de código

Referência da operação

Ver a documentação técnica original (English)