Ruby on Rails Monday, July 9, 2012

I ended up doing this. It works better than I thought: Though it starts on the initial page, the individual <iframe>s can be clicked through to show other states of the UI, then they survive reloads.

Note that I still need to tweak the dimensions to get it perfect. Right now the scrollbars take up some of the 320x480 window, so it's not completely realistic. But it works well enough that I can see the results of all my @media queries at once.

—☈

- params = { src: '/my/starting/page }

%style
  :sass
    #test-boxes
      text-align: center
    iframe
      border: thin dotted black
      vertical-align: top

%iframe#mobile-portrait{params.merge({width: 320, height: 480})}
%iframe#mobile-landscape{params.merge({width: 480, height: 320})}
%iframe#desktop{params.merge({width: 960, height: 9999})}

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/6y3NAjGLMmUJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.

No comments:

Post a Comment