Change header color 🎲 🎲

Jake Paris

in Maine, in 2024

Journal entries tagged “Media Queries”

Breakpoint Helper with SASS/SCSS

When I’m building a new site, I usually spend a fair amount of time showing and hiding things at various breakpoints. This code defines the major breakpoints in use, then prints out a bunch of helper classes to make the showing/hiding easier. First create a sass map of all the breakpoints. $breakpoints: ( small:550px, medium:800px, […]

Javascript Media Query Hack

I’ve seen this somewhere before… HTML <span id=”smScreenIndicator”></span> CSS #smScreenIndicator { float: left; } @media (min-width: 400px) { /* whatever width suits the project */ #smScreenIndicator { float: none; } } JQuery function isMobile() { if ( $(‘#smScreenIndicator’).css(‘float’) == ‘left’ ) return true; else return false; }