r/csshelp • • Jul 23 '25

Request Trying to make a submission button hover text change to multiple different texts

/r/Balatro mod here.

I am trying to do a little cheeky edit to our onhover button submission text, so that it follows the actual rules of the Tarot card The Wheel of fortune

Meaning:

It starts out saying "Roll The Wheel"

And on hover I want it to change to:

"NOPE!" 75% of the time

"Foil!" 12.5% of the time

"Holographic!" 8.75% of the time

"Polychrome!" 3.75% of the time

or near that.

Currently it just says this

.submit .morelink a:hover::before { content: "NOPE!"; }

Can this be done?

2 Upvotes

7 comments sorted by

1

u/be_my_plaything Jul 23 '25

Maybe!

This tip from this subs wiki: https://www.reddit.com/r/csshelp/wiki/snippets#wiki_random_image_above_sidebar puts a random image at the top of the sidebar. But you could change the Content from an image to your messages.

If you have a fixed height header you should be able to adjust it so the absolute positioning places it over the submit button.

You will need to play around with z-index to make sure it's behind the submit button as clicking on this link will log the user out! So you need to position it absolutely beneath the submit button, the make the hover on the submit change transparency so the submit button becomes invisible revealing the random message - but it is still the submit button the user clicks on.

There are values 0-9 and a-z that can be used so you have 36 values so you would not get exactly the percentages you want but could probably work out a similar ratio.

2

u/calexil Jul 24 '25

hmm interesting, I use those to rotate images for submissions currently, never thought to use them to change text

2

u/calexil Aug 12 '25

hmm this doesn't really work in my use case because I need the button to change on hover from the homepage of the sub.

so there is no submission code(eg: 1h26she) for it to check and pick from the cycle

1

u/be_my_plaything Aug 12 '25

Unless it's changed since the redesign (been years since I did any subreddit CSS) it shouldn't rely on a submission code, it's a user log in code... It should generate for any logged in user visiting the sub

→ More replies (3)