Skip to content

v4.0.0

Compare
Choose a tag to compare
@mdo mdo released this 27 Apr 18:09
· 130 commits to master since this release
dd20799

Highlights

  • New: Added sponsor button (pass type=sponsor)
  • New: Updated the font stack to a more modern one
  • Breaking: Dropped ancient CSS vendor prefixes and IE < 10 support; the button will still work on IE9, but it won't look perfect, IE < 9 no longer works.
  • Enhancement: Reduced filesize approximately -20% off the uncompressed github-btn.html's size (6849 -> 5419 bytes)
  • Enhancement: When count=true is not passed, we now don't make any GitHub API request which should significantly improve page load times

Detailed changes

  • Improved button's accessibility:
    • counter is hidden with aria-hidden if it's empty
    • a title is added in the iframe
  • Improve button's HTML
    • add doctype
    • add lang
    • add charset
    • add rel="noopener noreferrer" for external links
    • remove aria-label since we set it via JS
  • Improve button's CSS:
    • the embedded SVG is no longer base64-encoded (-45% off the uncompressed SVG)
    • the embedded SVG is optimized with SVGO (approximately -25% off the compressed SVG, -28% off the uncompressed SVG)
    • the CSS is streamlined
  • Improved button's JS:
    • we no longer make unneeded GitHub API calls, for example if you don't pass query=true
    • add a few fail-safe checks
    • switched to Node.textContent since we weren't adding HTML
    • wrap the code in an IIFE so that the minifier mangles the variables properly
    • switch to strict mode
  • Build:
    • it should be generally easier to work on the project locally; npm i && bundle i to get started
    • replace gulp with npm scripts
    • add CSS/Sass linting with Stylelint
    • and JS linting with xo
    • add a watch script
    • update Jekyll to v4.0.0
    • add CI for tests and docs deployments
  • Docs:
    • the docs are HTML5 valid
    • the docs are WCAG2AA valid
    • add link rel=canonical
    • add meta generator tag
    • switch to Sass
    • inline the docs CSS