Add table variables

This commit is contained in:
Jeremy Thomas 2016-09-24 16:04:53 +01:00
parent a52f81a597
commit f08e3bcb5f
14 changed files with 415 additions and 403 deletions

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -189,12 +189,6 @@ doc-subtab: variables
<tr><td><code>$desktop</code></td><td>980px</td></tr> <tr><td><code>$desktop</code></td><td>980px</td></tr>
<tr><td><code>$widescreen</code></td><td>1180px</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><th colspan="2">Miscellaneous</th></tr>
<tr><td><code>$easing</code></td><td>ease-out</td></tr> <tr><td><code>$easing</code></td><td>ease-out</td></tr>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,16 +1,39 @@
@import "./mixins.sass" @import "./mixins.sass"
@import "./variables.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 =control
-moz-appearance: none -moz-appearance: none
-webkit-appearance: none -webkit-appearance: none
align-items: center align-items: center
background-color: $control-background background-color: $control-background
border: 1px solid $control-border border: 1px solid $control-border
border-radius: $radius border-radius: $control-radius
color: $control color: $control
display: inline-flex display: inline-flex
font-size: $size-normal font-size: $control-size
height: 32px height: 32px
justify-content: flex-start justify-content: flex-start
line-height: 24px line-height: 24px
@ -27,15 +50,15 @@
outline: none outline: none
&[disabled], &[disabled],
&.is-disabled &.is-disabled
background-color: $background background-color: $control-disabled-background
border-color: $control-border border-color: $control-disabled
cursor: not-allowed cursor: not-allowed
pointer-events: none pointer-events: none
+placeholder +placeholder
color: rgba($control, 0.3) color: rgba($control, 0.3)
=control-small =control-small
border-radius: $radius-small border-radius: $control-radius-small
font-size: 11px font-size: 11px
height: 24px height: 24px
line-height: 16px line-height: 16px

View File

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

View File

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