'How to do a random border radius scss
I want to add the unit after a random($limit: 100) i want in the css : border-radius: <the random number>%
Solution 1:[1]
You can multiply the result from random() by 1% (or any other unit you may want) to append the unit. The outer parenthesis is a sass feature, so those type of calculations only work with alike-units or unitless + alike-units.
border-radius: (random($limit: 50) * 1%);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Marek OCLC |
