Skip to content

Commit

Permalink
Add important flag to .show/.hide utility classes; remove .hide requi…
Browse files Browse the repository at this point in the history
…rement from modals
  • Loading branch information
mdo committed Dec 20, 2012
1 parent a5e04c0 commit 6bd5dc7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
5 changes: 3 additions & 2 deletions docs/assets/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -4021,6 +4021,7 @@ fieldset[disabled] .navbar-inverse .btn-navbar {
top: 10%;
left: 50%;
z-index: 1050;
display: none;
width: 560px;
margin-left: -280px;
background-color: #fff;
Expand Down Expand Up @@ -4911,11 +4912,11 @@ a.badge:hover {
}

.hide {
display: none;
display: none !important;
}

.show {
display: block;
display: block !important;
}

.invisible {
Expand Down
8 changes: 4 additions & 4 deletions docs/javascript.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ <h2>Examples</h2>
<h3>Static example</h3>
<p>A rendered modal with header, body, and set of actions in the footer.</p>
<div class="bs-docs-example" style="background-color: #f5f5f5;">
<div class="modal" style="position: relative; top: auto; left: auto; right: auto; margin: 0 auto 20px; z-index: 1; max-width: 100%;">
<div class="modal" style="position: relative; top: auto; left: auto; right: auto; display: block; margin: 0 auto 20px; z-index: 1; max-width: 100%;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Modal header</h3>
Expand All @@ -201,7 +201,7 @@ <h3>Modal header</h3>
</div>
</div>
<pre class="prettyprint linenums">
&lt;div class="modal hide fade"&gt;
&lt;div class="modal fade"&gt;
&lt;div class="modal-header"&gt;
&lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
&lt;h3&gt;Modal header&lt;/h3&gt;
Expand All @@ -219,7 +219,7 @@ <h3>Modal header</h3>
<h3>Live demo</h3>
<p>Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.</p>
<!-- sample modal content -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3 id="myModalLabel">Modal Heading</h3>
Expand Down Expand Up @@ -258,7 +258,7 @@ <h4>Overflowing text to show optional scrollbar</h4>
&lt;a href="#myModal" role="button" class="btn" data-toggle="modal"&gt;Launch demo modal&lt;/a&gt;

&lt!-- Modal --&gt;
&lt;div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
&lt;div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
&lt;div class="modal-header"&gt;
&lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&times;&lt;/button&gt;
&lt;h3 id="myModalLabel"&gt;Modal header&lt;/h3&gt;
Expand Down
8 changes: 4 additions & 4 deletions docs/templates/pages/javascript.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ $('#myModal').on('show', function (e) {
<h3>Static example</h3>
<p>A rendered modal with header, body, and set of actions in the footer.</p>
<div class="bs-docs-example" style="background-color: #f5f5f5;">
<div class="modal" style="position: relative; top: auto; left: auto; right: auto; margin: 0 auto 20px; z-index: 1; max-width: 100%;">
<div class="modal" style="position: relative; top: auto; left: auto; right: auto; display: block; margin: 0 auto 20px; z-index: 1; max-width: 100%;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Modal header</h3>
Expand All @@ -134,7 +134,7 @@ $('#myModal').on('show', function (e) {
</div>
</div>{{! /example }}
<pre class="prettyprint linenums">
&lt;div class="modal hide fade"&gt;
&lt;div class="modal fade"&gt;
&lt;div class="modal-header"&gt;
&lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
&lt;h3&gt;Modal header&lt;/h3&gt;
Expand All @@ -152,7 +152,7 @@ $('#myModal').on('show', function (e) {
<h3>Live demo</h3>
<p>Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.</p>
<!-- sample modal content -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3 id="myModalLabel">Modal Heading</h3>
Expand Down Expand Up @@ -191,7 +191,7 @@ $('#myModal').on('show', function (e) {
&lt;a href="#myModal" role="button" class="btn" data-toggle="modal"&gt;Launch demo modal&lt;/a&gt;

&lt!-- Modal --&gt;
&lt;div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
&lt;div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
&lt;div class="modal-header"&gt;
&lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&times;&lt;/button&gt;
&lt;h3 id="myModalLabel"&gt;Modal header&lt;/h3&gt;
Expand Down
1 change: 1 addition & 0 deletions less/modals.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
top: 10%;
left: 50%;
z-index: @zindex-modal;
display: none;
width: 560px;
margin-left: -280px;
background-color: #fff;
Expand Down
4 changes: 2 additions & 2 deletions less/utilities.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
// -------------------------

.hide {
display: none;
display: none !important;
}
.show {
display: block;
display: block !important;
}
.invisible {
visibility: hidden;
Expand Down

0 comments on commit 6bd5dc7

Please sign in to comment.