# מצבים שונים (טקסט ואיקון) לתגובות שטרם התקבלו ולאלו שהתקבלו

**URL:** <https://meta.discourse.org/t/different-states-text-and-icon-for-unaccepted-and-accepted-responses/288039>\
**Category:** UX\
**Tags:** solved\
**Created:** [8 בדצמבר,‏ 2023,‏ 11:50pm UTC](https://meta.discourse.org/t/different-states-text-and-icon-for-unaccepted-and-accepted-responses/288039 "2023-12-08T23:50:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tynaut](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tynaut/32/276689_2.png) [@tynaut](https://meta.discourse.org/u/tynaut)\
**Post date:** [9 בדצמבר,‏ 2023,‏ 1:06am UTC](https://meta.discourse.org/t/different-states-text-and-icon-for-unaccepted-and-accepted-responses/288039/2 "2023-12-09T01:06:16Z")

</div>

I’m adding a css solution in case this is found helpful.

With pseudo elements, at least the behavior for the text portion can be mimicked:

![CleanShot 2023-12-08 at 18.56.34](https://global.discourse-cdn.com/meta/original/4X/9/8/f/98fba991f141a4fc237523497e4973f4587fba06.gif)

This code is a bit semantically nested, but it works. The text alignment would need to be changed or the button’s width fixed so that the target doesn’t jump around on hover.

> **css**
>
> ```plaintext
> nav.post-controls .actions button {
> &:after {
> margin-left: 0.5em;
> }
>     
> &.unaccepted {
> &:after {
> content: "Mark as solution";
> }
> &:hover {
> &:after {
> content: "Select solution";
> }
> }
>         
> }
>     
> &.accepted {
> &, .d-icon {
> color: var(--tertiary);
> }
> &:after {
> content: "Selected Solution"; 
> }
> &:hover {
> &, .d-icon {
> color: var(--primary);
> }
> &:after {
> content: "Deselect Solution";
> }
> }
> }
> }
> 
> ```

It’s also possible to do this, which would result in the text “Select if this reply solves the problem,” which is too long but should respect language translations.

```plaintext
&:after {
    content: attr(title);
}

```

* * *

Ideally, I would change the actual html to support translations, instead of using pseudo elements;  
Except for the title attribute (if it was shorter), can be better than having a js hover listener.

---

_[View the full topic](https://meta.discourse.org/t/different-states-text-and-icon-for-unaccepted-and-accepted-responses/288039)._
