|
// Global Defaults // |
|
@mobile-width: 100%; |
|
@tablet-width: 720px; |
|
@desktop-width: 940px; |
|
|
|
|
|
// Resonsive Design Break Points |
|
@mobile-breakpoint: @tablet-width + 19px; |
|
@tablet-breakpoint: @tablet-width + 20px; |
|
@desktop-breakpoint: @desktop-width + 19px; |
|
|
|
|
|
// Grid generators params |
|
@row-margin: 10px; |
|
@col-margin: 2%; |
|
|
|
|
|
|
|
/* Micro Clearfix */ |
|
.clear, |
|
.section, |
|
.checkbox { |
|
&:before, &:after { content: ""; display: table; } |
|
&:after { clear: both; } |
|
} |
|
|
|
|
|
/* Common Classes */ |
|
.left { float: left; } |
|
.right { float: right; } |
|
.block { display: block; } |
|
.inline-block { display: inline-block; } |
|
.inline { display: inline; } |
|
.visuallyhidden { |
|
border: 0; |
|
clip: "~rect(0 0 0 0)"; |
|
height: 1px; |
|
overflow: hidden; |
|
padding: 0; |
|
position: absolute; |
|
width: 1px; |
|
left: -9999em; |
|
} |
|
.visuallyvisible { |
|
clip: "~(auto)"; |
|
clip: auto; |
|
width: auto; |
|
height: auto; |
|
overflow: visible; |
|
left: 0; |
|
} |
|
|
|
|
|
|
|
/* ========================================================================== |
|
/* Grid Layout (Responsive) |
|
========================================================================== */ |
|
/* Sections & Content Blocks */ |
|
|
|
.section { position: relative; } |
|
|
|
.row { margin-bottom: @row-margin; } |
|
|
|
.center { margin: 0 auto; } |
|
|
|
.container { |
|
max-width: @desktop-width; |
|
margin: 0 auto; |
|
padding-left: 10px; |
|
padding-right: 10px; |
|
} |
|
.container-full { |
|
max-width: @desktop-width + 20px; |
|
margin: 0 auto; |
|
} |
|
|
|
.none, |
|
.nodesktop { |
|
display: none; |
|
} |
|
|
|
.nocolmargin() { |
|
margin-left: 0; |
|
} |
|
|
|
/* Fluid Grid */ |
|
|
|
.col { |
|
margin-left: @col-margin; |
|
float: left; |
|
&:first-child { |
|
.nocolmargin(); |
|
} |
|
} |
|
|
|
|
|
// Generators |
|
// ========================================================================== |
|
|
|
|
|
///* Columns */ |
|
.column(@col, @of, @attr: width) { |
|
@percents: (((100% - @col-margin * (@of - 1)) / @of) * @col) + @col-margin * (@col - 1); |
|
width: @percents; |
|
} |
|
.__columns(0, @total, @prefix) {} |
|
.__columns(@cur, @total, @prefix: span) when (@cur > 0) { |
|
.@{prefix}-@{cur} { .column(@cur, @total); } |
|
.__columns((@cur - 1), @total, @prefix); |
|
} |
|
._columns(@prefix: span, @total: 12) { .__columns(@total, @total, @prefix); } |
|
|
|
|
|
///* Offsets */ |
|
.offset(@col, @of, @attr: width) { |
|
@percents: (((100% - @col-margin * (@of - 1)) / @of) * @col) + @col-margin * (@col - 1); |
|
margin-left: @percents; |
|
} |
|
.__offsets(0, @total, @prefix) {} |
|
.__offsets(@cur, @total, @prefix: span) when (@cur > 0) { |
|
.@{prefix}-offset-@{cur}, .@{prefix}-offset-@{cur}:first-child { .offset(@cur, @total); } |
|
.__offsets((@cur - 1), @total, @prefix); |
|
} |
|
._offsets(@prefix: span, @total: 12) { |
|
.__offsets(@total, @total, @prefix); |
|
.@{prefix}-offset-0 { margin-left: @col-margin; } |
|
.@{prefix}-offset-0:first-child { margin-left: 0 } |
|
} |
|
|
|
|
|
// Base columns |
|
// ========================================================================== |
|
|
|
.columns(@prefix: span, @columns: 12) { |
|
|
|
._columns(@prefix, @columns); |
|
._offsets(@prefix, @columns); |
|
|
|
.@{prefix}-first { .nocolmargin(); } |
|
.@{prefix}-top { margin-top: @row-margin } |
|
.@{prefix}-full { |
|
.clear(); |
|
width: 100%; |
|
margin: @row-margin 0 0 0; |
|
|
|
&:first-child { |
|
margin-top: 0; |
|
} |
|
} |
|
.no@{prefix} { .none(); } |
|
.show@{prefix} { .block(); } |
|
} |
|
|
|
.columns(span); |
|
|
|
.grid-8 { |
|
._columns(span, 8); |
|
} |
|
|
|
|
|
|
|
/* ========================================================================== |
|
/* -- Tablet Devices (Layout, Modifications, etc) |
|
========================================================================== */ |
|
@media only screen and (min-width: @tablet-breakpoint) and (max-width: @desktop-breakpoint) { |
|
|
|
.container { |
|
width: @tablet-width; |
|
padding-left: 10px; |
|
padding-right: 10px; |
|
} |
|
|
|
.columns(tablet); |
|
|
|
} /* End Tablet Media Query */ |
|
|
|
|
|
|
|
|
|
/* ========================================================================== |
|
/* -- Mobile Devices (Layout, Modifications, etc) |
|
========================================================================== */ |
|
@media only screen and (max-width: @mobile-breakpoint) { |
|
|
|
.columns(mobile); |
|
|
|
.container { |
|
padding-left: 20px; |
|
padding-right: 20px; |
|
} |
|
|
|
/* Mobile Tables */ |
|
table th, |
|
table td { |
|
padding: 4px; |
|
} |
|
|
|
/* Mobile Forms */ |
|
input[type=text], |
|
input[type=password], |
|
input[type=email], |
|
input[type=search], |
|
input[type=tel], |
|
|
|
textarea { |
|
width: 94%; |
|
padding: 7px 2%; |
|
} |
|
|
|
select { |
|
width: 90%; |
|
} |
|
} /* End Mobile Media Query */ |