scaffolding.less 1.81 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
// Reset the box-sizing
// -------------------------

9
10
11
*,
*:before,
*:after {
Mark Otto's avatar
Mark Otto committed
12
  .box-sizing(border-box);
Mark Otto's avatar
Mark Otto committed
13
14
15
}


16
// Body reset
17
// -------------------------
Jacob Thornton's avatar
Jacob Thornton committed
18

19
20
21
22
23
html {
  font-size: 62.5%;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

Jacob Thornton's avatar
Jacob Thornton committed
24
body {
Mark Otto's avatar
Mark Otto committed
25
  font-family: @font-family-base;
Mark Otto's avatar
Mark Otto committed
26
  font-size: @font-size-base;
Mark Otto's avatar
Mark Otto committed
27
  line-height: @line-height-base;
Mark Otto's avatar
Mark Otto committed
28
  color: @text-color;
29
  background-color: @body-bg;
30
31
}

Chris Rebert's avatar
Chris Rebert committed
32
// Reset fonts for relevant elements
33
34
35
36
input,
button,
select,
textarea {
Mark Otto's avatar
Mark Otto committed
37
38
39
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
Jacob Thornton's avatar
Jacob Thornton committed
40
41
}

42

43
// Links
44
// -------------------------
Jacob Thornton's avatar
Jacob Thornton committed
45
46

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


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

Mark Otto's avatar
Mark Otto committed
63
img {
Mark Otto's avatar
Mark Otto committed
64
65
66
67
68
  vertical-align: middle;
}

// Responsive images (ensure images don't scale beyond their parents)
.img-responsive {
69
  display: inline-block;
Chris Rebert's avatar
Chris Rebert committed
70
  max-width: 100%; // Part 1: Set a maximum relative to the parent
Mark Otto's avatar
Mark Otto committed
71
72
73
  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
}

Mark Otto's avatar
Mark Otto committed
74
// Rounded corners
75
.img-rounded {
76
  border-radius: @border-radius-large;
77
78
}

79
// Image thumbnails
80
// See thumbnails.less for `.img-thumbnail`
81

Mark Otto's avatar
Mark Otto committed
82
// Perfect circle
83
.img-circle {
84
  border-radius: 50%; // set radius in percents
85
}
86
87
88
89
90
91
92
93
94
95
96
97


// Horizontal rules
// -------------------------

hr {
  margin-top:    @line-height-computed;
  margin-bottom: @line-height-computed;
  border: 0;
  border-top: 1px solid @hr-border;
}

98
99
100
101
102
// Only display content to screen readers
// See: http://a11yproject.com/posts/how-to-hide-content/
// -------------------------

.sr-only {
Mark Otto's avatar
Mark Otto committed
103
104
  position: absolute;
  width: 1px;
105
106
107
  height: 1px;
  margin: -1px;
  padding: 0;
Mark Otto's avatar
Mark Otto committed
108
109
110
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
111
}