2011-11-26 06:34:55 +01:00
|
|
|
// Responsive.less
|
|
|
|
// For phone and tablet devices
|
|
|
|
// -------------------------------------------------------------
|
2011-10-16 12:15:36 +02:00
|
|
|
|
|
|
|
|
2011-12-09 20:32:07 +01:00
|
|
|
// RESPONSIVE CLASSES
|
|
|
|
// ------------------
|
|
|
|
|
|
|
|
// Hide from screenreaders and browsers
|
|
|
|
// Credit: HTML5BP
|
|
|
|
.hidden {
|
|
|
|
display: none;
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-10-16 20:35:24 +02:00
|
|
|
// UP TO LANDSCAPE PHONE
|
|
|
|
// ---------------------
|
|
|
|
|
2011-10-16 12:15:36 +02:00
|
|
|
@media (max-width: 480px) {
|
2012-01-08 12:00:06 +01:00
|
|
|
|
|
|
|
// Make the nav work for small devices
|
|
|
|
.navbar {
|
|
|
|
.nav {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 180px;
|
|
|
|
padding-top: 40px;
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
.nav,
|
|
|
|
.nav > li:last-child a {
|
|
|
|
.border-radius(0 0 4px 0);
|
|
|
|
}
|
|
|
|
.nav > li {
|
|
|
|
float: none;
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
.nav > li > a {
|
|
|
|
float: none;
|
|
|
|
background-color: #222;
|
|
|
|
}
|
|
|
|
.nav > .active {
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
.nav > .active > a {
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
.nav > .active > a:hover {
|
|
|
|
background-color: #333;
|
|
|
|
}
|
|
|
|
.nav > .active > a:after {
|
|
|
|
display: inline-block;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
margin-top: 8px;
|
|
|
|
margin-left: 6px;
|
|
|
|
text-indent: -99999px;
|
|
|
|
vertical-align: top;
|
|
|
|
border-left: 4px solid transparent;
|
|
|
|
border-right: 4px solid transparent;
|
|
|
|
border-top: 4px solid @white;
|
|
|
|
.opacity(100);
|
|
|
|
content: "↓";
|
|
|
|
}
|
|
|
|
.nav:hover > li {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
.nav:hover > li > a:hover {
|
|
|
|
background-color: #333;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-10-16 20:35:24 +02:00
|
|
|
// Remove the horizontal form styles
|
2012-01-15 06:28:47 +01:00
|
|
|
.form-horizontal .control-group > label {
|
2011-10-16 20:35:24 +02:00
|
|
|
float: none;
|
|
|
|
width: auto;
|
|
|
|
padding-top: 0;
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
// Move over all input controls and content
|
2012-01-15 06:28:47 +01:00
|
|
|
.form-horizontal .controls {
|
2011-10-16 20:35:24 +02:00
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
// Move the options list down to align with labels
|
2012-01-15 06:28:47 +01:00
|
|
|
.form-horizontal .control-list {
|
2011-10-16 20:35:24 +02:00
|
|
|
padding-top: 0; // has to be padding because margin collaspes
|
2011-10-16 12:15:36 +02:00
|
|
|
}
|
2011-10-16 20:35:24 +02:00
|
|
|
// Move over buttons in .form-actions to align with .controls
|
2012-01-15 06:28:47 +01:00
|
|
|
.form-horizontal .form-actions {
|
2011-10-16 20:35:24 +02:00
|
|
|
padding-left: 0;
|
|
|
|
}
|
2011-12-27 22:40:58 +01:00
|
|
|
|
|
|
|
// Modals
|
|
|
|
.modal {
|
|
|
|
position: fixed;
|
|
|
|
top: 20px;
|
|
|
|
left: 20px;
|
|
|
|
right: 20px;
|
|
|
|
width: auto;
|
2012-01-08 22:21:44 +01:00
|
|
|
&.fade.in { top: auto; }
|
2011-12-27 22:40:58 +01:00
|
|
|
}
|
2012-01-08 22:21:44 +01:00
|
|
|
.modal-header .close {
|
|
|
|
padding: 10px;
|
|
|
|
}
|
|
|
|
|
2011-10-16 12:15:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-10-16 20:35:24 +02:00
|
|
|
// LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2011-12-09 20:32:07 +01:00
|
|
|
@media (max-width: 768px) {
|
2012-01-08 12:00:06 +01:00
|
|
|
|
|
|
|
// Unfix the navbar
|
|
|
|
.navbar-fixed {
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.navbar-fixed .nav {
|
|
|
|
float: none;
|
|
|
|
}
|
|
|
|
|
2011-10-16 12:15:36 +02:00
|
|
|
// Remove width from containers
|
|
|
|
.container {
|
|
|
|
width: auto;
|
2011-12-09 20:32:07 +01:00
|
|
|
padding: 0 20px;
|
2011-10-16 12:15:36 +02:00
|
|
|
}
|
2011-10-23 00:49:42 +02:00
|
|
|
// Undo negative margin on rows
|
|
|
|
.row {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
2011-10-16 12:15:36 +02:00
|
|
|
// Make all columns even
|
2011-12-22 02:31:01 +01:00
|
|
|
.row > [class*="span"] {
|
2011-10-16 12:15:36 +02:00
|
|
|
float: none;
|
|
|
|
display: block;
|
|
|
|
width: auto;
|
|
|
|
margin: 0;
|
|
|
|
}
|
2011-12-09 20:32:07 +01:00
|
|
|
|
2011-10-16 12:15:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-10-16 20:35:24 +02:00
|
|
|
// PORTRAIT TABLET TO DEFAULT DESKTOP
|
|
|
|
// ----------------------------------
|
2011-10-16 12:15:36 +02:00
|
|
|
|
|
|
|
@media (min-width: 768px) and (max-width: 940px) {
|
|
|
|
|
|
|
|
// Reset grid variables
|
|
|
|
@gridColumns: 16;
|
2011-10-16 20:35:24 +02:00
|
|
|
@gridColumnWidth: 44px;
|
2011-10-16 12:15:36 +02:00
|
|
|
@gridGutterWidth: 20px;
|
|
|
|
@siteWidth: 748px;
|
|
|
|
|
|
|
|
// Bring grid mixins to recalculate widths
|
|
|
|
.columns(@columnSpan: 1) {
|
|
|
|
width: (@gridColumnWidth * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1));
|
|
|
|
}
|
|
|
|
.offset(@columnOffset: 1) {
|
2011-10-16 20:35:24 +02:00
|
|
|
margin-left: (@gridColumnWidth * @columnOffset) + (@gridGutterWidth * (@columnOffset - 1)) + @gridGutterWidth;
|
2011-10-16 12:15:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// 16cols at 30px wide with 16px gutters
|
|
|
|
.container {
|
|
|
|
width: @siteWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Default columns
|
|
|
|
.span1 { .columns(1); }
|
|
|
|
.span2 { .columns(2); }
|
|
|
|
.span3 { .columns(3); }
|
|
|
|
.span4 { .columns(4); }
|
|
|
|
.span5 { .columns(5); }
|
|
|
|
.span6 { .columns(6); }
|
|
|
|
.span7 { .columns(7); }
|
|
|
|
.span8 { .columns(8); }
|
|
|
|
.span9 { .columns(9); }
|
|
|
|
.span10 { .columns(10); }
|
|
|
|
.span11 { .columns(11); }
|
|
|
|
.span12 { .columns(12); }
|
|
|
|
|
|
|
|
// Offset column options
|
|
|
|
.offset1 { .offset(1); }
|
|
|
|
.offset2 { .offset(2); }
|
|
|
|
.offset3 { .offset(3); }
|
|
|
|
.offset4 { .offset(4); }
|
|
|
|
.offset5 { .offset(5); }
|
|
|
|
.offset6 { .offset(6); }
|
|
|
|
.offset7 { .offset(7); }
|
|
|
|
.offset8 { .offset(8); }
|
|
|
|
.offset9 { .offset(9); }
|
|
|
|
.offset10 { .offset(10); }
|
|
|
|
.offset11 { .offset(11); }
|
|
|
|
.offset12 { .offset(12); }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2011-10-16 20:35:24 +02:00
|
|
|
// LARGE DESKTOP & UP
|
|
|
|
// ------------------
|
2011-12-09 23:39:23 +01:00
|
|
|
/*
|
2011-10-17 04:12:33 +02:00
|
|
|
@media (min-width: 1210px) {
|
2011-10-16 12:15:36 +02:00
|
|
|
|
|
|
|
// Reset grid variables
|
|
|
|
@gridColumns: 12;
|
|
|
|
@gridColumnWidth: 70px;
|
|
|
|
@gridGutterWidth: 30px;
|
|
|
|
@siteWidth: 1170px;
|
|
|
|
|
|
|
|
// Bring grid mixins to recalculate widths
|
|
|
|
.columns(@columnSpan: 1) {
|
|
|
|
width: (@gridColumnWidth * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1));
|
|
|
|
}
|
|
|
|
.offset(@columnOffset: 1) {
|
|
|
|
margin-left: (@gridColumnWidth * @columnOffset) + (@gridGutterWidth * (@columnOffset - 1)) + @gridGutterWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
|
|
width: @siteWidth;
|
|
|
|
}
|
2012-01-07 09:29:36 +01:00
|
|
|
.row {
|
|
|
|
margin-left: @gridGutterWidth * -1;
|
|
|
|
}
|
2011-10-16 12:15:36 +02:00
|
|
|
[class*="span"] {
|
|
|
|
margin-left: @gridGutterWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Default columns
|
|
|
|
.span1 { .columns(1); }
|
|
|
|
.span2 { .columns(2); }
|
|
|
|
.span3 { .columns(3); }
|
|
|
|
.span4 { .columns(4); }
|
|
|
|
.span5 { .columns(5); }
|
|
|
|
.span6 { .columns(6); }
|
|
|
|
.span7 { .columns(7); }
|
|
|
|
.span8 { .columns(8); }
|
|
|
|
.span9 { .columns(9); }
|
|
|
|
.span10 { .columns(10); }
|
|
|
|
.span11 { .columns(11); }
|
|
|
|
.span12 { .columns(12); }
|
|
|
|
|
|
|
|
// Offset column options
|
|
|
|
.offset1 { .offset(1); }
|
|
|
|
.offset2 { .offset(2); }
|
|
|
|
.offset3 { .offset(3); }
|
|
|
|
.offset4 { .offset(4); }
|
|
|
|
.offset5 { .offset(5); }
|
|
|
|
.offset6 { .offset(6); }
|
|
|
|
.offset7 { .offset(7); }
|
|
|
|
.offset8 { .offset(8); }
|
|
|
|
.offset9 { .offset(9); }
|
|
|
|
.offset10 { .offset(10); }
|
|
|
|
.offset11 { .offset(11); }
|
|
|
|
.offset12 { .offset(12); }
|
|
|
|
|
2011-10-16 21:11:48 +02:00
|
|
|
}
|
2012-01-07 09:29:36 +01:00
|
|
|
*/
|