FWIW Entering safe mode to do the bulk actions may be an alternative to disabling the theme component for everyone. Obviously still an extra faff, but possibly less impact on everyone else?
Yes, thatās what I figured out after I learned about safe modeā¦
But Iād still rather have the widget exposed.
Hello,
Thank you for your component! We noticed a problem when using your component on the forum https://community.escapecollective.com/. If you click on the topic title, the SPA reloads (I attached gif with this problem), but if you click on the card outside the title, everything works fine. The problem was discovered because the Guest Gate component was not working properly due to the page reloading.
Here is a suggestion: Guest Gate Theme Component - #154 by Don
Could you please take a look at this issue?
Thank you,
Denis D.
So it appears something has changed with the last round of Discourse updates.
Only the very left edge of my topic cards are now respecting this CSS, Iāve been poking around to try and find what will fix it but so far have been unsuccessful.
Can anyone else confirm and see if they can track down the needed changes?
The problem is the recently added variable for the background color on topics you have read.
I donāt think there is a dev-news about this change. But you can find some information here:
So is there a way to suppress that CSS? This has destroyed the way my site looks and as Iām not really a coder in any sense of the word, I donāt know how to get around it.
I looked through the element inspector, and I see the word āvisitedā on all the broken topics and I see that itās missing on the one that still looks right.
How do I fix this?
Topic I have not visited yet (no hover):
And with a mouseover:
And the others are broken.
That was harder to track down than it should have been. (Iām quite sure itās due to my shortcomings, but stillā¦)
It appears that adding:
.topic-list-item-background-color--visited {
background: none
}
Has fixed it without any undesired side effects.
In your styles, you now only need to change these two variables:
--topic-list-item-background-color
--topic-list-item-background-color--visited
So something like this should work:
:root {
--topic-list-item-background-color: YOUR COLOR HERE;
--topic-list-item-background-color--visited: YOUR COLOR HERE;
}
How would that account for the differences when changing between light and dark?
Also, I donāt want it to be different once visited, and that doesnāt cover the hover color change.
You can use the css function light-dark()
--variable-name: light-dark(#efedea, #223a2c);
You can set them both to the same thing.
Nothing has been done to :hover
in core. Youāll just need to make sure to set the variable to what you want when hovering.
This still isnāt working for me.
This is what originally worked:
// Blend topic card colors with theme
@media (prefers-color-scheme: dark) {
.topic-card.has-max-height {
background: #223c44 !important;
}
.topic-card.has-max-height:hover {
background: #163d51 !important;
}
}
@media (prefers-color-scheme: light) {
.topic-card.has-max-height {
background: #e6ecf2 !important;
}
.topic-card.has-max-height:hover {
background: #ddecf7 !important;
}
}
Then after the latest update I added this is it seemed to work, but then stopped:
.topic-list-item-background-color--visited {
background: none
}
Then, based on what you said here I tried both adding to the current and replacing everything with this:
:root {
--topic-list-item-background-color: light-dark(#e6ecf2, #223c44);
--topic-list-item-background-color--visited: light-dark(#e6ecf2, #223c44);
--topic-list-item-background-color--hover: light-dark(#ddecf7, #163d51);
}
There must be another variable that I need to cover hover-visited, because unread threads work right, but visited ones are busted.
This variable does not exist.
.topic-card.has-max-height:hover {
--topic-list-item-background-color: ADD COLOR HERE
--topic-list-item-background-color--visited: ADD COLOR HERE
}
This should be what you need, hope that helps!
This is the least amount of lines I could come up with that seems to be working correctly.
// Blend topic card colors with theme
.topic-card.has-max-height {
--topic-list-item-background-color: light-dark(#e6ecf2, #223c44);
--topic-list-item-background-color--visited: light-dark(none, none);
}
.topic-card.has-max-height:hover {
--topic-list-item-background-color: light-dark(#ddecf7, #163d51);
--topic-list-item-background-color--visited: light-dark(none, none);
}
@media (prefers-color-scheme: dark) {
.topic-card.has-max-height {
background: #223c44 !important;
}
.topic-card.has-max-height:hover {
background: #163d51 !important;
}
}
@media (prefers-color-scheme: light) {
.topic-card.has-max-height {
background: #e6ecf2 !important;
}
.topic-card.has-max-height:hover {
background: #ddecf7 !important;
}
}
I have made a PR to this theme component with two additions:
Feature: Suggested topics switch
Adds the setting Show for suggested topics
Makes use of topic cards for suggested topics optional (as described in this feature request)
Feature: Limit to categories
Adds the setting Show on categories
If non-empty, uses topic cards on selected categories only.