Skip to content

Instantly share code, notes, and snippets.

View glenpadua's full-sized avatar
🎯
Focusing

Glen Padua glenpadua

🎯
Focusing
View GitHub Profile
@glenpadua
glenpadua / fluid-typography.js
Last active March 25, 2022 13:10
Fluid typography helper mixin for use with styled components
/**
* @desc Styled components mixin for fluid typography - https://www.youtube.com/watch?v=Wb5xDcUNq48
* @param string minScreen - min screen width
* @param string maxScreen - max screen width
* @param string minFont - min font size
* @param string maxFont - max font size
* @return string - Template literal containing CSS
*/
export function fluidType (minScreen, maxScreen, minFont, maxFont) {