Skip to content

Instantly share code, notes, and snippets.

@badlydrawnrob
Last active June 25, 2025 12:08
Show Gist options
  • Select an option

  • Save badlydrawnrob/5749f24c14ea4c381390f3cbbe3e16db to your computer and use it in GitHub Desktop.

Select an option

Save badlydrawnrob/5749f24c14ea4c381390f3cbbe3e16db to your computer and use it in GitHub Desktop.
Useful CSS selectors and HTML5 elements

On CSS

Some useful tools and interesting code

Useful CSS

Typography

Images

Easy to forget stuff

Annoying stuff

Future stuff (someday)

I don't think there's any point listing these until they're widely adopted. It also adds another layer of complexity and cognitive load.

Things like html5 web components and css mixins. Wherever possible avoid javascript and use plain HTML and CSS: most programming languages have templates and {{ tags }} anyway.

Footnotes

  1. This has pretty good coverage for modern browsers, but a few (only a few) still don't support it. It'd be wise, for now, to continue using .less (or .sass) files and compile to regular CSS. They're also handy for chunking your files, which regular css can't do (still)

  2. In my mind both of these are fucking confusing. A simple question to ask yourself when deciding between grid or flexbox is: do I only need to control the layout by row or column? (use a flexbox); do I need to control the layout by row and column (use a grid). 2

On HTML5

Some useful HTML5 stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment