Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Set a Global Minimum Width While Developing Responsive Site

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #192199
    jeremiahjmartin
    Participant

    This is kind of a strange request but one that I’m sure someone has to have run into before. We’re developing a large scale responsive site and of course the client wants to phase it. I am working on the responsive layout. Header/footer is done as well as some core templates. The bulk of the site will not be complete as there are lots of legacy templates.

    My question is this:
    If I have a container that is flexible with 3 columns that become one at mobile. If I set a min width on the container it still renders the child elements in one column event though my container is still 1000px as an example.

    Is there a way to temporarily disable this with viewport or something? until we are complete with the site so the client can go live with the new redesign as we finesse some legacy code behind the scenes. If not there is a lot of adding/removing of media queries that needs to happen.

    Example:

    <div class=”container

    #192200
    TheDoc
    Member

    I think the answer here would be to simply remove the media queries, no? If the site currently doesn’t work below a certain width, then remove media queries that are below that width.

    #192261
    jeremiahjmartin
    Participant

    Yeah I would rather not rewrite all the media queries and some of the media queries at larger sizes I would like to keep. I am using LESS so theoretically I could just change the variable for the smaller media queries to something like this:

    @media (min-width: @screen-sm-min)
    

    where right now I have:

    @screen-md-min: 768px;
    

    could change to this:

    @screen-md-min: 1px;
    

    That may work. Then when we go live with the responsive version just change it back.

    #192273
    shaneisme
    Participant

    It sounds like it’s “too late” to make the change now, or at least you don’t want to, but in my opinion mobile should be the default and then build up media queries from there. So yeah, you won’t have any media queries for mobile since it’s the default CSS.

    Luke W. wrote a book on this that helped me wrap my mind around it. You can think about it for future projects anyway (or a revamp): http://www.abookapart.com/products/mobile-first

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.