Identi.ca Identi.ca
  • Login
  • Public

    • Public
    • Groups
    • Featured
    • Popular

http://file3.status.net/i/identica/-20120511T025706-ak9ab4v.html

http://file3.status.net/i/identica/-20120511T025706-ak9ab4v.html
http://www.zivtech.com/blog/responsive-drupal-theme-50-lines-code-or-less
<!-- /content-field --> <!-- /content-field -->

Media Queries

Media queries allow you style sheets to apply specific styles depending on the current size of the browser. Normally these need to go a the root of your CSS document but thankfully Sass has a media bubbling behavior that will ensure they find their way to where they belong and you are free to define them in a place that makes sense to you, even nesting them inside other selectors.

@media screen and (max-width: 1000px)
#page-wrapper
margin: 1em
top: 0

Here we specify that if the browser width ever dips below 1,000 pixels, we should remove the top margin, drop the rest of the margins from 5em to 1 and stop using up so much real estate for borders. This helps on smaller screens and netbooks, but to be able to work well all the way down to mobile, we probably want to kill our margins completely and pop the sidebars above or below our main content.

@media screen and (max-width: 500px)
#page-wrapper
margin: 0
body.one-sidebar.sidebar-first, body.one-sidebar.sidebar-second, body.two-sidebars
#content, #sidebar-second, #sidebar-first
@include full-width

<!-- /content-field --> <!-- /content-field -->

Site notice

Identi.ca is converting to pump.io some time this week

Notices where this attachment appears

  1. I F T B Q P ::   - Il fait toujours beau quelque part

    http://ur1.ca/867tm Media Queries …

    about a year ago
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

Identi.ca is a microblogging service brought to you by E14N. It runs the StatusNet microblogging software, version 1.1.0-release, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Identi.ca content and data are available under the Creative Commons Attribution 3.0 license.

Switch to mobile site layout.

Built in Montreal