Skip to content

Instantly share code, notes, and snippets.

View geoffreycrofte's full-sized avatar
📚
Writing books

Geoffrey Crofte geoffreycrofte

📚
Writing books
View GitHub Profile
@ffoodd
ffoodd / improved-sr-only.markdown
Last active May 3, 2024 15:23
Improved .sr-only

Improved .sr-only

Theorically bulletproof CSS class for visually hide anything and keep it accessible to ATs.

A Pen by ffoodd on CodePen.

License.

{
"categories": [{
"name": "action",
"key": "action",
"icons": [{
"id": "ic_3d_rotation",
"name": "3d rotation",
"group_id": "action",
"keywords": ["action, 3d, rotation"],
"ligature": "3d_rotation",

IE CSS Hacks: IE6, 7, 8, 9, 10, 11, and even Edge

I always struggle with hacks for Edge and IE. See also for other tips: http://browserhacks.com/

IE6 Only

_selector {...}
@loilo
loilo / readme.md
Last active April 9, 2024 20:01
Sass Dark/Light Theme Mixin

Sass Dark/Light Theme Mixin

This is a Sass mixin to handle a 3-way dark mode. It relies on a data-theme attribute on your <html> element with a value of light or dark. If data-theme is absent (i.e. it's neither light nor dark), the system's preferred mode is used.

body {
  // matches data-theme="light" or data-theme="auto" with system instructing light mode
  @include light {
    background: white;
 color: black;