How to @import a css file only for wide screens

Posted on In QA

How to @import a css file, such as for an open fonts hosted by Google, only for wide screens, such as with px of larger than 846?

A piece of css that you can use:

@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,300,400,700,900) (min-width:846px)

This import Open Sans fonts for only screens of at least 846 px.

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *