lemonsaurus / django-simple-bulma

Django application to add the Bulma CSS framework and its extensions
MIT License
136 stars 16 forks source link

Non-deterministic CSS generation #98

Open wookie184 opened 7 months ago

wookie184 commented 7 months ago

iterdir yields the elements of a directory in an arbitrary order. That means that the SCSS here can end up with the imports in different orders on different machines.

https://github.com/lemonsaurus/django-simple-bulma/blob/f26264f2155bc30f8afc5153e9245937193c33da/django_simple_bulma/finders.py#L116-L122

This means the resultant CSS can vary in order which can affect the way pages are styled.

This shouldn't be too hard to fix, but what should the order be fixed to? Is there a correct order, or should we just fix it to e.g. alphabetical, or try to work out if there's an order that's most common currently?

It may also be worth looking for other similar code that might have the same issue.

wookie184 commented 7 months ago

For some context, I noticed this on https://www.pythondiscord.com/resources/, as there the titles are in bold image but locally for me they weren't. image

I believe this is the cause.