scaffolding.less 2.68 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
10
11
12
13
14
15
16
17
18
html {
  font-size: 62.5%;
  // Touch the Mobile Magic™
  -webkit-overflow-scrolling: touch;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

// Disable iOS/WinMobile font size changes
@media screen and (max-device-width: 480px) {
  html {
19
20
    -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
21
22
23
  }
}

Jacob Thornton's avatar
Jacob Thornton committed
24
body {
25
  margin: 0;
Mark Otto's avatar
Mark Otto committed
26
  color: @text-color;
27
28
29
30
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-size: 1.4rem;
  line-height: 1.5;
Mark Otto's avatar
Mark Otto committed
31
  background-color: @body-background;
32
33
34
35
36
37
38
39
}

// Reset fonts for revelant elements
body,
input,
button,
select,
textarea {
40
41
42
  font-family: @font-family-base;
  font-size: @font-size-base;
  line-height: @line-height-base;
Jacob Thornton's avatar
Jacob Thornton committed
43
44
}

45

46
// Links
47
// -------------------------
Jacob Thornton's avatar
Jacob Thornton committed
48
49

a {
Mark Otto's avatar
Mark Otto committed
50
  color: @link-color;
Jacob Thornton's avatar
Jacob Thornton committed
51
  text-decoration: none;
52
53
}
a:hover {
Mark Otto's avatar
Mark Otto committed
54
  color: @link-color-hover;
55
  text-decoration: underline;
Jacob Thornton's avatar
Jacob Thornton committed
56
}
Mark Otto's avatar
Mark Otto committed
57
58
59
a:focus {
  .tab-focus();
}
60
61
62
63
64


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

Mark Otto's avatar
Mark Otto committed
65
66
67
68
69
70
71
72
73
74
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
75
// Rounded corners
76
.img-rounded {
77
  border-radius: 6px;
78
79
}

80
81
82
83
// Image thumbnails
.img-thumbnail {
  .thumbnail();
  display: inline-block;
84
85
}

Mark Otto's avatar
Mark Otto committed
86
// Perfect circle
87
.img-circle {
88
  border-radius: 500px; // crank the border-radius so it works with most reasonably sized images
89
}
Mark Otto's avatar
Mark Otto committed
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159


// 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;
  }
}