scaffolding.less 2.35 KB
Newer Older
1
//
2
// Scaffolding
3
// --------------------------------------------------
Jacob Thornton's avatar
Jacob Thornton committed
4

5

6
// Body reset
7
// -------------------------
Jacob Thornton's avatar
Jacob Thornton committed
8
9

body {
10
  margin: 0;
Mark Otto's avatar
Mark Otto committed
11
12
  color: @text-color;
  background-color: @body-background;
13
14
15
16
17
18
19
20
}

// Reset fonts for revelant elements
body,
input,
button,
select,
textarea {
21
22
23
  font-family: @font-family-base;
  font-size: @font-size-base;
  line-height: @line-height-base;
Jacob Thornton's avatar
Jacob Thornton committed
24
25
}

26

27
// Links
28
// -------------------------
Jacob Thornton's avatar
Jacob Thornton committed
29
30

a {
Mark Otto's avatar
Mark Otto committed
31
  color: @link-color;
Jacob Thornton's avatar
Jacob Thornton committed
32
  text-decoration: none;
33
34
}
a:hover {
Mark Otto's avatar
Mark Otto committed
35
  color: @link-color-hover;
36
  text-decoration: underline;
Jacob Thornton's avatar
Jacob Thornton committed
37
}
Mark Otto's avatar
Mark Otto committed
38
39
40
a:focus {
  .tab-focus();
}
41
42
43
44
45


// Images
// -------------------------

Mark Otto's avatar
Mark Otto committed
46
47
48
49
50
51
52
53
54
55
img {
  // Responsive images (ensure images don't scale beyond their parents)
  max-width: 100%; // Part 1: Set a maxium relative to the parent
  width: auto\9; // IE8 need help adjusting responsive images
  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching

  // Match vertical alignment with other comment elements
  vertical-align: middle;
}

Mark Otto's avatar
Mark Otto committed
56
// Rounded corners
57
.img-rounded {
58
  border-radius: 6px;
59
60
}

Mark Otto's avatar
Mark Otto committed
61
// Add polaroid-esque trim
62
63
64
65
66
.img-polaroid {
  padding: 4px;
  background-color: #fff;
  border: 1px solid #ccc;
  border: 1px solid rgba(0,0,0,.2);
67
  .box-shadow(0 1px 3px rgba(0,0,0,.1));
68
69
}

Mark Otto's avatar
Mark Otto committed
70
// Perfect circle
71
.img-circle {
72
  border-radius: 500px; // crank the border-radius so it works with most reasonably sized images
73
}
Mark Otto's avatar
Mark Otto committed
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143


// Printing
// -------------------------
// Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css

@media print {

  * {
    text-shadow: none !important;
    color: #000 !important; // Black prints faster: h5bp.com/s
    background: transparent !important;
    box-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }

  abbr[title]:after {
    content: " (" attr(title) ")";
  }

  // Don't show links for images, or javascript/internal links
  .ir a:after,
  a[href^="javascript:"]:after,
  a[href^="#"]:after {
    content: "";
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  thead {
    display: table-header-group; // h5bp.com/t
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  img {
    max-width: 100% !important;
  }

  @page {
    margin: 0.5cm;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}