Skip to content

Instantly share code, notes, and snippets.

@edderrd
Created May 11, 2012 04:37
Show Gist options
  • Save edderrd/2657549 to your computer and use it in GitHub Desktop.
Save edderrd/2657549 to your computer and use it in GitHub Desktop.
css: bootstrap extras styles
body { position: relative; padding-top: 90px; }
/* Responsive tests
------------------------- */
.responsive-utilities-test {
margin-top: 5px;
margin-left: 0;
list-style: none;
overflow: hidden; /* clear floats */
}
.responsive-utilities-test li {
position: relative;
float: left;
width: 25%;
height: 43px;
font-size: 14px;
font-weight: bold;
line-height: 43px;
color: #999;
text-align: center;
border: 1px solid #ddd;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.responsive-utilities-test li + li {
margin-left: 10px;
}
.responsive-utilities-test span {
position: absolute;
top: -1px;
left: -1px;
right: -1px;
bottom: -1px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.responsive-utilities-test span {
color: #468847;
background-color: #dff0d8;
border: 1px solid #d6e9c6;
}
/* Responsive Docs
-------------------------------------------------- */
@media (max-width: 480px) {
/* Reduce padding above jumbotron */
body {
padding-top: 70px;
}
/* Change up some type stuff */
h2 {
margin-top: 27px;
}
h2 small {
display: block;
line-height: 18px;
}
h3 {
margin-top: 18px;
}
/* Adjust the jumbotron */
.jumbotron h1,
.jumbotron p {
text-align: center;
margin-right: 0;
}
.jumbotron h1 {
font-size: 45px;
margin-right: 0;
}
.jumbotron p {
margin-right: 0;
margin-left: 0;
font-size: 18px;
line-height: 24px;
}
.jumbotron .btn {
display: block;
font-size: 18px;
padding: 10px 14px;
margin: 0 auto 10px;
}
/* Masthead (home page jumbotron) */
.masthead {
padding-top: 0;
}
/* Don't space out quick links so much */
.quick-links {
margin: 40px 0 0;
}
/* hide the bullets on mobile since our horizontal space is limited */
.quick-links .divider {
display: none;
}
/* center example sites */
.example-sites {
margin-left: 0;
}
.example-sites > li {
float: none;
display: block;
max-width: 280px;
margin: 0 auto 18px;
text-align: center;
}
.example-sites .thumbnail > img {
max-width: 270px;
}
table code {
white-space: normal;
word-wrap: break-word;
word-break: break-all;
}
/* Modal example */
.modal-example .modal {
position: relative;
top: auto;
right: auto;
bottom: auto;
left: auto;
}
}
@media (max-width: 768px) {
/* Remove any padding from the body */
body {
padding-top: 0;
}
/* Jumbotron buttons */
.jumbotron .btn {
margin-bottom: 10px;
}
/* Subnav */
.subnav {
position: static;
top: auto;
z-index: auto;
width: auto;
height: auto;
background: #fff; /* whole background property since we use a background-image for gradient */
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.subnav .nav > li {
float: none;
}
.subnav .nav > li > a {
border: 0;
}
.subnav .nav > li + li > a {
border-top: 1px solid #e5e5e5;
}
.subnav .nav > li:first-child > a,
.subnav .nav > li:first-child > a:hover {
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
/* Popovers */
.large-bird {
display: none;
}
.popover-well .popover-wrapper {
margin-left: 0;
}
/* Space out the show-grid examples */
.show-grid [class*="span"] {
margin-bottom: 5px;
}
/* Unfloat the back to top link in footer */
.footer .pull-right {
float: none;
}
.footer p {
margin-bottom: 9px;
}
}
@media (min-width: 480px) and (max-width: 768px) {
/* Scale down the jumbotron content */
.jumbotron h1 {
font-size: 54px;
}
.jumbotron p {
margin-right: 0;
margin-left: 0;
}
}
@media (min-width: 768px) and (max-width: 980px) {
/* Remove any padding from the body */
body {
padding-top: 0;
}
/* Scale down the jumbotron content */
.jumbotron h1 {
font-size: 72px;
}
}
@media (max-width: 980px) {
/* Unfloat brand */
.navbar-fixed-top .brand {
float: left;
margin-left: 0;
padding-left: 10px;
padding-right: 10px;
}
/* Inline-block quick links for more spacing */
.quick-links li {
display: inline-block;
margin: 5px;
}
}
/* LARGE DESKTOP SCREENS */
@media (min-width: 1210px) {
/* Update subnav container */
.subnav-fixed .nav {
width: 1168px; /* 2px less to account for left/right borders being removed when in fixed mode */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment