Jump to content

.London Domains - £4
Photo

Thoughts on media queries

css media queries stylesheet

  • Please log in to reply
2 replies to this topic

#1 johnfotios

johnfotios
  • Member
  • Newbie
  • 29 posts

Posted 29 March 2018 - 15:00

I've been struggling to find a way to organise my css.

 

For example, the sort of thing I do is have 4 style sheets called into the header.

 

global.css, desktop.css, tablet.css, mobile.css.

 

I set up global.css first, then make the subtle changes to each screensize in the respective stylesheets, which are wrapped entirely in a media query.

 

I've done it in the past with 1 stylesheet, and loads of media queries, but it all just feels too confusing.

 

Any recommendations for how you guys set things up?

 

I am not using sass or less.


  • 0

John Fotios | Indever | Hoj

My little bit of web design... http://www.indever.co.uk


#2 MikeChipshop

MikeChipshop
  • Overlord
  • Mini Member
  • 4,673 posts

Posted 29 March 2018 - 15:09

I'm pretty much a vanilla CSS guy here. I also tend to keep linked assets to a minimum so I have all my media queries in one stylesheet. I figure once that's been loaded and cached then the visitor wont have to do it again.


  • 0

#3 johnfotios

johnfotios
  • Member
  • Newbie
  • 29 posts

Posted 30 March 2018 - 14:41

I'm pretty much a vanilla CSS guy here. I also tend to keep linked assets to a minimum so I have all my media queries in one stylesheet. I figure once that's been loaded and cached then the visitor wont have to do it again.

 

That's true. I am vanilla css too, I just don't know how to keep 1 style.css file clear without becoming a confusing mess of media queries.


  • 0

John Fotios | Indever | Hoj

My little bit of web design... http://www.indever.co.uk






Also tagged with one or more of these keywords: css, media queries, stylesheet

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users