From a419e70a42f7f4c8165e640774082d3fec61b4c4 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 21 Sep 2012 10:24:16 -0700 Subject: [PATCH 1/4] add specific line items to contributing doc for issues, update branch list --- CONTRIBUTING.md | 48 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f4735638b2..86de066844 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,15 +1,36 @@ # Contributing to Bootstrap -Recommendations and requirements for how to best contribute to Bootstrap. We strive to obey these as best as possible, though we may drift as development continues in our primary development branches. As always, thanks for contributing--we hope these guidelines make it easier and shed some light on our approach and processes. +Looking to contribute something to Bootstrap? **Here's how you can help.** -### Key branches -- `master` is the latest, deployed version -- `*-wip` is the official work in progress branch for the next release -### Notes on the repo + +## Reporting issues + +We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems that we can fix within the Bootstrap core. Please read the following guidelines before opening any issue. + +1. **Search for existing issues.** We get a lot of duplicate issues, and you'd help us out a lot by first checking if someone else has reported the same issue. Moreover, the issue may have already been resolved with a fix available. +2. **Create an isolated and reproducible test case.** Be sure the problem exists in Bootstrap's code with a [reduced test cases](http://css-tricks.com/reduced-test-cases/) that should be included in each bug report. +3. **Include a live example.** Make use of jsFiddle or jsBin to share your isolated test cases. +4. **Share as much information as possible.** Include operating system and version, browser and version, version of Bootstrap, customized or vanilla build, etc. where appropriate. Also include steps to reproduce the bug. + + + +## Key branches + +- `master` is the latest, deployed version. +- `gh-pages` is the hosted docs (not to be used for pull requests). +- `*-wip` is the official work in progress branch for the next release. + + + +## Notes on the repo + As of v2.0.0, Bootstrap's documentation is powered by Mustache templates and built via `make` before each commit and release. This was done to enable internationalization (translation) in a future release by uploading our strings to the [Twitter Translation Center](http://translate.twttr.com/). Any edits to the docs should be first done in the Mustache files and then recompiled into the HTML. -### Pull requests + + +## Pull requests + - Try to submit pull requests against the latest `*-wip` branch for easier merging - Any changes to the docs must be made to the Mustache templates, not just the compiled HTML pages - CSS changes must be done in .less files first, never just the compiled files @@ -17,13 +38,19 @@ As of v2.0.0, Bootstrap's documentation is powered by Mustache templates and bui - Try not to pollute your pull request with unintended changes--keep them simple and small - Try to share which browsers your code has been tested in before submitting a pull request -### Coding standards: HTML + + +## Coding standards: HTML + - Two spaces for indentation, never tabs - Double quotes only, never single quotes - Always use proper indentation - Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags) -### Coding standards: CSS + + +## Coding standards: CSS + - Adhere to the [Recess CSS property order](http://markdotto.com/2011/11/29/css-property-order/) - Multiple-line approach (one property and value per line) - Always a space after a property's colon (.e.g, `display: block;` and not `display:block;`) @@ -31,5 +58,8 @@ As of v2.0.0, Bootstrap's documentation is powered by Mustache templates and bui - For multiple, comma-separated selectors, place each selector on it's own line - Attribute selectors, like `input[type="text"]` should always wrap the attribute's value in double quotes, for consistency and safety (see this [blog post on unquoted attribute values](http://mathiasbynens.be/notes/unquoted-attribute-values) that can lead to XSS attacks). -### License + + +## License + By contributing your code, you agree to license your contribution under the terms of the APLv2: https://github.com/twitter/bootstrap/blob/master/LICENSE From af871d57c9eeb4ce1cdafd63c983bf706a89bec0 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 22 Sep 2012 22:16:12 -0700 Subject: [PATCH 2/4] fixes #5216: calculate heading sizes via math rather than fixed pixel amounts --- docs/assets/css/bootstrap.css | 28 ++++++++++++++-------------- less/type.less | 27 ++++++++++++++++----------- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 0973e4e323..fe577b8da1 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -655,7 +655,7 @@ h6 { margin: 10px 0; font-family: inherit; font-weight: bold; - line-height: 1; + line-height: 20px; color: inherit; text-rendering: optimizelegibility; } @@ -671,42 +671,42 @@ h6 small { color: #999999; } -h1 { - font-size: 36px; +h1, +h2, +h3 { line-height: 40px; } +h1 { + font-size: 38.5px; +} + h2 { - font-size: 30px; - line-height: 40px; + font-size: 31.5px; } h3 { - font-size: 24px; - line-height: 40px; + font-size: 24.5px; } h4 { - font-size: 18px; - line-height: 20px; + font-size: 17.5px; } h5 { font-size: 14px; - line-height: 20px; } h6 { - font-size: 12px; - line-height: 20px; + font-size: 11.9px; } h1 small { - font-size: 24px; + font-size: 24.5px; } h2 small { - font-size: 18px; + font-size: 17.5px; } h3 small { diff --git a/less/type.less b/less/type.less index 512ead99ee..3a05bcf0db 100644 --- a/less/type.less +++ b/less/type.less @@ -57,7 +57,7 @@ h1, h2, h3, h4, h5, h6 { margin: (@baseLineHeight / 2) 0; font-family: @headingsFontFamily; font-weight: @headingsFontWeight; - line-height: 1; + line-height: @baseLineHeight; color: @headingsColor; text-rendering: optimizelegibility; // Fix the character spacing for headings small { @@ -66,17 +66,22 @@ h1, h2, h3, h4, h5, h6 { color: @grayLight; } } -h1 { font-size: 36px; line-height: 40px; } -h2 { font-size: 30px; line-height: 40px; } -h3 { font-size: 24px; line-height: 40px; } -h4 { font-size: 18px; line-height: 20px; } -h5 { font-size: 14px; line-height: 20px; } -h6 { font-size: 12px; line-height: 20px; } -h1 small { font-size: 24px; } -h2 small { font-size: 18px; } -h3 small { font-size: 14px; } -h4 small { font-size: 14px; } +h1, +h2, +h3 { line-height: @baseLineHeight * 2; } + +h1 { font-size: @baseFontSize * 2.75; } // ~38px +h2 { font-size: @baseFontSize * 2.25; } // ~32px +h3 { font-size: @baseFontSize * 1.75; } // ~24px +h4 { font-size: @baseFontSize * 1.25; } // ~18px +h5 { font-size: @baseFontSize; } +h6 { font-size: @baseFontSize * .85; } // ~12px + +h1 small { font-size: @baseFontSize * 1.75; } // ~24px +h2 small { font-size: @baseFontSize * 1.25; } // ~18px +h3 small { font-size: @baseFontSize; } +h4 small { font-size: @baseFontSize; } // Page header From a4bf6ef0a0ace19e2e939c0484095e8d45527548 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 23 Sep 2012 15:16:13 -0700 Subject: [PATCH 3/4] match decimal placements in type.less --- less/type.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/less/type.less b/less/type.less index 3a05bcf0db..2d913dde3e 100644 --- a/less/type.less +++ b/less/type.less @@ -76,7 +76,7 @@ h2 { font-size: @baseFontSize * 2.25; } // ~32px h3 { font-size: @baseFontSize * 1.75; } // ~24px h4 { font-size: @baseFontSize * 1.25; } // ~18px h5 { font-size: @baseFontSize; } -h6 { font-size: @baseFontSize * .85; } // ~12px +h6 { font-size: @baseFontSize * 0.85; } // ~12px h1 small { font-size: @baseFontSize * 1.75; } // ~24px h2 small { font-size: @baseFontSize * 1.25; } // ~18px From f4d3d7da2e3ddbd751e053729935df1f3dd4c051 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 23 Sep 2012 16:06:28 -0700 Subject: [PATCH 4/4] ensure 100% width for .uneditable-inputs in <767px viewports --- docs/assets/css/bootstrap-responsive.css | 1 + docs/assets/css/bootstrap.css | 1 + less/forms.less | 1 + less/responsive-767px-max.less | 1 + less/tests/forms-responsive.html | 71 ++++++++++++++++++++++++ 5 files changed, 75 insertions(+) create mode 100644 less/tests/forms-responsive.html diff --git a/docs/assets/css/bootstrap-responsive.css b/docs/assets/css/bootstrap-responsive.css index 0161885af3..f1efde190e 100644 --- a/docs/assets/css/bootstrap-responsive.css +++ b/docs/assets/css/bootstrap-responsive.css @@ -820,6 +820,7 @@ margin-left: 0; } [class*="span"], + .uneditable-input[class*="span"], .row-fluid [class*="span"] { display: block; float: none; diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index fe577b8da1..4e533b2523 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -992,6 +992,7 @@ input[type="color"], font-size: 14px; line-height: 20px; color: #555555; + vertical-align: middle; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; diff --git a/less/forms.less b/less/forms.less index c155fc0041..c9fafec274 100644 --- a/less/forms.less +++ b/less/forms.less @@ -86,6 +86,7 @@ input[type="color"], line-height: @baseLineHeight; color: @gray; .border-radius(@inputBorderRadius); + vertical-align: middle; } // Reset appearance properties for textual inputs and textarea diff --git a/less/responsive-767px-max.less b/less/responsive-767px-max.less index 5cd89e4035..45ce4ebc77 100644 --- a/less/responsive-767px-max.less +++ b/less/responsive-767px-max.less @@ -58,6 +58,7 @@ } // Make all grid-sized elements block level again [class*="span"], + .uneditable-input[class*="span"], // Makes uneditable inputs full-width when using grid sizing .row-fluid [class*="span"] { float: none; display: block; diff --git a/less/tests/forms-responsive.html b/less/tests/forms-responsive.html new file mode 100644 index 0000000000..846d5b43d5 --- /dev/null +++ b/less/tests/forms-responsive.html @@ -0,0 +1,71 @@ + + + + + Bootstrap, from Twitter + + + + + + + + + + + + + + + + + + + + + + +
+ + + +

Vertical alignment

+ + + span1 + +

Width across elements

+
+ +
+
+ +
+
+ span2 +
+ + + + +
+ + + span1 +
+ +
+ + +