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

cleanup: remove old, unused css #3287

Merged
merged 2 commits into from
Mar 6, 2024
Merged

cleanup: remove old, unused css #3287

merged 2 commits into from
Mar 6, 2024

Conversation

marcelgerber
Copy link
Member

@marcelgerber marcelgerber commented Mar 5, 2024

I went through owid.scss a bit and removed some rules that are obviously not in use anymore.
For all of these, I ran ripgrep through live-data/bakedSite to see that they are actually not in use anymore.
The removed styles are certainly not an exhaustive list of the unused css rules, but it's a start.

Rules that I could identify:

  • .owid-data used to be an "All our articles" block on the old homepage, circa 2018

    Details

    CleanShot 2024-03-05 at 10 00 35@2x

  • Fancybox used to be a jQuery-based image viewing tool that we certainly don't use any more.

  • The .social component was this old one here, circa 2018

    Details

    CleanShot 2024-03-05 at 10 07 41@2x

  • #un-button I couldn't really find anywhere.

  • .citation-note is the [cite] in the screenshot below, and .citation-guideline is the highlighted component here:

    Details

    CleanShot 2024-03-05 at 10 11 12@2x

  • .twitter-tweet is presumably an embedded tweet, of which we don't have any.

  • .archive-pagination I cannot find anywhere 🤷🏻

  • The teaching hub page neither contains #category-nav nor #entries-nav.

  • The teaching hub h2 rules are completely overwritten by other, more specific rules.

  • .mobile.subheading and .owid-presentations used to be features on the frontpage, the latter one being similar to .owid-data.

  • Couldn't find .footer-widgets.

@marcelgerber marcelgerber marked this pull request as ready for review March 5, 2024 09:47
@marcelgerber marcelgerber requested a review from mlbrgl March 5, 2024 09:47
Copy link
Member

@mlbrgl mlbrgl left a comment

Choose a reason for hiding this comment

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

thanks Marcel! The approach sounds solid.

I did a quick visual check on http://staging-site-remove-unused-css and everything looks ok. FWIW, I also haven't encountered any of these styles recently.

Some possibly related background on the embed tweet: #3149, slack

:shipit:

@marcelgerber marcelgerber merged commit be79175 into master Mar 6, 2024
22 checks passed
@marcelgerber marcelgerber deleted the remove-unused-css branch March 6, 2024 13:37
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