]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Change with property to max-width for <input> elements inside of a top bar, which...
authorGeoff Kimball <geoff@zurb.com>
Tue, 8 Mar 2016 18:25:25 +0000 (10:25 -0800)
committerGeoff Kimball <geoff@zurb.com>
Tue, 8 Mar 2016 18:25:25 +0000 (10:25 -0800)
scss/components/_top-bar.scss
test/visual/dropdown/in-top-bar.html [new file with mode: 0644]

index 10fb45f4e41654b7d13066c77326b1a150f695cd..cb4fcd6d034e4ffb03d76143d51bc9afbe0518c2 100644 (file)
@@ -22,7 +22,7 @@ $topbar-submenu-background: $topbar-background !default;
 /// @type Number
 $topbar-title-spacing: 1rem !default;
 
-/// Width of `<input>` elements inside the top bar.
+/// Maximum width of `<input>` elements inside the top bar.
 /// @type Number
 $topbar-input-width: 200px !default;
 
@@ -58,7 +58,7 @@ $topbar-unstack-breakpoint: medium !default;
 
   // Restrain width of inputs by default to make them easier to arrange
   input {
-    width: $topbar-input-width;
+    max-width: $topbar-input-width;
     margin-#{$global-right}: 1rem;
   }
 
diff --git a/test/visual/dropdown/in-top-bar.html b/test/visual/dropdown/in-top-bar.html
new file mode 100644 (file)
index 0000000..2470fe4
--- /dev/null
@@ -0,0 +1,55 @@
+<!doctype html>
+<!--[if IE 9]><html class="lt-ie10" lang="en" > <![endif]-->
+<html class="no-js" lang="en" dir="ltr">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>Foundation for Sites Testing</title>
+    <link href="../assets/css/foundation.css" rel="stylesheet" />
+  </head>
+  <body>
+    <div class="row column">
+      <h1>Dropdown: Inside Top Bar</h1>
+
+      <p>Text fields inside of a top bar should not be super long.</p>
+
+      <div class="top-bar">
+        <div class="top-bar-left">
+          <ul class="dropdown menu" data-dropdown-menu>
+            <li class="menu-text">Site Title</li>
+          </ul>
+        </div>
+        <div class="top-bar-right">
+          <ul class="menu">
+            <li>
+              <button class="button" type="button" data-toggle="example-dropdown">Toggle Dropdown</button>
+              <div class="dropdown-pane" id="example-dropdown" data-dropdown data-auto-focus="true">
+                Example form in a dropdown.
+                <form>
+                  <div class="row">
+                    <div class="medium-6 columns">
+                      <label>Name
+                        <input type="text" placeholder="Kirk, James T.">
+                      </label>
+                    </div>
+                    <div class="medium-6 columns">
+                      <label>Rank
+                        <input type="text" placeholder="Captain">
+                      </label>
+                    </div>
+                  </div>
+                </form>
+              </div>
+            </li>
+          </ul>
+        </div>
+      </div>
+    </div>
+
+    <script src="../assets/js/vendor.js"></script>
+    <script src="../assets/js/foundation.js"></script>
+    <script>
+      $(document).foundation();
+    </script>
+  </body>
+</html>