scaffolding.less 2.52 KB
Newer Older
1
2
/*
 * Scaffolding
3
 * Basic and global styles for generating a grid system, structural layout, and page templates
4
 * ------------------------------------------------------------------------------------------- */
Jacob Thornton's avatar
Jacob Thornton committed
5

6
7
8

// GRID SYSTEM
// -----------
Jacob Thornton's avatar
Jacob Thornton committed
9

10
.row {
Jacob Thornton's avatar
Jacob Thornton committed
11
  .clearfix();
12
  margin-left: -1 * @gridGutterWidth;
13

14
15
16
  // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7)
  // Credit to @dhg for the idea
  [class^="span"] {
17
    display: inline;
18
    float: left;
19
    margin-left: @gridGutterWidth;
20
  }
21

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
  // 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); }
  .span13    { .columns(13); }
  .span14    { .columns(14); }
  .span15    { .columns(15); }
  .span16    { .columns(16); }
39

40
41
42
43
44
45
46
47
48
  // 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); }
Mark Otto's avatar
Mark Otto committed
49
  .offset9   { .offset(9); }
50
51
52
  .offset10  { .offset(10); }
  .offset11  { .offset(11); }
  .offset12  { .offset(12); }
53
54
55
56

  // Unique column sizes for 16-column grid
  .span-one-third     { width: 300px; }
  .span-two-thirds    { width: 620px; }
Mark Otto's avatar
Mark Otto committed
57
58
  .offset-one-third   { margin-left: 340px; }
  .offset-two-thirds  { margin-left: 660px; }
Jacob Thornton's avatar
Jacob Thornton committed
59
60
61
}


62
63
// STRUCTURAL LAYOUT
// -----------------
Jacob Thornton's avatar
Jacob Thornton committed
64
65
66
67
68

html, body {
  background-color: #fff;
}
body {
69
  margin: 0;
70
  #font > .sans-serif(normal,@basefont,@baseline);
Jacob Thornton's avatar
Jacob Thornton committed
71
72
73
74
  color: @gray;
}

// Container (centered, fixed-width layouts)
Mark Otto's avatar
Mark Otto committed
75
.container {
76
  .fixed-container();
Jacob Thornton's avatar
Jacob Thornton committed
77
78
79
}

// Fluid layouts (left aligned, with sidebar, min- & max-width content)
Mark Otto's avatar
Mark Otto committed
80
.container-fluid {
81
82
  padding-left: 20px;
  padding-right: 20px;
Jacob Thornton's avatar
Jacob Thornton committed
83
  .clearfix();
84
  > .sidebar {
Jacob Thornton's avatar
Jacob Thornton committed
85
86
87
    float: left;
    width: 220px;
  }
88
  // TODO in v2: rename this and .popover .content to be more specific
89
  > .content {
Jacob Thornton's avatar
Jacob Thornton committed
90
91
92
93
94
95
    min-width: 700px;
    max-width: 1180px;
    margin-left: 240px;
  }
}

96
97
98
99
100
101
102
.hide {
  display: none;
}

.show {
  display: block;
}
Jacob Thornton's avatar
Jacob Thornton committed
103

104
105
// BASE STYLES
// -----------
Jacob Thornton's avatar
Jacob Thornton committed
106
107
108

// Links
a {
109
  color: @linkColor;
Jacob Thornton's avatar
Jacob Thornton committed
110
111
  text-decoration: none;
  line-height: inherit;
112
  font-weight: inherit;
Jacob Thornton's avatar
Jacob Thornton committed
113
  &:hover {
114
    color: @linkColorHover;
Jacob Thornton's avatar
Jacob Thornton committed
115
116
117
    text-decoration: underline;
  }
}