Created
September 18, 2021 14:42
-
-
Save jbidoret/d74a4ddff63ef99ad3c5dba49a7a1bcc to your computer and use it in GitHub Desktop.
Random CSS font variations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
#-*- coding: utf-8 -*- | |
# imports | |
import random | |
with open('vars.css', 'w') as f: | |
for i in range(90): | |
for j in range(6): | |
wdth = random.randint(0, 1000) | |
wght = random.randint(0, 1000) | |
f.write(u"#page-{} p:nth-child({}) {{ font-variation-settings: 'wdth' {}, 'wght' {}; }}".format(i, j, wdth, wght)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment