text-emphasis-color
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()> | (en-US) <rgba()> | (en-US) <hsl()> | (en-US) <hsla()> | (en-US) <hex-color> | (en-US) <named-color> | (en-US) currentcolor | (en-US) <deprecated-system-color>
where
<rgb()> = rgb( <percentage>{ (en-US)3} (en-US) [ (en-US) / <alpha-value> ] (en-US)? (en-US) ) | (en-US) rgb( <number>{ (en-US)3} (en-US) [ (en-US) / <alpha-value> ] (en-US)? (en-US) ) | (en-US) rgb( <percentage># (en-US){ (en-US)3} (en-US) , <alpha-value>? (en-US) ) | (en-US) rgb( <number># (en-US){ (en-US)3} (en-US) , <alpha-value>? (en-US) )
<rgba()> = rgba( <percentage>{ (en-US)3} (en-US) [ (en-US) / <alpha-value> ] (en-US)? (en-US) ) | (en-US) rgba( <number>{ (en-US)3} (en-US) [ (en-US) / <alpha-value> ] (en-US)? (en-US) ) | (en-US) rgba( <percentage># (en-US){ (en-US)3} (en-US) , <alpha-value>? (en-US) ) | (en-US) rgba( <number># (en-US){ (en-US)3} (en-US) , <alpha-value>? (en-US) )
<hsl()> = hsl( <hue> <percentage> <percentage> [ (en-US) / <alpha-value> ] (en-US)? (en-US) ) | (en-US) hsl( <hue>, <percentage>, <percentage>, <alpha-value>? (en-US) )
<hsla()> = hsla( <hue> <percentage> <percentage> [ (en-US) / <alpha-value> ] (en-US)? (en-US) ) | (en-US) hsla( <hue>, <percentage>, <percentage>, <alpha-value>? (en-US) )where
<alpha-value> = <number> | (en-US) <percentage>
<hue> = <number> | (en-US) <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
(en-US),text-emphasis
, ytext-emphasis-position
(en-US). - Otras propiedades relacionadas al color:
color
,background-color
,border-color
,outline-color
,text-emphasis-color
,text-shadow
,caret-color
, ycolumn-rule-color
(en-US) - Aplicando color a los elementos HTML utilizando CSS.