]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
change all anchor alert closes to buttons
authorMark Otto <markotto@twitter.com>
Mon, 26 Mar 2012 03:41:59 +0000 (20:41 -0700)
committerMark Otto <markotto@twitter.com>
Mon, 26 Mar 2012 03:41:59 +0000 (20:41 -0700)
docs/assets/bootstrap.zip
docs/assets/css/bootstrap.css
docs/components.html
docs/templates/pages/components.mustache
less/close.less

index e083fe618748b95d0fb535cf509032ab21849564..da9137a7b3152b715ebd53a3b3c8ad57ff30cacb 100644 (file)
Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ
index 3bfd6960ef506aa022b1c869aed9cdc3ababed5c..a9fdbcffbe4758d937786e13018056644dc85a32 100644 (file)
@@ -1975,6 +1975,13 @@ table .span24 {
   filter: alpha(opacity=40);
   cursor: pointer;
 }
+button.close {
+  padding: 0;
+  cursor: pointer;
+  background-color: transparent;
+  border: 0;
+  -webkit-appearance: none;
+}
 .btn {
   display: inline-block;
   *display: inline;
index d5a3e2a99d84237990f254fbf65be9d8b9fc916b..bb9842be2d23b72211c2b960fdbee7cf945b81ad 100644 (file)
       <h3>Example alerts</h3>
       <p>Wrap your message and an optional close icon in a div with simple class.</p>
       <div class="alert">
-        <a class="close" data-dismiss="alert" href="#">&times;</a>
+        <button class="close" data-dismiss="alert">&times;</button>
         <strong>Warning!</strong> Best check yo self, you're not looking too good.
       </div>
 <pre class="prettyprint linenums">
 &lt;div class="alert"&gt;
-  &lt;a class="close" data-dismiss="alert" href="#"&gt;&times;&lt;/a&gt;
+  &lt;button class="close" data-dismiss="alert"&gt;&times;&lt;/button&gt;
   &lt;strong&gt;Warning!&lt;/strong&gt; Best check yo self, you're not looking too good.
 &lt;/div&gt;
 </pre>
       <p><span class="label label-info">Heads up!</span> iOS devices require an <code>href="#"</code> for the dismissal of alerts. Be sure to include it and the data attribute for fully responsive and dismissable alerts.</p>
       <p>Easily extend the standard alert message with two optional classes: <code>.alert-block</code> for more padding and text controls and <code>.alert-heading</code> for a matching heading.</p>
       <div class="alert alert-block">
-        <a class="close" data-dismiss="alert" href="#">&times;</a>
+        <button class="close" data-dismiss="alert">&times;</button>
         <h4 class="alert-heading">Warning!</h4>
         <p>Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p>
       </div>
     <div class="span4">
       <h3>Error or danger</h3>
       <div class="alert alert-error">
-        <a class="close" data-dismiss="alert" href="#">&times;</a>
+        <button class="close" data-dismiss="alert">&times;</button>
         <strong>Oh snap!</strong> Change a few things up and try submitting again.
       </div>
 <pre class="prettyprint linenums">
     <div class="span4">
       <h3>Success</h3>
       <div class="alert alert-success">
-        <a class="close" data-dismiss="alert" href="#">&times;</a>
+        <button class="close" data-dismiss="alert">&times;</button>
         <strong>Well done!</strong> You successfully read this important alert message.
       </div>
 <pre class="prettyprint linenums">
     <div class="span4">
       <h3>Information</h3>
       <div class="alert alert-info">
-        <a class="close" data-dismiss="alert" href="#">&times;</a>
+        <button class="close" data-dismiss="alert">&times;</button>
         <strong>Heads up!</strong> This alert needs your attention, but it's not super important.
       </div>
 <pre class="prettyprint linenums">
index d99a1ad441f8c1df265d79cb62b1533f93833518..4188ebcd71b3ae6d4fda3d9acae671f3943fba4e 100644 (file)
       <h3>{{_i}}Example alerts{{/i}}</h3>
       <p>{{_i}}Wrap your message and an optional close icon in a div with simple class.{{/i}}</p>
       <div class="alert">
-        <a class="close" data-dismiss="alert" href="#">&times;</a>
+        <button class="close" data-dismiss="alert">&times;</button>
         <strong>{{_i}}Warning!{{/i}}</strong> {{_i}}Best check yo self, you're not looking too good.{{/i}}
       </div>
 <pre class="prettyprint linenums">
 &lt;div class="alert"&gt;
-  &lt;a class="close" data-dismiss="alert" href="#"&gt;&times;&lt;/a&gt;
+  &lt;button class="close" data-dismiss="alert"&gt;&times;&lt;/button&gt;
   &lt;strong&gt;{{_i}}Warning!{{/i}}&lt;/strong&gt; {{_i}}Best check yo self, you're not looking too good.{{/i}}
 &lt;/div&gt;
 </pre>
       <p><span class="label label-info">{{_i}}Heads up!{{/i}}</span> {{_i}}iOS devices require an <code>href="#"</code> for the dismissal of alerts. Be sure to include it and the data attribute for fully responsive and dismissable alerts.{{/i}}</p>
       <p>{{_i}}Easily extend the standard alert message with two optional classes: <code>.alert-block</code> for more padding and text controls and <code>.alert-heading</code> for a matching heading.{{/i}}</p>
       <div class="alert alert-block">
-        <a class="close" data-dismiss="alert" href="#">&times;</a>
+        <button class="close" data-dismiss="alert">&times;</button>
         <h4 class="alert-heading">{{_i}}Warning!{{/i}}</h4>
         <p>{{_i}}Best check yo self, you're not looking too good.{{/i}} Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p>
       </div>
     <div class="span4">
       <h3>{{_i}}Error or danger{{/i}}</h3>
       <div class="alert alert-error">
-        <a class="close" data-dismiss="alert" href="#">&times;</a>
+        <button class="close" data-dismiss="alert">&times;</button>
         <strong>{{_i}}Oh snap!{{/i}}</strong> {{_i}}Change a few things up and try submitting again.{{/i}}
       </div>
 <pre class="prettyprint linenums">
     <div class="span4">
       <h3>{{_i}}Success{{/i}}</h3>
       <div class="alert alert-success">
-        <a class="close" data-dismiss="alert" href="#">&times;</a>
+        <button class="close" data-dismiss="alert">&times;</button>
         <strong>{{_i}}Well done!{{/i}}</strong> {{_i}}You successfully read this important alert message.{{/i}}
       </div>
 <pre class="prettyprint linenums">
     <div class="span4">
       <h3>{{_i}}Information{{/i}}</h3>
       <div class="alert alert-info">
-        <a class="close" data-dismiss="alert" href="#">&times;</a>
+        <button class="close" data-dismiss="alert">&times;</button>
         <strong>{{_i}}Heads up!{{/i}}</strong> {{_i}}This alert needs your attention, but it's not super important.{{/i}}
       </div>
 <pre class="prettyprint linenums">
index a0e5edba1b612733dc3c7b94c6265ed90656799d..b3dd894f2ed447aace3911952c750af067b51e89 100644 (file)
     cursor: pointer;
   }
 }
+
+// Additional properties for button version
+// iOS requires the button element instead of an anchor tag.
+// If you want the anchor version, it requires `href="#"`.
+button.close {
+  padding: 0;
+  cursor: pointer;
+  background-color: transparent;
+  border: 0;
+  -webkit-appearance: none;
+}
\ No newline at end of file