ArashDev Posted December 28, 2022 Posted December 28, 2022 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!
Alexandru Posted December 29, 2022 Posted December 29, 2022 (edited) 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, 2022 by drawncodes ArashDev 1
ArashDev Posted December 30, 2022 Author Posted December 30, 2022 You are right, I just judged by appearance But this usage is really confusing Happy New Year to you too.... Alexandru 1
Recommended Posts