Browse Source

Add table variables

Jeremy Thomas 8 years ago
parent
commit
f08e3bcb5f

+ 7 - 0
CHANGELOG.md

@@ -1,5 +1,12 @@
 # Bulma Changelog
 
+## 0.2.0
+
+* Added: new branding
+* Added: modularity
+* Added: grid folder
+* Added: .github folder
+
 ## 0.1.1
 
 * Remove `flex: 1` shorthand

+ 38 - 0
docs/bulma-docs.sass

@@ -113,6 +113,22 @@ $twitter: #55acee
     opacity: 0
     transform: scale(1)
 
+@keyframes slideDown
+  0%
+    opacity: 0
+    transform: translateY(-10px)
+  100%
+    opacity: 1
+    transform: translateY(0)
+
+@keyframes slideUp
+  0%
+    opacity: 0
+    transform: translateY(10px)
+  100%
+    opacity: 1
+    transform: translateY(0)
+
 $curve: cubic-bezier(0, 0.71, 0.29, 1)
 
 #b
@@ -161,7 +177,17 @@ $curve: cubic-bezier(0, 0.71, 0.29, 1)
     height: 120px
     width: 120px
 
+#bulma
+  animation: slideDown 500ms both
+  animation-delay: 1s
+
+#modern-framework
+  animation: slideUp 500ms both
+  animation-delay: 1.2s
+
 #npm
+  animation: fadeIn 500ms both
+  animation-delay: 1.4s
   background: none
   margin: -10px 0 20px
   code
@@ -171,6 +197,18 @@ $curve: cubic-bezier(0, 0.71, 0.29, 1)
     font-size: 16px
     padding: 16px 32px
 
+#ghbtns
+  animation: slideDown 500ms both
+  animation-delay: 1.6s
+
+#carbon
+  animation: slideUp 500ms both
+  animation-delay: 1.8s
+
+#download
+  animation: fadeIn 500ms both
+  animation-delay: 2s
+
 #grid
   .notification
     padding-left: 0

File diff suppressed because it is too large
+ 124 - 213
docs/css/bulma-docs.css


+ 0 - 6
docs/documentation/overview/variables.html

@@ -189,12 +189,6 @@ doc-subtab: variables
 <tr><td><code>$desktop</code></td><td>980px</td></tr>
 <tr><td><code>$widescreen</code></td><td>1180px</td></tr>
 
-<tr><th colspan="2">Dimensions</th></tr>
-
-<tr><td><code>$column-gap</code></td><td>20px</td></tr>
-
-<tr><td><code>$nav-height</code></td><td>50px</td></tr>
-
 <tr><th colspan="2">Miscellaneous</th></tr>
 
 <tr><td><code>$easing</code></td><td>ease-out</td></tr>

+ 4 - 4
docs/index.html

@@ -16,19 +16,19 @@ route: index
         {% include svg/bulma-icon.svg %}
         {% include svg/bulma-icon.svg %}
       </p>
-      <h1 class="title">
+      <h1 id="bulma" class="title">
         Bulma
       </h1>
-      <h2 class="subtitle">
+      <h2 id="modern-framework" class="subtitle">
         A <strong>modern</strong> CSS framework based on <strong>Flexbox</strong>
       </h2>
       <pre id="npm"><code>npm install bulma</code></pre>
-      <div class="block">
+      <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=fork&count=false&size=large" frameborder="0" scrolling="0" width="80px" height="30px"></iframe>
       </div>
       {% include carbon.html %}
-      <p class="hero-buttons">
+      <p id="download" class="hero-buttons">
         <a class="button is-primary is-large" href="{{ site.download }}">
           <span class="icon">
             <i class="fa fa-download"></i>

+ 2 - 0
sass/base/generic.sass

@@ -1,6 +1,8 @@
 @import "../utilities/mixins.sass"
 @import "../utilities/variables.sass"
 
+$body-background: $white-ter !default
+
 html
   background-color: $body-background
   font-size: $size-normal

+ 3 - 1
sass/components/nav.sass

@@ -1,10 +1,12 @@
 @import "../utilities/mixins.sass"
 @import "../utilities/variables.sass"
 
+$nav-height: 50px !default
+
 // Components
 
 .nav-toggle
-  +hamburger
+  +hamburger($nav-height)
   // Responsiveness
   +tablet
     display: none

+ 4 - 5
sass/elements/button.sass

@@ -55,7 +55,7 @@
     $color-invert: nth($pair, 2)
     &.is-#{$name}
       background-color: $color
-      border-color: transparent
+      border-width: 0
       color: $color-invert
       &:hover,
       &:focus,
@@ -63,8 +63,6 @@
         background-color: darken($color, 5%)
         border-color: transparent
         color: $color-invert
-      &:active
-        border-color: transparent
       &.is-inverted
         background-color: $color-invert
         color: $color
@@ -76,6 +74,7 @@
       &.is-outlined
         background-color: transparent
         border-color: $color
+        border-width: 1px
         color: $color
         &:hover,
         &:focus
@@ -84,12 +83,12 @@
           color: $color-invert
   &.is-link
     background-color: transparent
-    border-color: transparent
+    border-width: 0
     color: $text
     text-decoration: underline
     &:hover,
     &:focus
-      background-color: $border
+      background-color: $background
       color: $text-strong
   // Sizes
   &.is-small

+ 11 - 11
sass/elements/form.sass

@@ -53,7 +53,7 @@
   &:hover
     color: $control-hover
   &.is-disabled
-    color: $text-light
+    color: $control-disabled
     pointer-events: none
     input
       pointer-events: none
@@ -82,13 +82,13 @@
     select
       width: 100%
   &:after
-    +arrow($link)
+    +arrow($control-active)
     margin-top: -6px
     right: 16px
     top: 50%
   &:hover
     &:after
-      border-color: $link-hover
+      border-color: $control-hover
   &.is-small
     height: 24px
     select
@@ -106,7 +106,7 @@
       padding-right: 52px
 
 .label
-  color: $text-strong
+  color: $control
   display: block
   font-weight: bold
   &:not(:last-child)
@@ -114,7 +114,7 @@
 
 .help
   display: block
-  font-size: $size-small
+  font-size: $control-size-small
   margin-top: 5px
   @each $name, $pair in $colors
     $color: nth($pair, 1)
@@ -155,13 +155,13 @@
       &:focus
         z-index: 3
       &:first-child
-        border-radius: $radius 0 0 $radius
+        border-radius: $control-radius 0 0 $control-radius
         select
-          border-radius: $radius 0 0 $radius
+          border-radius: $control-radius 0 0 $control-radius
       &:last-child
-        border-radius: 0 $radius $radius 0
+        border-radius: 0 $control-radius $control-radius 0
         select
-          border-radius: 0 $radius $radius 0
+          border-radius: 0 $control-radius $control-radius 0
       &.is-expanded
         flex-grow: 1
         flex-shrink: 0
@@ -178,14 +178,14 @@
   &.has-icon
     & > .fa
       +fa(14px, 24px)
-      color: $text-light
+      color: $control-icon
       pointer-events: none
       position: absolute
       top: 4px
       z-index: 4
     .input
       &:focus + .fa
-        color: $text-strong
+        color: $control-icon-active
       &.is-small + .fa
         font-size: 10.5px
         top: 0

+ 0 - 3
sass/elements/other.sass

@@ -24,9 +24,6 @@
   text-align: center
   vertical-align: top
 
-.hamburger
-  +hamburger
-
 .icon
   +fa(21px, 24px)
   .fa

+ 18 - 12
sass/elements/table.sass

@@ -1,14 +1,23 @@
 @import "../utilities/mixins.sass"
 @import "../utilities/variables.sass"
 
+$table: $text-strong !default
+$table-background: $white !default
+$table-border: $border !default
+
+$table-head: $text-light !default
+
+$table-row-hover-background: $white-ter !default
+$table-row-even-background: $white-bis !default
+
 .table
-  background-color: $white
-  color: $text-strong
+  background-color: $table-background
+  color: $table
   margin-bottom: 20px
   width: 100%
   td,
   th
-    border: 1px solid $border
+    border: 1px solid $table-border
     border-width: 0 0 1px
     padding: 8px 10px
     vertical-align: top
@@ -40,13 +49,12 @@
     text-align: left
   tr
     &:hover
-      background-color: $background
-      color: $text-strong
+      background-color: $table-row-hover-background
   thead
     td,
     th
       border-width: 0 0 2px
-      color: $text-light
+      color: $table-head
   tbody
     tr
       &:last-child
@@ -57,7 +65,7 @@
     td,
     th
       border-width: 2px 0 0
-      color: $text-light
+      color: $table-head
   // Modifiers
   &.is-bordered
     td,
@@ -86,9 +94,7 @@
   &.is-striped
     tbody
       tr
-        &:hover
-          background-color: darken($background, 2%)
-        &:nth-child(2n)
-          background-color: $background
+        &:nth-child(even)
+          background-color: $table-row-even-background
           &:hover
-            background-color: darken($background, 2%)
+            background-color: $table-row-hover-background

+ 28 - 5
sass/utilities/controls.sass

@@ -1,16 +1,39 @@
 @import "./mixins.sass"
 @import "./variables.sass"
 
+$control: $text-strong !default
+$control-background: $text-invert !default
+$control-border: $border !default
+
+$control-hover: $link-hover !default
+$control-hover-border: $border-hover !default
+
+$control-active: $link !default
+$control-active-background: $link !default
+$control-active-background-invert: $link-invert !default
+$control-active-border: $link !default
+
+$control-disabled: $border !default
+$control-disabled-background: $background !default
+
+$control-radius: $radius !default
+$control-radius-small: $radius-small !default
+$control-size: $size-normal !default
+$control-size-small: $size-small !default
+
+$control-icon: $grey-lighter !default
+$control-icon-active: $grey-light !default
+
 =control
   -moz-appearance: none
   -webkit-appearance: none
   align-items: center
   background-color: $control-background
   border: 1px solid $control-border
-  border-radius: $radius
+  border-radius: $control-radius
   color: $control
   display: inline-flex
-  font-size: $size-normal
+  font-size: $control-size
   height: 32px
   justify-content: flex-start
   line-height: 24px
@@ -27,15 +50,15 @@
     outline: none
   &[disabled],
   &.is-disabled
-    background-color: $background
-    border-color: $control-border
+    background-color: $control-disabled-background
+    border-color: $control-disabled
     cursor: not-allowed
     pointer-events: none
     +placeholder
       color: rgba($control, 0.3)
 
 =control-small
-  border-radius: $radius-small
+  border-radius: $control-radius-small
   font-size: 11px
   height: 24px
   line-height: 16px

+ 3 - 3
sass/utilities/mixins.sass

@@ -82,12 +82,12 @@
   vertical-align: top
   width: $dimensions
 
-=hamburger
+=hamburger($dimensions)
   cursor: pointer
   display: block
-  height: $nav-height
+  height: $dimensions
   position: relative
-  width: $nav-height
+  width: $dimensions
   span
     background-color: $text
     display: block

+ 36 - 52
sass/utilities/variables.sass

@@ -1,27 +1,33 @@
 @import "./functions.sass"
 
+////////////////////////////////////////////////
+////////////////////////////////////////////////
 // 1. Initial variables
 
 // Colors
-
-$black:        hsl(0, 0%, 7%) !default
-$grey-darker:  hsl(0, 0%, 14%) !default
-$grey-dark:    hsl(0, 0%, 48%) !default
-$grey:         hsl(0, 0%, 71%) !default
-$grey-light:   hsl(0, 0%, 86%) !default
-$grey-lighter: hsl(0, 0%, 96%) !default
+$black:        hsl(0, 0%, 4%) !default
+$black-bis:    hsl(0, 0%, 7%) !default
+$black-ter:    hsl(0, 0%, 14%) !default
+
+$grey-darker:  hsl(0, 0%, 21%) !default
+$grey-dark:    hsl(0, 0%, 29%) !default
+$grey:         hsl(0, 0%, 48%) !default
+$grey-light:   hsl(0, 0%, 71%) !default
+$grey-lighter: hsl(0, 0%, 86%) !default
+
+$white-ter:    hsl(0, 0%, 96%) !default
+$white-bis:    hsl(0, 0%, 98%) !default
 $white:        hsl(0, 0%, 100%) !default
 
-$orange:    hsl(14,  100%, 53%) !default
-$yellow:    hsl(48,  100%, 53%) !default
-$green:     hsl(141, 86%,  53%) !default
-$turquoise: hsl(171, 86%,  48%) !default
-$blue:      hsl(217, 100%, 53%) !default
-$purple:    hsl(271, 100%, 71%) !default
-$red:       hsl(348, 100%, 53%) !default
+$orange:       hsl(14,  100%, 53%) !default
+$yellow:       hsl(48,  100%, 53%) !default
+$green:        hsl(141, 86%,  53%) !default
+$turquoise:    hsl(171, 86%,  48%) !default
+$blue:         hsl(217, 100%, 53%) !default
+$purple:       hsl(271, 100%, 71%) !default
+$red:          hsl(348, 100%, 53%) !default
 
 // Typography
-
 $family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !default
 $family-monospace: "Inconsolata", "Consolas", "Monaco", monospace !default
 
@@ -39,20 +45,15 @@ $weight-bold: 700 !default
 $weight-title-normal: 300 !default
 $weight-title-bold: 500 !default
 
-// Dimensions
-
-$column-gap: 20px !default
-
-$nav-height: 50px !default
-
 // Miscellaneous
-
 $easing: ease-out !default
 $radius-small: 2px !default
 $radius: 3px !default
 $radius-large: 5px !default
 $speed: 86ms !default
 
+////////////////////////////////////////////////
+////////////////////////////////////////////////
 // 2. Primary colors
 
 $primary: $turquoise !default
@@ -62,15 +63,14 @@ $success: $green !default
 $warning: $yellow !default
 $danger: $red !default
 
-$light: $grey-lighter !default
-$dark: $grey-dark !default
-
-$text: $grey-dark !default
+$light: $white-ter !default
+$dark: $grey-darker !default
 
-// 3. Generated variables
+////////////////////////////////////////////////
+////////////////////////////////////////////////
+// 3. Applied variables
 
 // Invert colors
-
 $primary-invert: findColorInvert($primary) !default
 
 $info-invert: findColorInvert($info) !default
@@ -82,22 +82,20 @@ $light-invert: $dark !default
 $dark-invert: $light !default
 
 // General colors
+$body-background: $white-ter !default
 
-$body-background: $grey-lighter !default
-
-$background: $grey-lighter !default
+$background: $white-ter !default
 
-$border: $grey-light !default
-$border-hover: $grey !default
+$border: $grey-lighter !default
+$border-hover: $grey-light !default
 
 // Text colors
-
+$text: $grey-dark !default
 $text-invert: findColorInvert($text) !default
 $text-light: $grey !default
 $text-strong: $grey-darker !default
 
 // Code colors
-
 $code: $red !default
 $code-background: $background !default
 
@@ -105,34 +103,18 @@ $pre: $text !default
 $pre-background: $background !default
 
 // Link colors
-
 $link: $primary !default
 $link-invert: $primary-invert !default
 $link-visited: $purple !default
 
 $link-hover: $grey-darker !default
-$link-hover-background: $grey-lighter !default
+$link-hover-background: $white-ter !default
 $link-hover-border: $grey-darker !default
 
 $link-active: $grey-darker !default
 $link-active-border: $grey-darker !default
 
-// Control colors
-
-$control: $text-strong !default
-$control-background: $text-invert !default
-$control-border: $border !default
-
-$control-hover: $link-hover !default
-$control-hover-border: $border-hover !default
-
-$control-active: $link !default
-$control-active-background: $link !default
-$control-active-background-invert: $link-invert !default
-$control-active-border: $link !default
-
 // Typography
-
 $family-primary: $family-sans-serif !default
 $family-code: $family-monospace !default
 
@@ -142,6 +124,8 @@ $size-medium: $size-5 !default
 $size-large: $size-3 !default
 $size-huge: $size-1 !default
 
+////////////////////////////////////////////////
+////////////////////////////////////////////////
 // 4. Lists and maps
 
 $colors: (white: ($white, $black), black: ($black, $white), light: ($light, $light-invert), dark: ($dark, $dark-invert), primary: ($primary, $primary-invert), info: ($info, $info-invert), success: ($success, $success-invert), warning: ($warning, $warning-invert), danger: ($danger, $danger-invert)) !default

Some files were not shown because too many files changed in this diff