Zerance Diaries — liquid

Generate random numbers using liquid (shopify)

Generate random numbers using liquid (shopify)

You may have encountered a barrier while coding in Liquid, generating random numbers is almost impossible, so you had to use Javascript instead and may have had to change the logic of your interface. Did you know that you can generate numbers in SCSS? The random(param:max) is available in SCSS, unfortunately the current version of Shopify's SCSS processes is V3.2.x, which is the version before the release including this feature. Hopefully in the near future we'll have access to the newer releases, and be able to use this feature along others. Well, it seems there is a good reason for...