]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Explain mixins
authorJeremy Thomas <bbxdesign@gmail.com>
Wed, 4 Jan 2017 13:30:52 +0000 (14:30 +0100)
committerJeremy Thomas <bbxdesign@gmail.com>
Wed, 4 Jan 2017 13:30:52 +0000 (14:30 +0100)
docs/_includes/footer.html
docs/_includes/subnav-overview.html
docs/_layouts/default.html
docs/bulma-docs.sass
docs/css/bulma-docs.css
docs/documentation/overview/mixins.html [new file with mode: 0644]
docs/index.html
sass/utilities/mixins.sass

index 1e9056674296b40b0473c00f53f1844e2fa1fb12..3ff4ff64b2c4d9889b9f0c3997f14a9f6f3c042f 100644 (file)
@@ -14,7 +14,9 @@
               <div class="control is-grouped">
                 <div class="control has-icon is-expanded">
                   <input type="email" value="" name="EMAIL" class="input is-flat required email" id="mce-EMAIL" placeholder="email address" required>
-                  <i class="fa fa-envelope"></i>
+                  <span class="icon is-small">
+                    <i class="fa fa-envelope"></i>
+                  </span>
                 </div>
                 <div class="control">
                   <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button is-white is-outlined">
index 92b30702babd6bd65bc02f4e88d8c243e107aaae..c4de1e9e34bb27404da596bb125becd165c6f516 100644 (file)
       <a class="nav-item is-tab {% if page.doc-subtab == 'modular' %}is-active{% endif %}" href="{{ site.url }}/documentation/overview/modular/">
         Modular
       </a>
-      <a class="nav-item is-tab {% if page.doc-subtab == 'variables' %}is-active{% endif %}" href="{{ site.url }}/documentation/overview/variables/">
-        Variables
-      </a>
       <a class="nav-item is-tab {% if page.doc-subtab == 'responsiveness' %}is-active{% endif %}" href="{{ site.url }}/documentation/overview/responsiveness/">
         Responsiveness
       </a>
       <a class="nav-item is-tab {% if page.doc-subtab == 'functions' %}is-active{% endif %}" href="{{ site.url }}/documentation/overview/functions/">
         Functions
       </a>
+      <a class="nav-item is-tab {% if page.doc-subtab == 'variables' %}is-active{% endif %}" href="{{ site.url }}/documentation/overview/variables/">
+        Variables
+      </a>
+      <a class="nav-item is-tab {% if page.doc-subtab == 'mixins' %}is-active{% endif %}" href="{{ site.url }}/documentation/overview/mixins/">
+        Mixins
+      </a>
     </div>
   </div>
 </nav>
index 410384d3e98ad8a278a068775f21c664406c5f22..dc9a5de9d4ffb262a5063b78d171e05b1b700b2b 100644 (file)
@@ -3,5 +3,6 @@
   {% include head.html %}
   <body class="layout-{{ page.layout }}{% if page.doc-tab %} page-{{ page.doc-tab}}{% endif %}">
     {{ content }}
+    {% include footer.html %}
   </body>
 </html>
index 75016141adf267cf934854d6e96180d8b3362404..368dc640186db4227b88b5b3ee8d01fbadfc8092 100644 (file)
@@ -187,10 +187,15 @@ $curve: cubic-bezier(0, 0.71, 0.29, 1)
   animation-delay: 1.2s
 
 #npm
+  align-items: center
   animation: fadeIn 500ms both
   animation-delay: 1.4s
+  background: none
+  display: flex
+  justify-content: center
   margin: -10px 0 20px
   code
+    background: $background
     border-radius: $radius
     color: $primary
     display: inline-block
index d67a5242bd0868a3192e4bf362f68c8be1a6cd8c..55898986ed5682778cfe067643d53e872079f4a3 100644 (file)
@@ -6525,12 +6525,17 @@ svg {
 }
 
 #npm {
+  align-items: center;
   animation: fadeIn 500ms both;
   animation-delay: 1.4s;
+  background: none;
+  display: flex;
+  justify-content: center;
   margin: -10px 0 20px;
 }
 
 #npm code {
+  background: whitesmoke;
   border-radius: 3px;
   color: #00d1b2;
   display: inline-block;
diff --git a/docs/documentation/overview/mixins.html b/docs/documentation/overview/mixins.html
new file mode 100644 (file)
index 0000000..5edcb68
--- /dev/null
@@ -0,0 +1,71 @@
+---
+layout: documentation
+doc-tab: overview
+doc-subtab: mixins
+---
+
+{% include subnav-overview.html %}
+
+<section class="section">
+  <div class="container">
+    <h1 class="title">Mixins</h1>
+    <h2 class="subtitle">Utility mixins for custom elements and responsive helpers</h2>
+
+    <hr>
+
+<table class="table is-bordered">
+<tr>
+  <td><code>=arrow($color)</code></td>
+  <td>Creates a CSS-only down arrow. Used for the dropdown select.</td>
+</tr>
+<tr>
+  <td><code>=block</code></td>
+  <td>Defines a margin-bottom of 1.5rem, expect when the element is the last child. Used for almost all block elements.</td>
+</tr>
+<tr>
+  <td><code>=clearfix</code></td>
+  <td>Adds a clearfix at the end of the element. Used for the "is-clearfix" helper.</td>
+</tr>
+<tr>
+  <td><code>=center($size)</code></td>
+  <td>Positions an element in the exact center of its parent. Used for the spinner in a loading button.</td>
+</tr>
+<tr>
+  <td><code>=delete</code></td>
+  <td>Creates a CSS-only cross. Used for the delete element in modals, messages, tags...</td>
+</tr>
+<tr>
+  <td><code>=fa($size, $dimensions)</code></td>
+  <td>Sets the style of a Font Awesome icon container.</td>
+</tr>
+<tr>
+  <td><code>=hamburger($dimensions)</code></td>
+  <td>Creates a CSS-only hamburger menu with 3 bars. Used for the "nav-toggle".</td>
+</tr>
+<tr>
+  <td><code>=loader</code></td>
+  <td>Creates a CSS-only loading spinner. Used for the ".loader" element, and for input and button spinners.</td>
+</tr>
+<tr>
+  <td><code>=overflow-touch</code></td>
+  <td>Sets the style of a container so that it keeps momentum when scrolling on iOS devices.</td>
+</tr>
+<tr>
+  <td><code>=overlay($offset: 0)</code></td>
+  <td>Makes the element overlay its parent container, like the transparent modal background.</td>
+</tr>
+<tr>
+  <td><code>=placeholder</code></td>
+  <td>Sets the styles of an input placeholder.</td>
+</tr>
+<tr>
+  <td><code>=unselectable</code></td>
+  <td>Turns the element unselectable. Used for buttons to prevent selection when clicking.</td>
+</tr>
+</table>
+
+    <div class="content">
+      <p>These mixins are already used throughout Bulma, but you can use them as well to extend your own styles.</p>
+    </div>
+  </div>
+</section>
index b866c81af3af56af6f27d1ecfd022942aecc6a9d..b9654a17f9921e2a1969587bdb0ca6e6cb98c7dc 100644 (file)
@@ -24,7 +24,7 @@ route: index
       </h2>
       <pre id="npm"><code>npm install bulma</code></pre>
       <div id="ghbtns" class="block">
-        <iframe src="https://ghbtns.com/github-btn.html?user=jgthms&repo=bulma&type=star&count=true&size=large" frameborder="0" scrolling="0" width="150px" height="30px"></iframe>
+        <iframe src="https://ghbtns.com/github-btn.html?user=jgthms&repo=bulma&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
         <iframe src="https://ghbtns.com/github-btn.html?user=jgthms&repo=bulma&type=fork&count=false&size=large" frameborder="0" scrolling="0" width="80px" height="30px"></iframe>
       </div>
       {% include carbon.html %}
index b246fadc3fd6458fa313e987b92c656df7213f58..8fe5702d585b53ac783c417372300be2123e5b83 100644 (file)
     &:#{$placeholder}-placeholder
       @content
 
-=replace($background, $width, $height)
-  background-color: $background
-  background-position: center center
-  background-repeat: no-repeat
-  background-size: $width $height
-  display: block
-  height: $height
-  outline: none
-  overflow: hidden
-  text-indent: -290486px
-  width: $width
-
 =unselectable
   -webkit-touch-callout: none
   -webkit-user-select: none