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

5

Mark Otto's avatar
Mark Otto committed
6
7
8
9
// Reset the box-sizing
// -------------------------

* {
Mark Otto's avatar
Mark Otto committed
10
  .box-sizing(border-box);
Mark Otto's avatar
Mark Otto committed
11
12
13
}


14
// Body reset
15
// -------------------------
Jacob Thornton's avatar
Jacob Thornton committed
16

17
18
19
20
21
22
23
24
25
26
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 {
27
28
    -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
29
30
31
  }
}

Jacob Thornton's avatar
Jacob Thornton committed
32
body {
Mark Otto's avatar
Mark Otto committed
33
  font-family: @font-family-base;
Mark Otto's avatar
Mark Otto committed
34
  font-size: @font-size-base;
Mark Otto's avatar
Mark Otto committed
35
  line-height: @line-height-base;
Mark Otto's avatar
Mark Otto committed
36
  color: @text-color;
37
  background-color: @body-bg;
38
39
40
41
42
43
44
}

// Reset fonts for revelant elements
input,
button,
select,
textarea {
Mark Otto's avatar
Mark Otto committed
45
46
47
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
Jacob Thornton's avatar
Jacob Thornton committed
48
49
}

50

51
// Links
52
// -------------------------
Jacob Thornton's avatar
Jacob Thornton committed
53
54

a {
Mark Otto's avatar
Mark Otto committed
55
  color: @link-color;
Jacob Thornton's avatar
Jacob Thornton committed
56
  text-decoration: none;
57
}
58
59
a:hover,
a:focus {
60
  color: @link-hover-color;
61
  text-decoration: underline;
Jacob Thornton's avatar
Jacob Thornton committed
62
}
Mark Otto's avatar
Mark Otto committed
63
64
65
a:focus {
  .tab-focus();
}
66
67
68
69
70


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

Mark Otto's avatar
Mark Otto committed
71
72
73
74
75
76
77
78
79
img {
  // Responsive images (ensure images don't scale beyond their parents)
  max-width: 100%; // Part 1: Set a maxium relative to the parent
  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
80
// Rounded corners
81
.img-rounded {
82
  border-radius: 6px;
83
84
}

85
// Image thumbnails
86
// See thumbnails.less for `.img-thumbnail`
87

Mark Otto's avatar
Mark Otto committed
88
// Perfect circle
89
.img-circle {
90
  border-radius: 500px; // crank the border-radius so it works with most reasonably sized images
91
}