Skip to content

Instantly share code, notes, and snippets.

@jessebeach
Created July 18, 2012 02:46
Show Gist options
  • Save jessebeach/3133780 to your computer and use it in GitHub Desktop.
Save jessebeach/3133780 to your computer and use it in GitHub Desktop.
Responsivizer CSS
/* @group Responsive */
/* @group Modern browsers */
@media screen {
#navigation .content > .menu > li > a {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Keep form items from extending past the viewport edge. */
textarea,
select,
input[type="color"],
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="email"],
input[type="month"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="time"],
input[type="url"],
input[type="week"],
input[type="submit"] {
max-width: 100%;
}
}
/* @end */
/* @group Small */
@media screen and (max-width:480px) {
body,
html {
width:100%;
overflow-x:hidden;
}
.extended-menu .menu .level-1 {
-moz-box-sizing: border-box;
box-sizing: border-box;
float: none;
margin-left: 0;
padding-left: 0;
width: 100%;
}
.media-item-thumbnail {
float: none;
}
}
/* @end */
/* @group Medium */
@media screen and (min-width:480px) and (max-width:768px) {
body,
html {
width:100%;
overflow-x:hidden;
}
.extended-menu .menu .level-1 {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin-left: 0;
width: 33.3333%;
}
.extended-menu .menu .level-1:nth-child(3n-2) {
clear: left;
padding-left: 0;
padding-right: 0.5em;
}
}
/* @end */
/* @group Small and medium */
@media screen and (max-width:768px) {
body,
html {
overflow-x:hidden;
width:100%;
}
.page-width {
width: 100%;
}
.stack-width {
width: 100%;
}
img {
max-width: 100%;
height: auto;
}
.region-header .page-element {
width: auto;
}
.region-header .logo-wrapper {
margin-bottom: 0.75em;
}
.region-header .page-element .logo {
float: none;
}
.stack-navigation .box {
position: static;
left: auto;
}
/* @group Main menu */
#navigation .content > .menu > li {
border-bottom: 1px solid;
border-left: 0 none;
border-right: 1px solid;
border-color: #b8b8b8;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0 0.5em;
width: 50%;
}
#navigation .content > .menu > li:nth-child(-n+2) {
border-top: 1px solid #b8b8b8;
}
#navigation .content > .menu > li:nth-child(2n-1) {
border-left: 1px solid #b8b8b8;
}
#navigation .content > .menu > li:nth-child(2n+1) {
clear: left;
}
#navigation .content > .menu > li > a {
display: block;
padding: 1em 0;
}
#navigation .level-1 > .menu {
visibility: hidden !important;
display: none !important;
}
#navigation .pulldown-processed .more-indicator {
display: none;
}
/* @end */
.sidebar {
float: none;
margin-top: 2em;
width: 100%;
}
html.js .sidebar {
display:none;
}
.region-header .block {
text-align: left;
width: 100%;
}
.extended-menu .menu.root {
padding-left: 0;
}
.extended-menu .menu .level-1 {
margin-bottom: 2em;
}
.extended-menu .menu .level-1 > .menu {
padding-left: 0;
}
.block-search .form-text {
max-width: 450px;
}
#block-feedback-feedback {
display: none;
}
}
/* @end */
/* @end */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment