1. Curso de HTML / CSS
  2. /
  3. CSS
  4. /
  5. CSS - Propiedades, maquetando texto
1 / 1

CSS - Propiedades, maquetando texto

Propiedades

outline

Accesibilidad, no lo quitéis: outline: solid;

aspect-ratio

.post { aspect-ratio: 16 / 9 }

line-height

line-height: 1.15; // para titulos line-height: 1.45; // para textos, entre 1.45 y 1.65

text-indent

text-indent: 1.5rem

letter-spacing

letter-spacing: .2rem;

Quotes

quotes: "«" "»" "‹" "›";

writing-mode

writing-mode: horizontal-tb | vertical-lb | vertical-lr;

overflow + line-clamp

overflow: visible | hidden | scroll | auto;

line-clamp: 3; // numero de líneas a mostrar

.elipsis-completo {
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
}

word-break e hyphens

hyphens: none | manual | auto;
word-break: break-all | normal | keep-all | break-word;
.completo {
  overflow-wrap: break-word;
  hyphens: manual;
}

Para profundizar, el libro Better web typography for a better web es lo mejor que he leído al respecto. Muy bueno. De Matej Latin