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

Remove unused css files #447

Open
wants to merge 3 commits into
base: gh-pages
Choose a base branch
from
Open

Remove unused css files #447

wants to merge 3 commits into from

Conversation

yochem
Copy link

@yochem yochem commented Jul 16, 2024

It looks like #7 introduces a single-file main.css, and makes the other css files unnecessary. This commit also deletes these file to reduce confusion (and repo size).

PR Checklist

  • This PR doesn't modify the files in the spec dir.
  • This PR passes npm run lint.
  • (Optional) If you're willing to help reviews about your language's translations, add your name to the TRANSLATORS.md.

It looks like semver#7 introduces a single-file `main.css`, and makes the
other css files unnecessary. This commit also deletes these file to
reduce confusion (and repo size).
@yochem
Copy link
Author

yochem commented Jul 16, 2024

Also, I'm unsure about the files in ./css/lang/.

The layout template includes this:

{% if page.custom_css %}
<link rel="stylesheet" href="/css/{{ page.language }}.css">
{% endif %}

But that would not resolve to any of the right paths to include the css files, which should then be:

-      <link rel="stylesheet" href="/css/{{ page.language }}.css">
+      <link rel="stylesheet" href="/css/lang/{{ page.language }}.css">

If you want, I can delete the lang css folder to (or fix the css link in the layout).

@imme-emosol
Copy link

Some lines in .prettierignore can also be removed.

@imme-emosol
Copy link

And while we're talking about minimizing data transfer, perhaps many spaces and new lines can also be removed from the css, in other words: perhaps a minimized version is a good idea to add.

@imme-emosol
Copy link

Also, I'm unsure about the files in ./css/lang/.

The layout template includes this:

{% if page.custom_css %}
<link rel="stylesheet" href="/css/{{ page.language }}.css">
{% endif %}

But that would not resolve to any of the right paths to include the css files, which should then be:

-      <link rel="stylesheet" href="/css/{{ page.language }}.css">
+      <link rel="stylesheet" href="/css/lang/{{ page.language }}.css">

If you want, I can delete the lang css folder to (or fix the css link in the layout).

The files in ./css/lang/ seem to currently be unused, searching custom_css suggests that it is safe to remove these, assuming that it would be unlikely for jekyll to automatically add a property such as custom_css.
Another thing to consider is that adding/using ar.css will add a dependency on (fonts.googleapis.com), external files.
When applying the ar.css, it seems to add some background for <code> that currently is not set on the default page.

Copy link

@imme-emosol imme-emosol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@yochem
Copy link
Author

yochem commented Oct 16, 2024

Great suggestions, thanks!

  • 1f262c0: Cleans .prettierignore, removes css/lang files
  • 4e5738d: Compresses css by changing the css file to a sass file (jekyll docs)

You can merge all commits, or cherry-pick the ones you would like to see merged.

@imme-emosol
Copy link

imme-emosol commented Oct 16, 2024

You can merge all commits, or cherry-pick the ones you would like to see merged.

If only i had write access 😬

https://api.github.com/orgs/semver/members?role=admin .

@yochem
Copy link
Author

yochem commented Oct 16, 2024

I see. Well, let's hope one of the maintainers can merge this. Hopefully, because the site could use some updates.

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

Successfully merging this pull request may close these issues.

2 participants