CSS Trick: Change Favorite Heart to Bookmark

Some of THESE work!

Screen Shot 2020-11-05 at 8.36.00 AM

2 Likes

yep!

Screen Shot 2020-11-05 at 9.38.32 PM

1 Like

Weird…it doesn’t let me click/fill the icon.

mmm, seems it works with some, but not others.
I’m in way over my head here, so I won’t try to explain why…

Semi-square!

[data-test="app-switch-view"] :nth-child(2) :nth-child(1) :nth-child(1) {
stroke: black;
box-shadow: 1px 1px 45px 3px rgba(136,136,136,1);
d: path("m 16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2");
}

This was totally and completely random but I’m proud of myself for doing it

2 Likes

Screenshot?

This is the semisquare not filled in
image
And this is it filled in
image

Isn’t it :sparkles: Beautiful :sparkles:

5 Likes

So beautiful.

1 Like

@Robert_Petitto,

Any tricks to turn a boolean into a thumb up? by chance?

:laughing:

1 Like

That’s a good one. Thing is I am creating a Favorite session but I don’t wanna use the native favorite because it requires users to sign in. The other option I thought is the boolean but I’d like to have the thumb up in place of the boolean.
The ITE still shows the boolean.

hmm… Reaction component?

4 Likes

Great idea! Thanks!

Edit: Thanks @Darren_Murphy That worked.

1 Like

You just reminded me that I have never used the reaction component since it went to production…

2 Likes

Every now and then I go looking in the docs for sections I haven’t read yet, or don’t have a decent understanding of. It was on one of those little trips that I recently learned about it. Now I’m looking for an excuse to use it :grin:

3 Likes

I’ve used it only once, and then had to no longer use it because it doesn’t contain all Emojis…Client needed specific ones.

1 Like

This is great trick, thanks @Robert_Petitto !

Have you (or anyone else on this thread) experienced this not rendering on a mobile device? The CSS works fine on desktop, but when I tested on my phone, the icon no longer showed and had a weird outline around the original favorite icon.

But you want it to be user specific, right? Then you kind of need users to sign in, or at least have profiles enabled

Yeah, I realized that in the end I had to use the Favorite component. I forgot that when the app is refreshed so is the user specific. :man_facepalming:t6:

Anybody here has done this with ratings component? I can’t seem to find a way to touch the SVG. Thanks in advance!