reset.less 2.93 KB
Newer Older
1
2
3
4
5
//
// Modals
// Adapted from http://github.com/necolas/normalize.css
// --------------------------------------------------

6

7
8
9
10
11
12
13
14
15
16
17
18
19
// Display in IE6-9 and FF3
// -------------------------

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section {
20
  display: block;
21
22
23
24
}

// Display block in IE6-9 and FF3
// -------------------------
25

26
27
28
29
30
31
32
33
34
35
audio,
canvas,
video {
  display: inline-block;
  *display: inline;
  *zoom: 1;
}

// Prevents modern browsers from displaying 'audio' without controls
// -------------------------
36

37
38
39
40
audio:not([controls]) {
    display: none;
}

41
42
43
44
45
46
47
48
49
50
// Base settings
// -------------------------

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
      -ms-text-size-adjust: 100%;
}
// Focus states
a:focus {
Mark Otto's avatar
Mark Otto committed
51
  .tab-focus();
52
53
54
55
56
57
58
}
// Hover & Active
a:hover,
a:active {
  outline: 0;
}

59
60
// Prevents sub and sup affecting line-height in all browsers
// -------------------------
61

62
63
sub,
sup {
64
  position: relative;
65
66
67
68
69
70
71
72
73
74
75
76
77
  font-size: 75%;
  line-height: 0;
  vertical-align: baseline;
}
sup {
  top: -0.5em;
}
sub {
  bottom: -0.25em;
}

// Img border in a's and image quality
// -------------------------
78

79
img {
80
81
  /* Responsive images (ensure images don't scale beyond their parents) */
  max-width: 100%; /* Part 1: Set a maxium relative to the parent */
82
  width: auto\9; /* IE7-8 need help adjusting responsive images */
83
84
  height: auto; /* Part 2: Scale the height according to the width, otherwise you get stretching */

85
  vertical-align: middle;
86
87
  border: 0;
  -ms-interpolation-mode: bicubic;
88
89
}

90
// Prevent max-width from affecting Google Maps
91
92
#map_canvas img,
.google-maps img {
93
94
95
  max-width: none;
}

96
97
98
99
100
101
102
103
104
// Forms
// -------------------------

// Font size in all browsers, margin changes, misc consistency
button,
input,
select,
textarea {
  margin: 0;
105
  font-size: 100%;
106
  vertical-align: middle;
107
108
109
110
}
button,
input {
  *overflow: visible; // Inner spacing ie IE6/7
111
  line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
112
113
114
115
}
button::-moz-focus-inner,
input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
  padding: 0;
116
  border: 0;
117
118
}
button,
119
html input[type="button"], // Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls.
120
121
input[type="reset"],
input[type="submit"] {
122
123
    -webkit-appearance: button; // Corrects inability to style clickable `input` types in iOS.
    cursor: pointer; // Improves usability and consistency of cursor style between image-type `input` and others.
124
125
126
127
128
}
input[type="search"] { // Appearance in Safari/Chrome
  -webkit-box-sizing: content-box;
     -moz-box-sizing: content-box;
          box-sizing: content-box;
129
  -webkit-appearance: textfield;
130
}
131
132
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
133
134
135
136
137
  -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
}
textarea {
  overflow: auto; // Remove vertical scrollbar in IE6-9
  vertical-align: top; // Readability and alignment cross-browser
138
}