Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A a11yproject.com
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 40
    • Issues 40
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The A11Y Project
  • a11yproject.com
  • Merge requests
  • !479

Improve code readability

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/swashcap/gh-pages into gh-pages Mar 05, 2017
  • Overview 2
  • Commits 4
  • Pipelines 0
  • Changes 1

Created by: swashcap

Problem

Readability of of inline and block code on <a11yproject.com> isn’t great primarily because it’s set in the body type, a san-serif face. This is especially noticeable on “Getting started with ARIA”. Code is traditionally set in a monospaced face.

Solution

  • Address the issues by changing code elements’ font-family to a cross-OS-friendly monospace font stack.
  • Decrease code’s font-size to make reading inline elements less jarring.
  • Decrease pre’s line-height to make reading code blocks easier.
  • Bonus: remove redundant background color on codes nested inside pres.

These are broken into (excessively?) granular commits. I’d be happy to rebase, change the font stack, drop a commit, etc.

Testing

git clone git@github.com:swashcap/a11yproject.com.git wat-is-code
cd wat-is-code
bundle install
jekyll serve

Then, go to http://localhost4000:/posts/getting-started-aria/ and check out the inline and block code.

Screenshots

Before:

before

After:

after

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/swashcap/gh-pages