The digests used to show the colour of the category for the link of the category in ‘New For You’, but no longer does - anyway to bring this back?
Can you include a screenshot of what you mean?
It’s basically the link color (which reflects the category color) wherever the link shows. For those using the default stye it would show the small bar, for those using the box style it would show the link text as the category’s colour.
Here’s what it shows now:
Here’s what it would have shown for those using the default bar:
For everyone using the box style it would shown the category name/link in the colour of the category (this is what I’d like to see back):
ah I see… unfortunately the new way we create category badges (CSS custom properties and psuedo selectors) isn’t supported by email clients. We’ll have to do something separate for email
Thanks Kris. Could you add color
as per the green example below? (Where green is the category color)
Style Attribute {
--category-badge-color: #1ac831;
--category-badge-text-color: #FFFFFF;
--parent-category-badge-color: #1ac831;
color: green;
}
Could you also do the same here: Category Badge Styles - #2 by AstonJ ?
I’ve got a PR in progress for this that will inline styles for emails
but we’re wrapping up our latest release so it might take a little longer than usual to be reviewed and merged
I’ve just merged the fix, so the next time you update Discourse emails should have the badge colors appearing again!
Thanks Kris but now the text is white/is not showing the box category styles as per:
Unfortunately theme components can’t change email styles, and we no longer support the box style.
Though one thing I now realize, is that we don’t use the text color category setting for the default category badges in Discourse anymore (it’s only used in theme components like the one you linked), though when updating the email I included some CSS that will use it… which is why your categories have white text in email. In order to be more consistent with the default category badges I should remove that.
Another problem… on another forum the background colour for all categories is white (we use foreground colour as the differentiator):
So now in the digests all the bars are showing as white and all text is blue (the forum’s main colour).
Perhaps the Category Setting pages needs additional fields to specify how they should show in places like emails? Or maybe boxes should just be brought back as they offered the best flexibility?
Right, we no longer support the box style categories as a Discourse feature… so it’s not expected to work everywhere. It is possible to add custom email styles via admin/customize/email_style/…
Adding something like this there, for example, could get you closer to the box style in email
[data-category-id] {
background: white;
color: #333 !important;
padding: 0 .25em;
span > span { // hides the bullet category badge
display: none !important;
}
}
Thanks Kris. Is there any way to use the background/foreground category colours there? In forum platforms like vBulletin you often have access to common variables to use in places like this.
This topic was automatically closed after 9 days. New replies are no longer allowed.