Template talk:Cards

(Redirected from Template talk:Cards/testcases)
Latest comment: 1 month ago by Ajaymatters in topic Dark Mode Accessibility

Remove bold formatting?

edit

Someone mentioned on my peer review for List of poker hands that the page uses too much boldface, and I have to say I agree. MOS:BOLD has a very specific list of things which require boldface, but this template seems to make a special exception for itself. Does anyone think that cards look better without boldface? For example:

Four of a kind, also known as quads, is a poker hand containing four cards of the same rank and one card of another rank (the kicker), such as 9♣ 9♠ 9♦ 9♥ J♥ ("four of a kind, nines").
Four of a kind, also known as quads, is a poker hand containing four cards of the same rank and one card of another rank (the kicker), such as 9♣ 9♠ 9♦ 9♥ J♥ ("four of a kind, nines").

Hpesoj00 (talk) 19:15, 13 August 2016 (UTC)Reply

I have added a flag to turn off boldface, which I am now using in List of poker hands. Take a look at the page and let me know if you think it would be good to turn boldface off by default. Hpesoj00 (talk) 15:48, 14 August 2016 (UTC)Reply
This does seem at odds with the set of card display templates for {{Clubs}}, {{Diamonds}}, etc, which don't use bold text. --Lord Belbury (talk) 17:27, 6 May 2022 (UTC)Reply

Wrong suit_name output

edit

When I employ the suit_name parameter to specify a card, with the rank_name parameter, its output doesn't read well. For example, {{cards |Js |rank_name=full |suit_name=full}} results in Jack of spade, which should read "Jack of Spades". How can I get the output that I want? Dhtwiki (talk) 23:36, 23 March 2020 (UTC)Reply

Change of card art

edit
Current
Suggested

Commons has some more traditional-looking card sets available. Would it be possible to swap the current set out in this template, perhaps to commons:Category:SVG English pattern playing cards? Belbury (talk) 10:15, 24 February 2023 (UTC)Reply

I've now updated Template:Card to use the English pattern from Commons, creating the necessary joker cards for it. --Belbury (talk) 08:54, 12 April 2023 (UTC)Reply

Dark Mode Accessibility

edit

I notice that this template is designed to mark spades and clubs as black if the color is not explictly specified. However, this is a big accessibility problem when using dark mode on the web browser, as it's black text on a nearly black background. I was wondering what we could do to remedy this? My suggestion is to removed the hardcoded black color, allowing it to adapt based on the reader's preferences. However, I would like someone more experienced with template editing to tackle this task. TakodaOS (talk) 20:45, 19 May 2025 (UTC)Reply

I agree. This template is currently broken for dark mode. The fix you describe sounds reasonable: use the default font colour for black cards, not hardcoded black colour. Renaissance77 (talk) 06:58, 4 July 2025 (UTC)Reply
I tried it in my sandbox here: User:Ajaymatters/sandbox - Wikipedia. That removes the hardcoded color:black from Template:Cards/core, so the suit color now inherits from the theme and is visible in both light and dark modes.
The relevant change is to suppress the inline color:black unless spades_color or clubs_color is explicitly provided. I can submit an edit request, if that's fine? Ajaymatters (talk) 08:22, 6 July 2025 (UTC)Reply