Skip to content

Commit

Permalink
Remove global reset in favour of contextual reset.
Browse files Browse the repository at this point in the history
Rather than having a partial reset with individual elements having
their styles built back up, only elements without replacement
styles have specific properties 'reset'.

This commit also includes: a correction to the font mixin arguments
used on forms (the output is now valid CSS); the removal of
`overflow-y:scroll` from the `html` element which is now known to
cause some problems for jQuery modal plugins in Firefox.
  • Loading branch information
necolas committed Jan 20, 2012
1 parent 8825443 commit 782c994
Show file tree
Hide file tree
Showing 7 changed files with 132 additions and 176 deletions.
146 changes: 47 additions & 99 deletions bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,95 +6,8 @@
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: Thu 19 Jan 2012 22:27:04 GMT
* Date: Fri 20 Jan 2012 21:21:51 GMT
*/
html, body {
margin: 0;
padding: 0;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
cite,
code,
del,
dfn,
em,
img,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
dd,
dl,
dt,
li,
ol,
ul,
fieldset,
form,
label,
legend,
button,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td {
margin: 0;
padding: 0;
border: 0;
font-weight: normal;
font-style: normal;
font-size: 100%;
line-height: 1;
font-family: inherit;
}
table {
max-width: 100%;
border-collapse: collapse;
border-spacing: 0;
}
ol, ul {
list-style: none;
}
q:before,
q:after,
blockquote:before,
blockquote:after {
content: "";
}
html {
overflow-y: scroll;
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
a:focus {
outline: thin dotted;
}
a:hover, a:active {
outline: 0;
}
article,
aside,
details,
Expand All @@ -115,6 +28,17 @@ audio, canvas, video {
audio:not([controls]) {
display: none;
}
html {
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
a:focus {
outline: thin dotted;
}
a:hover, a:active {
outline: 0;
}
sub, sup {
position: relative;
font-size: 75%;
Expand Down Expand Up @@ -228,8 +152,6 @@ body {
width: 100%;
}
a {
font-weight: inherit;
line-height: inherit;
color: #0088cc;
text-decoration: none;
}
Expand Down Expand Up @@ -322,7 +244,7 @@ a:hover {
margin-left: 900px;
}
p {
margin-bottom: 9px;
margin: 0 0 9px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
line-height: 18px;
Expand All @@ -337,6 +259,7 @@ h3,
h4,
h5,
h6 {
margin: 0;
font-weight: bold;
color: #333333;
text-rendering: optimizelegibility;
Expand All @@ -347,6 +270,7 @@ h3 small,
h4 small,
h5 small,
h6 small {
font-weight: normal;
color: #999999;
}
h1 {
Expand Down Expand Up @@ -388,6 +312,7 @@ h6 {
text-transform: uppercase;
}
ul, ol {
padding: 0;
margin: 0 0 9px 25px;
}
ul ul,
Expand Down Expand Up @@ -428,13 +353,10 @@ hr {
border-bottom: 1px solid #fff;
}
strong {
font-style: inherit;
font-weight: bold;
}
em {
font-style: italic;
font-weight: inherit;
line-height: inherit;
}
.muted {
color: #999999;
Expand All @@ -446,8 +368,8 @@ abbr {
cursor: help;
}
blockquote {
padding-left: 15px;
margin-bottom: 18px;
padding: 0 0 0 15px;
margin: 0 0 18px;
border-left: 5px solid #eee;
}
blockquote p {
Expand All @@ -474,10 +396,17 @@ blockquote.pull-right {
blockquote.pull-right p, blockquote.pull-right small {
text-align: right;
}
q:before,
q:after,
blockquote:before,
blockquote:after {
content: "";
}
address {
display: block;
margin-bottom: 18px;
line-height: 18px;
font-style: normal;
}
code, pre {
padding: 0 3px 2px;
Expand Down Expand Up @@ -515,26 +444,40 @@ pre code {
padding: 0;
background-color: transparent;
}
small {
font-size: 100%;
}
cite {
font-style: normal;
}
form {
margin-bottom: 18px;
margin: 0 0 18px;
}
fieldset {
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: 27px;
font-size: 19.5px;
line-height: 36px;
color: #333333;
border: 0;
border-bottom: 1px solid #eee;
-webkit-margin-collapse: separate;
}
label,
input,
button,
select,
textarea {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: normal;
font-weight: 13px;
font-size: 13px;
font-weight: normal;
line-height: 18px;
}
label {
Expand Down Expand Up @@ -967,6 +910,11 @@ input:invalid:focus, textarea:invalid:focus, select:invalid:focus {
.form-horizontal .form-actions {
padding-left: 160px;
}
table {
max-width: 100%;
border-collapse: collapse;
border-spacing: 0;
}
.table {
width: 100%;
margin-bottom: 18px;
Expand Down
38 changes: 19 additions & 19 deletions bootstrap.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions lib/forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,36 @@

// Make all forms have space below them
form {
margin-bottom: @baseLineHeight;
margin: 0 0 @baseLineHeight;
}

fieldset {
padding: 0;
margin: 0;
border: 0;
}

// Groups of fields with labels on top (legends)
legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: @baseLineHeight * 1.5;
font-size: @baseFontSize * 1.5;
line-height: @baseLineHeight * 2;
color: @grayDark;
border: 0;
border-bottom: 1px solid #eee;
-webkit-margin-collapse: separate;
}

// Set font for forms
label,
input,
button,
select,
textarea {
#font > .sans-serif(normal,@baseFontSize,@baseLineHeight);
#font > .sans-serif(@baseFontSize,normal,@baseLineHeight);
}

// Identify controls by their labels
Expand Down
Loading

0 comments on commit 782c994

Please sign in to comment.