Reputation: 17
In Google Chrome browser on Windows, card suit symbols (spades, hearts, diamonds, clubs) are correctly colorized using the "style" attribute. Unfortunately, the same page displayed in Google Chrome on Android does not show the colors defined by me and instead uses the default black and red colors. (the effect was visible in the attached picture)
HTML code: (and link to project https://stackblitz.com/edit/web-platform-z2cs3t?file=index.html)
<span style="color: #114bb8">♠ spades</span><br />
<span style="color: #f10d0d">♥ hearts</span><br />
<span style="color: #ff9100">♦ diamonds</span><br />
<span style="color: #0da510">♣ clubs</span><br />
Is it possible to somehow force Google Chrome to show selected colors also on Android?
I'd also like to understand why Chrome on Android uses predefined colors and I don't accept user colors.
Upvotes: -1
Views: 229
Reputation: 11323
Edit: tested and really doesn't work. Seems that Android lacks or refuses to apply any monochrome font for on such symbol (Emoji) that has colourful variant.
Kinda sad, since it violates Unicode recommendation: Emoji Presentation Sequences contains all four characters in question, what indicates that conforming implementations should support both Text and Emoji variants.
So the answer proposed in comment suggesting drawing glyph with it's shadow or background under transparent text colour (or better, fill) is probably the only viable workaround.
Try to add variation selector 15 (︎
) after each character, this should force all clients to pick "monochrome" font variant and thus let be coloured by the style.
span {
font-variant-emoji: text;
}
<span style="color: #114bb8">♠︎ spades</span><br />
<span style="color: #f10d0d">♥︎ hearts</span><br />
<span style="color: #ff9100">♦︎ diamonds</span><br />
<span style="color: #0da510">♣︎ clubs</span><br />
Upvotes: 0
Reputation: 17
AStombaugh wrote: Possibly helpful answer to a similar question: Changing font color of HTML Symbol
Works for me:
span {
color: transparent;
text-shadow: 0 0 0 rgb(0, 128, 0);
}
<span>⚫</span>
THANK YOU.
Upvotes: 0