Selaa lähdekoodia

Add modularity

Jeremy Thomas 8 vuotta sitten
vanhempi
commit
a5a33eefe1

+ 4 - 0
docs/_includes/footer.html

@@ -95,6 +95,10 @@
       color: white;
       color: white;
     }
     }
 
 
+    a.column:hover .title strong {
+      border-bottom: 1px solid;
+    }
+
     @media screen and (max-width: 979px) {
     @media screen and (max-width: 979px) {
       .title.is-2 a {
       .title.is-2 a {
         padding-left: 0;
         padding-left: 0;

+ 6 - 3
docs/_includes/subnav-overview.html

@@ -7,12 +7,15 @@
       <a class="nav-item is-tab {% if page.doc-subtab == 'variables' %}is-active{% endif %}" href="{{ site.baseurl }}/documentation/overview/variables/">
       <a class="nav-item is-tab {% if page.doc-subtab == 'variables' %}is-active{% endif %}" href="{{ site.baseurl }}/documentation/overview/variables/">
         Variables
         Variables
       </a>
       </a>
-      <a class="nav-item is-tab {% if page.doc-subtab == 'classes' %}is-active{% endif %}" href="{{ site.baseurl }}/documentation/overview/classes/">
-        Classes
-      </a>
       <a class="nav-item is-tab {% if page.doc-subtab == 'responsiveness' %}is-active{% endif %}" href="{{ site.baseurl }}/documentation/overview/responsiveness/">
       <a class="nav-item is-tab {% if page.doc-subtab == 'responsiveness' %}is-active{% endif %}" href="{{ site.baseurl }}/documentation/overview/responsiveness/">
         Responsiveness
         Responsiveness
       </a>
       </a>
+      <a class="nav-item is-tab {% if page.doc-subtab == 'modular' %}is-active{% endif %}" href="{{ site.baseurl }}/documentation/overview/modular/">
+        Modular
+      </a>
+      <a class="nav-item is-tab {% if page.doc-subtab == 'classes' %}is-active{% endif %}" href="{{ site.baseurl }}/documentation/overview/classes/">
+        Classes
+      </a>
     </div>
     </div>
   </div>
   </div>
 </nav>
 </nav>

+ 1 - 0
docs/bulma-docs.sass

@@ -240,6 +240,7 @@ $structure-invert: $danger-invert
     border: solid $border
     border: solid $border
     border-width: 0 0 1px 1px
     border-width: 0 0 1px 1px
     color: $text-light
     color: $text-light
+    cursor: pointer
     outline: none
     outline: none
     position: absolute
     position: absolute
     right: 0
     right: 0

+ 10 - 5
docs/css/bulma-docs.css

@@ -160,7 +160,7 @@ hr {
   border: none;
   border: none;
   display: block;
   display: block;
   height: 1px;
   height: 1px;
-  margin: 40px 0;
+  margin: 20px 0;
 }
 }
 
 
 img {
 img {
@@ -2613,12 +2613,13 @@ a.box:active {
   user-select: none;
   user-select: none;
   -moz-appearance: none;
   -moz-appearance: none;
   -webkit-appearance: none;
   -webkit-appearance: none;
-  background-color: rgba(18, 18, 18, 0.2);
+  background-color: rgba(18, 18, 18, 0.1);
   border: none;
   border: none;
   border-radius: 290486px;
   border-radius: 290486px;
   cursor: pointer;
   cursor: pointer;
   display: inline-block;
   display: inline-block;
   height: 24px;
   height: 24px;
+  outline: none;
   position: relative;
   position: relative;
   vertical-align: top;
   vertical-align: top;
   width: 24px;
   width: 24px;
@@ -2646,7 +2647,7 @@ a.box:active {
 }
 }
 
 
 .delete:hover {
 .delete:hover {
-  background-color: rgba(18, 18, 18, 0.5);
+  background-color: rgba(18, 18, 18, 0.2);
 }
 }
 
 
 .delete.is-small {
 .delete.is-small {
@@ -3641,12 +3642,13 @@ a.box:active {
   user-select: none;
   user-select: none;
   -moz-appearance: none;
   -moz-appearance: none;
   -webkit-appearance: none;
   -webkit-appearance: none;
-  background-color: rgba(18, 18, 18, 0.2);
+  background-color: rgba(18, 18, 18, 0.1);
   border: none;
   border: none;
   border-radius: 290486px;
   border-radius: 290486px;
   cursor: pointer;
   cursor: pointer;
   display: inline-block;
   display: inline-block;
   height: 24px;
   height: 24px;
+  outline: none;
   position: relative;
   position: relative;
   vertical-align: top;
   vertical-align: top;
   width: 24px;
   width: 24px;
@@ -3680,7 +3682,7 @@ a.box:active {
 }
 }
 
 
 .modal-close:hover {
 .modal-close:hover {
-  background-color: rgba(18, 18, 18, 0.5);
+  background-color: rgba(18, 18, 18, 0.2);
 }
 }
 
 
 .modal-close.is-small {
 .modal-close.is-small {
@@ -4367,6 +4369,7 @@ a.panel-block:hover {
 }
 }
 
 
 .column {
 .column {
+  display: block;
   flex-basis: 0;
   flex-basis: 0;
   flex-grow: 1;
   flex-grow: 1;
   flex-shrink: 1;
   flex-shrink: 1;
@@ -5137,6 +5140,7 @@ a.panel-block:hover {
 
 
 .tile {
 .tile {
   align-items: stretch;
   align-items: stretch;
+  display: block;
   flex-basis: auto;
   flex-basis: auto;
   flex-grow: 1;
   flex-grow: 1;
   flex-shrink: 1;
   flex-shrink: 1;
@@ -6529,6 +6533,7 @@ body.page-grid .column > .notification {
   border: solid #dbdbdb;
   border: solid #dbdbdb;
   border-width: 0 0 1px 1px;
   border-width: 0 0 1px 1px;
   color: #b5b5b5;
   color: #b5b5b5;
+  cursor: pointer;
   outline: none;
   outline: none;
   position: absolute;
   position: absolute;
   right: 0;
   right: 0;

+ 97 - 0
docs/documentation/overview/modular.html

@@ -0,0 +1,97 @@
+---
+layout: documentation
+doc-tab: overview
+doc-subtab: modular
+---
+
+{% include subnav-overview.html %}
+
+<section class="section">
+  <div class="container">
+    <h1 class="title">Modular</h1>
+    <h2 class="subtitle">Just import what you <strong>need</strong></h2>
+
+    <hr>
+
+    <div class="content">
+      <p>
+        Bulma consists of <strong>29</strong> <code>.sass</code> files that you can import <strong>individually.</strong>
+      </p>
+      <p>
+        For example, let's say you only want the Bulma <strong>columns.</strong>
+        <br>
+        The file is located in the <code>bulma/sass/grid</code> folder.
+        <br>
+        Simply <strong>import</strong> it directly:
+      </p>
+{% highlight sass %}
+@import "bulma/sass/grid/columns.sass"
+{% endhighlight %}
+      <p>
+        Now you can use the classes <code>.columns</code> (for the container) and <code>.column</code> directly:
+      </p>
+{% highlight html %}
+<div class="columns">
+  <div class="column">1</div>
+  <div class="column">2</div>
+  <div class="column">3</div>
+  <div class="column">4</div>
+  <div class="column">5</div>
+</div>
+{% endhighlight %}
+
+      <hr>
+
+      <p>
+        What if you only want the <strong>button</strong> styles instead?
+      </p>
+{% highlight sass %}
+@import "bulma/sass/elements/button.sass"
+{% endhighlight %}
+      <p>
+        You can now use the <code>.button</code> class, and all its modifiers:
+      </p>
+      <ul>
+        <li>
+          <code>.is-active</code>
+        </li>
+        <li>
+          <code>.is-primary</code>,
+          <code>.is-info</code>,
+          <code>.is-success</code>...
+        </li>
+        <li>
+          <code>.is-small</code>,
+          <code>.is-medium</code>,
+          <code>.is-large</code>
+        </li>
+        <li>
+          <code>.is-outlined</code>,
+          <code>.is-inverted</code>,
+          <code>.is-link</code>
+        </li>
+        <li>
+          <code>.is-disabled</code>,
+          <code>.is-loading</code>
+        </li>
+      </ul>
+{% highlight html %}
+<a class="button">
+  Button
+</a>
+
+<a class="button is-primary">
+  Primary button
+</a>
+
+<a class="button is-large">
+  Large button
+</a>
+
+<a class="button is-loading">
+  Loading button
+</a>
+{% endhighlight %}
+    </div>
+  </div>
+</section>

+ 26 - 10
docs/index.html

@@ -47,7 +47,7 @@ route: index
   <div class="hero-body">
   <div class="hero-body">
     <div class="container">
     <div class="container">
       <nav class="columns">
       <nav class="columns">
-        <div class="column has-text-centered">
+        <a class="column has-text-centered" href="{{ site.baseurl }}/documentation/overview/responsiveness/">
           <span class="icon is-large" style="margin-right: -15px;">
           <span class="icon is-large" style="margin-right: -15px;">
             <i class="fa fa-mobile"></i>
             <i class="fa fa-mobile"></i>
           </span>
           </span>
@@ -57,20 +57,36 @@ route: index
           <span class="icon is-large" style="margin-right: 10px;">
           <span class="icon is-large" style="margin-right: 10px;">
             <i class="fa fa-desktop"></i>
             <i class="fa fa-desktop"></i>
           </span>
           </span>
-          <p class="title is-4"><strong>Responsive</strong> design</p>
-        </div>
-        <div class="column has-text-centered">
+          <p class="title is-4"><strong>Responsive</strong></p>
+          <p class="subtitle">Designed for <strong>mobile</strong>-first</p>
+        </a>
+        <a class="column has-text-centered" href="{{ site.baseurl }}/documentation/overview/modular/">
+          <span class="icon is-large" style="margin-right: -15px;">
+            <i class="fa fa-mobile"></i>
+          </span>
+          <span class="icon is-large">
+            <i class="fa fa-tablet"></i>
+          </span>
+          <span class="icon is-large" style="margin-right: 10px;">
+            <i class="fa fa-desktop"></i>
+          </span>
+          <p class="title is-4"><strong>Modular</strong></p>
+          <p class="subtitle">Just import what you <strong>need</strong></p>
+        </a>
+        <a class="column has-text-centered" href="{{ site.baseurl }}/documentation/grid/columns/">
           <span class="icon is-large">
           <span class="icon is-large">
             <i class="fa fa-css3"></i>
             <i class="fa fa-css3"></i>
           </span>
           </span>
-          <p class="title is-4">Built with <strong>Flexbox</strong></p>
-        </div>
-        <div class="column has-text-centered">
+          <p class="title is-4"><strong>Modern</strong></p>
+          <p class="subtitle">Built with <strong>Flexbox</strong></p>
+        </a>
+        <a class="column has-text-centered" href="{{ site.github }}">
           <span class="icon is-large">
           <span class="icon is-large">
             <i class="fa fa-github"></i>
             <i class="fa fa-github"></i>
           </span>
           </span>
-          <p class="title is-4">Open source on <strong><a href="{{ site.github }}">GitHub</a></strong></p>
-        </div>
+          <p class="title is-4"><strong>Free</strong></p>
+          <p class="subtitle">Open source on <strong>GitHub</strong></p>
+        </a>
       </nav>
       </nav>
     </div>
     </div>
   </div>
   </div>
@@ -285,7 +301,7 @@ route: index
           </p>
           </p>
         </div>
         </div>
         <p class="level-item">
         <p class="level-item">
-          <a class="button is-success">
+          <a class="button is-primary">
             New
             New
           </a>
           </a>
         </p>
         </p>

+ 3 - 3
sass/base/base.sass

@@ -1,5 +1,5 @@
 @charset "utf-8"
 @charset "utf-8"
 
 
-@import "minireset"
-@import "generic"
-@import "helpers"
+@import "minireset.sass"
+@import "generic.sass"
+@import "helpers.sass"

+ 1 - 1
sass/base/generic.sass

@@ -62,7 +62,7 @@ hr
   border: none
   border: none
   display: block
   display: block
   height: 1px
   height: 1px
-  margin: 40px 0
+  margin: 20px 0
 
 
 img
 img
   max-width: 100%
   max-width: 100%

+ 11 - 11
sass/components/components.sass

@@ -1,13 +1,13 @@
 @charset "utf-8"
 @charset "utf-8"
 
 
-@import "card"
-@import "highlight"
-@import "level"
-@import "media"
-@import "menu"
-@import "message"
-@import "modal"
-@import "nav"
-@import "pagination"
-@import "panel"
-@import "tabs"
+@import "card.sass"
+@import "highlight.sass"
+@import "level.sass"
+@import "media.sass"
+@import "menu.sass"
+@import "message.sass"
+@import "modal.sass"
+@import "nav.sass"
+@import "pagination.sass"
+@import "panel.sass"
+@import "tabs.sass"

+ 10 - 10
sass/elements/elements.sass

@@ -1,13 +1,13 @@
 @charset "utf-8"
 @charset "utf-8"
 
 
-@import "box"
-@import "button"
-@import "content"
-@import "form"
-@import "image"
-@import "notification"
-@import "progress"
-@import "table"
-@import "title"
+@import "box.sass"
+@import "button.sass"
+@import "content.sass"
+@import "form.sass"
+@import "image.sass"
+@import "notification.sass"
+@import "progress.sass"
+@import "table.sass"
+@import "title.sass"
 
 
-@import "other"
+@import "other.sass"

+ 1 - 0
sass/grid/columns.sass

@@ -2,6 +2,7 @@
 @import "../utilities/variables.sass"
 @import "../utilities/variables.sass"
 
 
 .column
 .column
+  display: block
   flex-basis: 0
   flex-basis: 0
   flex-grow: 1
   flex-grow: 1
   flex-shrink: 1
   flex-shrink: 1

+ 2 - 2
sass/grid/grid.sass

@@ -1,4 +1,4 @@
 @charset "utf-8"
 @charset "utf-8"
 
 
-@import "columns"
-@import "tiles"
+@import "columns.sass"
+@import "tiles.sass"

+ 1 - 0
sass/grid/tiles.sass

@@ -3,6 +3,7 @@
 
 
 .tile
 .tile
   align-items: stretch
   align-items: stretch
+  display: block
   flex-basis: auto
   flex-basis: auto
   flex-grow: 1
   flex-grow: 1
   flex-shrink: 1
   flex-shrink: 1

+ 3 - 3
sass/layout/layout.sass

@@ -1,5 +1,5 @@
 @charset "utf-8"
 @charset "utf-8"
 
 
-@import "hero"
-@import "section"
-@import "footer"
+@import "hero.sass"
+@import "section.sass"
+@import "footer.sass"

+ 3 - 2
sass/utilities/mixins.sass

@@ -34,12 +34,13 @@
   +unselectable
   +unselectable
   -moz-appearance: none
   -moz-appearance: none
   -webkit-appearance: none
   -webkit-appearance: none
-  background-color: rgba($black, 0.2)
+  background-color: rgba($black, 0.1)
   border: none
   border: none
   border-radius: 290486px
   border-radius: 290486px
   cursor: pointer
   cursor: pointer
   display: inline-block
   display: inline-block
   height: 24px
   height: 24px
+  outline: none
   position: relative
   position: relative
   vertical-align: top
   vertical-align: top
   width: 24px
   width: 24px
@@ -60,7 +61,7 @@
   &:after
   &:after
     transform: rotate(-45deg)
     transform: rotate(-45deg)
   &:hover
   &:hover
-    background-color: rgba($black, 0.5)
+    background-color: rgba($black, 0.2)
   // Sizes
   // Sizes
   &.is-small
   &.is-small
     height: 16px
     height: 16px