Skip to content

Instantly share code, notes, and snippets.

@baptistebriel
Last active August 29, 2015 13:57
Show Gist options
  • Save baptistebriel/9784705 to your computer and use it in GitHub Desktop.
Save baptistebriel/9784705 to your computer and use it in GitHub Desktop.
[LESS] - CSS config.
/* -----
Typography, WebFonts
----- */
/* -----
12 columns Responsive Grid
----- */
.row {
zoom: 1;
&:before, &:after {
content:'\0020';
display:block;
overflow:hidden;
visibility:hidden;
width:0;
height:0
}
&:after {clear:both;}
}
.device-content{
position: relative;
width: 100%;
.center-block();
}
.column{
display: block;
float: left;
}
.col-1{width:@col_1}
.col-2{width:@col_2}
.col-3{width:@col_3}
.col-4{width:@col_4}
.col-5{width:@col_5}
.col-6{width:@col_6}
.col-7{width:@col_7}
.col-8{width:@col_8}
.col-9{width:@col_9}
.col-10{width:@col_10}
.col-11{width:@col_11}
.col-12{width:@col_12}
img.scale-with-grid{
width: 100%;
height: auto;
display: block;
}
/* -----
Media Queries
----- */
@media (max-width: 480px){
html {
font-size: 93.75%;
}
}
@media (min-width: 480px) and (max-width: 767px){
}
@media (min-width: 768px) and (max-width: 959px){
}
@media (min-width: 960px) and (max-width: 1024px){
}
@media (max-width: 1024px){
}
/* -----
Retina
----- */
@media only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5){
}
/* -----
Basic Mixin'
----- */
.size(@width, @height){
width: @width;
height: @height;
} /* .size(50px,30px); */
.center-block(){
display: block;
margin-left: auto;
margin-right: auto;
} /* .center-block(); */
.scale-with-grid(){
max-width: 100%;
height: auto;
} /* .scale-with-grid(); */
.absolute(){
position: absolute;
top: 0; right: 0; bottom: 0; left:0;
margin: auto;
} /* .absolute(); */
.fixed(){
position: fixed;
top: 0; right: 0; bottom: 0; left:0;
margin: auto;
} /* .fixed(); */
/* -----
Hover
----- */
.hover-color(@color){
&:hover{color: @color;}
}
.hover-bg(@color){
&:hover{background-color: @color;}
}
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],/* 1 */
input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}
/* -----
Paths
----- */
@base-images: ~"../../images/";
@base-svg: ~"../svg/";
@base-uploads: ~"../../images/uploads/";
@base-fonts: ~"../../fonts/";
/* -----
Colors
----- */
@white: #fff;
@black: #212121;
@base: @black;
/* -----
CSS Easings
----- */
@snap: cubic-bezier(0,1,.5,1);
@easeOutCubic: cubic-bezier(.215,.61,.355,1);
@easeInOutCubic: cubic-bezier(.645,.045,.355,1);
@easeInCirc: cubic-bezier(.6,.04,.98,.335);
@easeOutCirc: cubic-bezier(.075,.82,.165,1);
@easeInOutCirc: cubic-bezier(.785,.135,.15,.86);
@easeInExpo: cubic-bezier(.95,.05,.795,.035);
@easeOutExpo: cubic-bezier(.19,1,.22,1);
@easeInOutExpo: cubic-bezier(1,0,0,1);
@easeInQuad: cubic-bezier(.55,.085,.68,.53);
@easeOutQuad: cubic-bezier(.25,.46,.45,.94);
@easeInOutQuad: cubic-bezier(.455,.03,.515,.955);
@easeInQuart: cubic-bezier(.895,.03,.685,.22);
@easeOutQuart: cubic-bezier(.165,.84,.44,1);
@easeInOutQuart: cubic-bezier(.77,0,.175,1);
@easeInQuint: cubic-bezier(.755,.05,.855,.06);
@easeOutQuint: cubic-bezier(.23,1,.32,1);
@easeInOutQuint: cubic-bezier(.86,0,.07,1);
@easeInSine: cubic-bezier(.47,0,.745,.715);
@easeOutSine: cubic-bezier(.39,.575,.565,1);
@easeInOutSine: cubic-bezier(.445,.05,.55,.95);
@easeInBack: cubic-bezier(.6,-.28,.735,.045);
@easeOutBack: cubic-bezier(.175, .885,.32,1.275);
@easeInOutBack: cubic-bezier(.68,-.55,.265,1.55);
/* -----
Font Family
----- */
@lato: 'Lato';
/* -----
Font Weight
----- */
@regular: 400;
@medium: 500;
@bold: 700;
/* -----
Font Sizes
----- */
@8px: .4rem;
@10px: .5rem;
@12px: .6rem;
@14px: .7rem;
@16px: .8rem;
@18px: .9rem;
@20px: 1rem;
@22px: 1.1rem;
@24px: 1.2rem;
@28px: 1.4rem;
@35px: 1.75rem;
@40px: 2rem;
@44px: 2.2rem;
@46px: 2.7rem;
@50px: 3rem;
@57px: 3.35rem;
/* -----
Grid
----- */
@col_1: 8.33333333333%;
@col_2: 16.6666666667%;
@col_3: 25.0%;
@col_4: 33.3333333333%;
@col_5: 41.6666666667%;
@col_6: 50.0%;
@col_7: 58.3333333333%;
@col_8: 66.6666666667%;
@col_9: 75.0%;
@col_10: 83.3333333333%;
@col_11: 91.6666666667%;
@col_12: 100%;
@import "require/_normalize.less";
@import "require/_var.less";
@import "require/_mixin.less";
@import "require/_fonts.less";
@import "require/_grid.less";
@import "require/_keyframes.less";
@import "require/_gradients.less";
/* -----
Basic Reset
----- */
*{
/* Reset. */
margin: 0;
padding: 0;
/* Box model lookingloader good. */
box-sizing: border-box;
/* Type, please look good. */
text-rendering: optimizeLegibility;
/* Type, please look good. */
-webkit-font-smoothing: antialiased;
/* Mobile tap highlight to opacity: 0; */
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
/* -----
rem & % based-typography
----- */
html {
font: 112.5%/1.5 Georgia, serif;
}
p{
font-size: 1rem;
}
/* -----
Medias Queries
----- */
@import "require/_medias.less";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment