Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted December 28, 20222 yr hi there is a css mistake in ipsBadge_positive class. for example, in topics If you change the color, the background color will change! While the color variable is for text color!
December 29, 20222 yr I think you are wrong on this one. Just look again 😄 /* These are variables (--badge- ..) which can also be found on :root, html and even on (.) classes / (#) id's */ .ipsBadge_positive, .ipsBadge_style4 { --badge--background: var(--positive-light); --badge--color: var(--positive-dark); } /* The actual styles are on ipsBadge_reverse */ .ipsBadge_reverse { color: var(--badge--background, #fff); background: var(--badge--color); } Let's add some logic into this one, if we look closely at .ipsBadge_positive.. we have 2 variables 1. --badge--background and 2. --badge--color and these 2 variables also have another 2 variables which are taken from here: But if we look at .ipsBadge_reverse, we have actual styles (color & background) and this two have the variables from .ipsBadge_positive. And if you also look really closely why they added another class with "ipsBadge_reverse" you'll see that the background-color from .ipsBadge_positive is actually the color now and for the color the same, so (logic) they are reversed 😄 I hope this clarifies the "mistake" that has been done. Happy new year ❤️ Edited December 29, 20222 yr by drawncodes
December 30, 20222 yr Author You are right, I just judged by appearance But this usage is really confusing Happy New Year to you too....