Skip to content

Instantly share code, notes, and snippets.

@ghostwriter
Created February 4, 2016 20:07
Show Gist options
  • Save ghostwriter/7a481dbfb1ef048f1109 to your computer and use it in GitHub Desktop.
Save ghostwriter/7a481dbfb1ef048f1109 to your computer and use it in GitHub Desktop.
Increase or decrease CSS values with jQuery
/*
cleaner than hard-coding the desired font size
refs: http://api.jquery.com/css/
some use case:
all these websites that use *huge* font sizes,
painful to read even on a 1920x1080 screen.
*/
$('.article-content').css('font-size', '-=2');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment