Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-deterministic CSS generation #98

Open
wookie184 opened this issue Jan 30, 2024 · 1 comment
Open

Non-deterministic CSS generation #98

wookie184 opened this issue Jan 30, 2024 · 1 comment

Comments

@wookie184
Copy link

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.

for dirname in self.bulma_submodule_path.iterdir():
# We already added this earlier
if dirname.name == "utilities":
continue
bulma_string += f"@import '{sass_bulma_submodule_path}/{dirname.name}/_all';\n"

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
Copy link
Author

wookie184 commented Jan 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant