-
Notifications
You must be signed in to change notification settings - Fork 2
Description
In stylesheets with > 36 possible outcomes, all outcomes requiring more than one character to be displayed in Reddit's logout string will never be shown. This is in part due to the order they are listed in, i.e.:
input[name="uh"][value^="a3"] ~ a::after { content: "We've seen each other at parties." }will be overriden by the later rule:
input[name="uh"][value^="a"] ~ a::after { content: "I would love to be upstairs watching TV or gossiping about boys or, god, even studying! But I have to save the world. Again." }While this contradicts the cascading order in the W3C specification, this override has been confirmed in both Firefox and Chrome on Windows 7.
However, even with the proper order of CSS rules, these quotes will still fail to display most of the time. This is because, while the probability of Reddit's logout string beginning with a particular character is 1 in 36, but the probability of it beginning with any two specific characters is 1 in 36*36, or 1 in 1296.
Possible solutions include limiting the number of quotes to a number less than or equal to 36, or including all 1296 possible combinations in the CSS code with the proper probabilistic spread between them. The latter solution appears ludicrous and is not recommended; until a better method for random selection in Reddit CSS is worked out, I highly recommend staying with 36 or fewer random possibilities.