Improving site performance by shipping more CSS

(github.blog)

26 points | by torutofu 18 hours ago

7 comments

  • eviks 1 minute ago
    Unfortunately the original blog post introducing the great CSS-in-JS system being removed is not in the "Related posts" section, would be nice to compare the thinking in the two
  • efortis 16 minutes ago
    There's room for improvement still. Currently, the production build is using long-dev class names. e.g. `DirectoryContent-module__Box_3__gl6dE` could be compiled to a shorter hash like `gl6DE3a2`.

    If you use Vite:

      css: {
        modules: {
          generateScopedName: mode === 'production'
            ? '[hash:base64:8]'
            : '[name]__[local]___[hash:base64:5]',
          }
        }
    • Onavo 8 minutes ago
      Would you need a source map then for prod debugging?
  • Gualdrapo 45 minutes ago
    Once (like a year ago or so) stumbled upon some person's post asking for someone to help them to "fix" some section at their website. It was done !important over !important over !important over !important. Said person was really convinced all it needed was another bunch of !important because apparently that was what ai spit for them, at least at that time
  • a11ce 1 hour ago
    Sometimes, [GitHub] posts a [blog post in which they move away from] some terrible [way of doing things] I've never heard before, and it's a weird indirect way to learn how awful their other [design choices] must be.

    https://xkcd.com/2071/

  • varun_chopra 34 minutes ago
    Honestly, hats off to them. It's hard to get anything done with Copilot so I'm amazed they even managed to do this.
  • parasti 40 minutes ago
    And yet, there's been a glaring overflow bug on every repo page if the repo has a sponsor button on Firefox Android for months.
  • jay37184 35 minutes ago
    css-in-js? Rofl. Whats next? Html-in-js?