Skip to content

Instantly share code, notes, and snippets.

@badlydrawnrob
Created February 3, 2013 20:46
Show Gist options
  • Save badlydrawnrob/4703589 to your computer and use it in GitHub Desktop.
Save badlydrawnrob/4703589 to your computer and use it in GitHub Desktop.
Less: Basic type setup
//
//
// Typography
// ====================================================================
body,
input,
textarea,
option,
select {
color: @gray-dark;
font-size: @font-size-base;
font-family: @font-family-base;
line-height: @line-height-base;
}
// The basics
// --------------------------------------------------------------------
p {
margin: 0 0 @line-height-base / 2;
}
.lead {
margin-bottom: 0; // instead of dirty line break
// (see Bootstrap 3.0 for proper version)
}
// Headers
// --------------------------------------------------------------------
h1,h2,h3,h4,h5,h6 {
color: @headings-color;
font-size: @font-size-base;
font-weight: @headings-font-weight;
font-family: @headings-font-family;
line-height: @line-height-base;
}
h1 {
margin-top: @line-height-base * 1.5; // Should this be zero?
margin-bottom: @line-height-base / 2;
line-height: @line-height-base * 2;
}
h2, h3 {
// margin-top: @line-height-base / 2;
margin-top: @line-height-base * 1.5;
margin-bottom: @line-height-base / 2;
line-height: @line-height-base * 1.5;
}
h4,
h5,
h6 {
margin-top: @line-height-base / 2;
margin-bottom: 0;
}
h1 { font-size: 32px; }
h2 { font-size: 21px; }
h3 { font-size: @font-size-large; }
h1,
h2,
h3 { font-weight: normal; }
// Lists
// --------------------------------------------------------------------
ul,
ol {
padding: 0;
margin: 0 0 (@line-height-base / 2) 25px;
}
ul ul,
ul ol,
ol ol,
ol ul {
margin-bottom: 0;
}
li {
line-height: @line-height-base;
}
// Everything else
// --------------------------------------------------------------------
blockquote {
padding: 0 0 0 15px;
margin: 0 0 @line-height-base;
border-left: 5px solid @gray-lighter;
p {
margin-bottom: 0;
font-size: @font-size-large;
line-height: @line-height-base * 1.25;
}
small {
display: block;
line-height: @line-height-base;
color: @gray-light;
&:before {
content: '\2014 \00A0';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment