Skip to content

Pure JS solution to grab a pseudo element's content attribute.

Notifications You must be signed in to change notification settings

cstromquist/screen-size-getter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

screen-size-getter

Tie your JS to your actual breakpoints. Check it out here: http://mathiasrechtzigel.com/JS-screensize-getter/

In each of your stylesheets add a qualifier to your body:after {content:"small/medium/large"}

Invoke this by calling currentWindowSize

If the functionality changes between small & medium just throw it into a if/else statment.

if (currentWindowSize === "small"){

//Do stuff

}

else {

//Do some other stuff

}

About

Pure JS solution to grab a pseudo element's content attribute.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 91.5%
  • CSS 8.5%