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

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


17
// Body reset
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
Jacob Thornton's avatar
Jacob Thornton committed
44
45

a {
Mark Otto's avatar
Mark Otto committed
46
  color: @link-color;
Jacob Thornton's avatar
Jacob Thornton committed
47
  text-decoration: none;
Zlatan Vasović's avatar
Zlatan Vasović committed
48
49
50
51
52
53
54
55
56
57

  &:hover,
  &:focus {
    color: @link-hover-color;
    text-decoration: underline;
  }

  &:focus {
    .tab-focus();
  }
Mark Otto's avatar
Mark Otto committed
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
  vertical-align: middle;
}

// Responsive images (ensure images don't scale beyond their parents)
68
69
.img-responsive {
  .img-responsive();
Mark Otto's avatar
Mark Otto committed
70
71
}

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

77
// Image thumbnails
78
79
80
81
82
83
84
85
86
87
88
89
90
//
// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
.img-thumbnail {
  padding: @thumbnail-padding;
  line-height: @line-height-base;
  background-color: @thumbnail-bg;
  border: 1px solid @thumbnail-border;
  border-radius: @thumbnail-border-radius;
  .transition(all .2s ease-in-out);

  // Keep them at most 100% wide
  .img-responsive(inline-block);
}
91

Mark Otto's avatar
Mark Otto committed
92
// Perfect circle
93
.img-circle {
94
  border-radius: 50%; // set radius in percents
95
}
96
97
98
99
100
101
102
103
104
105
106


// Horizontal rules

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

107

108
// Only display content to screen readers
109
//
110
111
112
// See: http://a11yproject.com/posts/how-to-hide-content/

.sr-only {
Mark Otto's avatar
Mark Otto committed
113
114
  position: absolute;
  width: 1px;
115
116
117
  height: 1px;
  margin: -1px;
  padding: 0;
Mark Otto's avatar
Mark Otto committed
118
  overflow: hidden;
119
  clip: rect(0,0,0,0);
Mark Otto's avatar
Mark Otto committed
120
  border: 0;
121
}