La propiedad CSS text-emphasis-color
(que podría traducirse como color del texto con énfasis) define el color de las marcas de énfasis. Este valor también puede definirse usando el atajo text-emphasis
/* Valor inicial*/
text-emphasis-color: currentColor;
/* <color> */
text-emphasis-color: #555;
text-emphasis-color: blue;
text-emphasis-color: rgba(90, 200, 160, 0.8);
text-emphasis-color: transparent;
/* Valores globales */
text-emphasis-color: inherit;
text-emphasis-color: initial;
text-emphasis-color: unset;
Valor inicial | currentcolor |
---|---|
Applies to | all elements |
Heredable | no |
Valor calculado | computed color |
Animation type | a color |
Sintáxis
Valores
<color>
- Define el color de las marcas de énfasis. Si ningún color es declarado, el color por defecto es
currentColor
(color actual).
Sintáxis Formal
<color>where
<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>
where
<rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )
<rgba()> = rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )
<hsl()> = hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )
<hsla()> = hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <hue>, <percentage>, <percentage>, <alpha-value>? )where
<alpha-value> = <number> | <percentage>
<hue> = <number> | <angle>
Ejemplos
CSS
h3 {
text-emphasis-color: #555;
text-emphasis-style: "*";
}
HTML
<p>Este es un ejemplo:</p>
<h3>Esto está marcado con énfasis!</h3>
Resultado
Ejemplo incrustado en vivo
Especificaciones
Especificaciones | Estado | Comentario |
---|---|---|
CSS Text Decoration Module Level 3 La definición de 'text-emphasis' en esta especificación. |
Candidate Recommendation | Initial definition |
Compatibilidad de Navegadores
BCD tables only load in the browser
Ver También
- El tipo de dato
<color>
. - Las otras propiedades de marcas de énfasis relacioanadas:
text-emphasis-style
,text-emphasis
, ytext-emphasis-position
. - Otras propiedades relacionadas al color:
color
,background-color
,border-color
,outline-color
,text-emphasis-color
,text-shadow
,caret-color
, ycolumn-rule-color
- Aplicando color a los elementos HTML utilizando CSS.