Skip to content

Instantly share code, notes, and snippets.

@andreisoriga
Last active December 28, 2015 07:36
Show Gist options
  • Select an option

  • Save andreisoriga/4962960 to your computer and use it in GitHub Desktop.

Select an option

Save andreisoriga/4962960 to your computer and use it in GitHub Desktop.
css: template
// font definitions
@font-open: 'Open Sans', sans-serif;
// color definitions
@color-bg: white;
@color-font: #333;
@color-link: #1570be;
/**
* Here I define the base style and make rewrites
*/
html { font-size: 62.5%;}
body {
background-color: @color-bg;
font-family: @font-open;
line-height: 1.4;
font-size: 1.3rem;
color: @color-font;
}
h1, h2, h3, h4, h5, h6 { font-family: @font-open; line-height: 1.4; margin: 0; font-weight: 600; }
h1 { font-size: 2.9rem; line-height: 2; margin-top: 2.4rem; }
h2 { font-size: 2.4rem; line-height: 1.8; margin-top: 2.2rem; }
h3 { font-size: 1.9rem; line-height: 1.6; margin-top: 2.0rem; }
h4 { font-size: 1.6rem; margin-top: 1.8rem; }
h5 { font-size: 1.4rem; margin-top: 1.6rem; }
h6 { font-size: 1.3rem; margin-top: 1.4rem; }
//a, a:visited { color: @color-link; text-decoration:none; }
//a:hover { text-decoration:underline; color: @color-link; }
p { margin: .5rem 0; }
// top to bottom gradient
.box-gradient-top-to-bottom (@start: #06486F, @end: #1F648D) {
background: @start; /* Old browsers */
background: -moz-linear-gradient(top, @end 0%, @start 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,@end), color-stop(100%,@start)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, @end 0%,@start 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, @end 0%,@start 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, @end 0%,@start 100%); /* IE10+ */
background: linear-gradient(to bottom, @end 0%,@start 100%); /* W3C */
}
/**
* LESS Helpers
*/
// normal shadow
.box-shadow (@a: .7rem, @b: 0.4) {
-moz-box-shadow: 0 0 @a rgba(0, 0, 0, @b);
-webkit-box-shadow: 0 0 @a rgba(0, 0, 0, @b);
box-shadow: 0 0 @a rgba(0, 0, 0, @b);
}
.box-shadow-inset (@a: .7rem, @b: 0.4) {
-moz-box-shadow: inset 0 0 @a rgba(0, 0, 0, @b);
-webkit-box-shadow: inset 0 0 @a rgba(0, 0, 0, @b);
box-shadow: inset 0 0 @a rgba(0, 0, 0, @b);
}
.box-shadow-raised {
-webkit-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 0px 0px rgba(0, 0, 0, 0.0), 0 0 40px rgba(0, 0, 0, 0.1) inset;
-moz-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 0px 0px rgba(0, 0, 0, 0.0), 0 0 40px rgba(0, 0, 0, 0.1) inset;
box-shadow: 0 13px 10px -10px rgba(0, 0, 0, 0.5), 0 0px 0px rgba(0, 0, 0, 0.0), 0 0 40px rgba(0, 0, 0, 0.1) inset;
}
// rounded corners
.box-radius (@a: .3rem) {
-moz-border-radius: @a; -webkit-border-radius: @a; border-radius: @a;
}
.box-radius (@tl, @tr, @br, @bl) {
-webkit-border-top-left-radius: @tl;
-webkit-border-top-right-radius: @tr;
-webkit-border-bottom-right-radius: @br;
-webkit-border-bottom-left-radius: @bl;
-moz-border-radius-topleft: @tl;
-moz-border-radius-topright: @tr;
-moz-border-radius-bottomright: @br;
-moz-border-radius-bottomleft: @bl;
border-top-left-radius: @tl;
border-top-right-radius: @tr;
border-bottom-right-radius: @br;
border-bottom-left-radius: @bl;
}
.inline-block {
display:inline-block;
vertical-align:top;
zoom: 1;
*display: inline;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment