In the latest Safari for Mac, its rendering engine has a little trouble with the long decimal places of our .col-*-1
grid classes, meaning if you have 12 individual columns you'll notice they come up short compared to other rows of columns. There's not much we can do here (see #9282) but you do have some options:
+ In the latest Safari for Mac, its rendering engine has a little trouble with the long decimal places of our .col-*-1
grid classes, meaning if you have 12 individual columns you'll notice they come up short compared to other rows of columns. We can't do much here (see #9282) but you do have some options:
- Add
.pull-right
to your last grid column to get the hard-right alignment
- Tweak your percentages manually to get the perfect rounding for Safari (more difficult than the first option)
@@ -683,7 +691,7 @@ if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
Overflow and scrolling
Support for overflow: hidden
on the <body>
element is quite limited in iOS and Android. To that end, when you scroll past the top or bottom of a modal in either of those devices' browsers, the <body>
content will begin to scroll.
Virtual keyboards
- Also, note that if you're using inputs in your modal – iOS has a rendering bug which doesn't update the position of fixed elements when the virtual keyboard is triggered. There are a few work arounds for this, including transforming your elements to position: absolute
or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application.
+ Also, note that if you're using inputs in your modal – iOS has a rendering bug that doesn't update the position of fixed elements when the virtual keyboard is triggered. A few work arounds for this include transforming your elements to position: absolute
or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application.
Browser zooming
Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds.
@@ -817,7 +825,7 @@ img { max-width: none; }
From there, include whatever Bootstrap components and HTML content you need to get your template setup. It's best to have a rough idea in mind of modifications to make and content to include, so be sure to spend a brief amount of time on that before moving on.
Customizing components
- There are varying degrees to customizing components, but most fall into two camps: light customizations and complete visual overhauls. Luckily, there are plenty of examples of both.
+ You can customize components to varying degrees, but most fall into two camps: light customizations and complete visual overhauls. Luckily, plenty examples of both are available.
We define light customizations as mostly surface layer changes, things like a color and font changes to existing Bootstrap components. A great example of this is the the Twitter Translation Center (coded by @mdo). Let's look at how to implement the custom button we wrote for this site, .btn-ttc
.
Instead of using the provided Bootstrap buttons, which only require just one class to start, .btn
, we'll add our own modifier class, .btn-ttc
. This will give us a slightly custom look with minimal effort.
{% highlight html %}
diff --git a/js/tests/phantom.js b/js/tests/phantom.js
deleted file mode 100644
index a9047db4ee..0000000000
--- a/js/tests/phantom.js
+++ /dev/null
@@ -1,63 +0,0 @@
-// Simple phantom.js integration script
-// Adapted from Modernizr
-
-function waitFor(testFx, onReady, timeOutMillis) {
- var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 5001 //< Default Max Timout is 5s
- , start = new Date().getTime()
- , condition = false
- , interval = setInterval(function () {
- if ((new Date().getTime() - start < maxtimeOutMillis) && !condition) {
- // If not time-out yet and condition not yet fulfilled
- condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()) //< defensive code
- } else {
- if (!condition) {
- // If condition still not fulfilled (timeout but condition is 'false')
- console.log("'waitFor()' timeout")
- phantom.exit(1)
- } else {
- // Condition fulfilled (timeout and/or condition is 'true')
- typeof(onReady) === "string" ? eval(onReady) : onReady() //< Do what it's supposed to do once the condition is fulfilled
- clearInterval(interval) //< Stop this interval
- }
- }
- }, 100) //< repeat check every 100ms
-}
-
-
-if (phantom.args.length === 0 || phantom.args.length > 2) {
- console.log('Usage: phantom.js URL')
- phantom.exit()
-}
-
-var page = new WebPage()
-
-// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this")
-page.onConsoleMessage = function(msg) {
- console.log(msg)
-};
-
-page.open(phantom.args[0], function(status){
- if (status !== "success") {
- console.log("Unable to access network")
- phantom.exit()
- } else {
- waitFor(function(){
- return page.evaluate(function(){
- var el = document.getElementById('qunit-testresult')
- if (el && el.innerText.match('completed')) {
- return true
- }
- return false
- })
- }, function(){
- var failedNum = page.evaluate(function(){
- var el = document.getElementById('qunit-testresult')
- try {
- return el.getElementsByClassName('failed')[0].innerHTML
- } catch (e) { }
- return 10000
- });
- phantom.exit((parseInt(failedNum, 10) > 0) ? 1 : 0)
- })
- }
-})
diff --git a/js/tests/server.js b/js/tests/server.js
deleted file mode 100644
index f0def8f326..0000000000
--- a/js/tests/server.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Simple connect server for phantom.js
- * Adapted from Modernizr
- */
-
-var connect = require('connect')
- , http = require('http')
- , fs = require('fs')
- , app = connect()
- .use(connect.static(__dirname + '/../../'));
-
-http.createServer(app).listen(3000);
-
-fs.writeFileSync(__dirname + '/pid.txt', process.pid, 'utf-8')
diff --git a/less/buttons.less b/less/buttons.less
index 5d60d39a71..40511ab960 100644
--- a/less/buttons.less
+++ b/less/buttons.less
@@ -17,6 +17,7 @@
text-align: center;
vertical-align: middle;
cursor: pointer;
+ background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid transparent;
border-radius: @border-radius-base;
white-space: nowrap;
diff --git a/less/forms.less b/less/forms.less
index 8966198680..32391942b2 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -133,6 +133,7 @@ output {
color: @input-color;
vertical-align: middle;
background-color: @input-bg;
+ background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid @input-border;
border-radius: @input-border-radius;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
diff --git a/less/scaffolding.less b/less/scaffolding.less
index 53e1be5acc..046eb774a3 100644
--- a/less/scaffolding.less
+++ b/less/scaffolding.less
@@ -37,17 +37,6 @@ textarea {
line-height: inherit;
}
-// Reset unusual Firefox-on-Android default style.
-//
-// See https://github.com/necolas/normalize.css/issues/214
-
-button,
-input,
-select[multiple],
-textarea {
- background-image: none;
-}
-
// Links