]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Fix code styling, Fix helpers
authorJeremy Thomas <bbxdesign@gmail.com>
Sun, 10 Apr 2016 15:00:32 +0000 (16:00 +0100)
committerJeremy Thomas <bbxdesign@gmail.com>
Sun, 10 Apr 2016 15:00:32 +0000 (16:00 +0100)
15 files changed:
CHANGELOG.md
bulma/base/helpers.sass
bulma/components/components.sass
bulma/components/grid.sass
bulma/components/tabs.sass
bulma/elements/buttons.sass
bulma/elements/controls.sass
bulma/elements/elements.sass
bulma/elements/images.sass
bulma/elements/messages.sass
bulma/elements/notifications.sass
bulma/elements/progress.sass
bulma/elements/titles.sass
bulma/layout/header.sass
bulma/layout/hero.sass

index 40203745850bfdc8ca6c6859c5859ed34f898bb7..627c6061bc021521964f96ef66575cd998988ab6 100644 (file)
@@ -1,5 +1,30 @@
 # Bulma Changelog
 
+## 0.0.18
+
+### BREAKING
+
+* `.is-text-*` renamed to `.has-text-*`
+* `.is-gapless` renamed to `.has-no-gap`
+* `.is-marginless` renamed to `.has-no-margin`
+
+### Added
+
+* **small tag**: `.tag.is-small`
+
+### Fixed
+
+* disabled input with element
+
+### Removed
+
+* removed `box-shadow` from `.tag`
+* custom checkboxes and radio buttons
+
+### Updated
+
+* `.tag` uses `display: inline-flex` now
+
 ## 0.0.17
 
 ### Added
index 9a46b6e91de5a9c3ee5349d6207afa190a79f772..25a87d04ab6fe94a7e0196e0e5dffd7762441896 100644 (file)
 
 // Text
 
-.is-text-centered
+.has-text-centered
   text-align: center
 
-.is-text-left
+.has-text-left
   text-align: left
 
-.is-text-right
+.has-text-right
   text-align: right
 
 // Visibility
 
 // Other
 
+.has-no-margin
+  margin: 0 !important
+
 .is-disabled
   pointer-events: none
 
-.is-marginless
-  margin: 0 !important
-
 .is-unselectable
   +unselectable
 
index 6652a40519a8e732919a7924e6f1f45229493769..9caf620a1d805938e1ef1db535e70da77c1b2332 100644 (file)
   background: white
   border-radius: 5px
   box-shadow: 0 2px 3px rgba(black, 0.1), 0 0 0 1px rgba(black, 0.1)
+  display: block
   padding: 20px
+
+a.box
+  &:hover,
+  &:focus
+    box-shadow: 0 2px 3px rgba(black, 0.1), 0 0 0 1px $link
+  &:active
+    box-shadow: inset 0 1px 2px rgba(black, 0.2), 0 0 0 1px $link
+
index 4d8cf862cd3c435c67bc4c827b977c40e5bede27..704dc33424081a5edfb4c91bfe13dbd20e951f98 100644 (file)
     justify-content: center
   &.is-mobile
     display: flex
-  &.is-gapless
+  &.has-no-gap
     margin-left: 0
     margin-right: 0
     &:not(:last-child)
index 02218cc1162221cf9fa2c1a38aa2e94cd57d83b0..df7b934c32a5439f9ef1ce3be8d598e57b9f49f1 100644 (file)
     ul
       border-bottom: none
   &.is-fullwidth
-    +tablet
-      li
-        flex: 1
-        & + li
-          margin-left: 0
-      ul
-        justify-content: center
-        text-align: center
+    li
+      flex: 1
+      & + li
+        margin-left: 0
+    ul
+      justify-content: center
+      text-align: center
index d67c6c83b7125dbc8fcabfd5437b0186b86dd6a3..f1137e34022c34ce0d11424f3abaf4f7f68c1970 100644 (file)
     font-size: $size-small
     line-height: 1
     margin-top: 5px
-  .icon
+  .icon,
+  .tag
     &:first-child
+      margin-left: -2px
       margin-right: 4px
     &:last-child
       margin-left: 4px
+      margin-right: -2px
   &:hover
     color: $control-hover
   &:active
     box-shadow: inset 0 1px 2px rgba(black, 0.2)
+  // Colors
   @each $name, $pair in $colors
     $color: nth($pair, 1)
     $color-invert: nth($pair, 2)
         color: $color-invert
       &:active
         border-color: transparent
-      &.is-outlined
-        background: transparent
-        border-color: $color
-        color: $color
-        &:hover,
-        &:focus
-          border-color: darken($color, 10%)
-          color: darken($color, 10%)
       &.is-inverted
         background: $color-invert
         color: $color
           color: $color-invert
           &:hover
             background: rgba(black, 0.05)
-      &.is-loading:after
-        border-color: transparent transparent $color-invert $color-invert !important
+      &.is-loading
+        &:after
+          border-color: transparent transparent $color-invert $color-invert !important
+      &.is-outlined
+        background: transparent
+        border-color: $color
+        color: $color
+        &:hover,
+        &:focus
+          border-color: darken($color, 10%)
+          color: darken($color, 10%)
   &.is-link
     border-color: transparent
     color: $text
     &:focus
       background: $border
       color: $text-strong
+  // Sizes
   &.is-small
     +button-small
   &.is-medium
     +button-medium
   &.is-large
     +button-large
+  // Modifiers
+  &[disabled],
+  &.is-disabled
+    opacity: 0.5
+  &.is-flexible
+    height: auto
   &.is-fullwidth
     display: block
     width: 100%
-  &.is-flexible
-    height: auto
   &.is-loading
     color: transparent
     pointer-events: none
       @extend .loader
       +center(16px)
       position: absolute !important
-  &.is-disabled,
-  &[disabled]
-    opacity: 0.5
-    pointer-events: none
index 08bf8388223162c9d33201328b29ba59b494eb34..8c3acd716066c6e4ae686012e86f7de3081ee9bd 100644 (file)
   &:focus
     border-color: $control-active-border
     outline: none
-  &[disabled]
-    &,
-    &:hover
-      background: $background
-      border-color: $control-border
-      cursor: not-allowed
-      +placeholder
-        color: rgba($control, 0.3)
+  &[disabled],
+  &.is-disabled
+    background: $background
+    border-color: $control-border
+    cursor: not-allowed
+    pointer-events: none
+    +placeholder
+      color: rgba($control, 0.3)
 
 =form-control
   +control
   width: 100%
   &[type="search"]
     border-radius: 290486px
-  &.is-flat
-    border: none
-    box-shadow: none
-    padding: 4px 8px
+  // Sizes
   &.is-small
     +control-small
     &.is-flat
     +control-large
     &.is-flat
       padding: 4px 12px
+  // Modifiers
+  &.is-flat
+    border: none
+    box-shadow: none
+    padding: 4px 8px
   &.is-fullwidth
     display: block
     width: 100%
   cursor: pointer
   display: inline-block
   line-height: 16px
-  padding-left: 18px
   position: relative
   vertical-align: top
   input
-    +form-control
-    border-radius: 1px
-    box-shadow: inset 0 1px 1px rgba(black, 0.1)
     cursor: pointer
-    float: left
-    height: 14px
-    left: 0
-    outline: none
-    padding: 0
-    position: absolute
-    top: 1px
-    width: 14px
-    &:after
-      +arrow($control-active-background-invert)
-      height: 4px
-      left: 3px
-      opacity: 0
-      position: absolute
-      top: 3px
-      transform: rotate(-45deg) scale(1)
-    &:checked
-      background: $control-active-background
-      border-color: $control-active-background
-      box-shadow: none
-      &:after
-        opacity: 1
   &:hover
     color: $control-hover
-    input
-      border-color: $control-hover-border
-      &:checked
-        border-color: $control-active-border
   &.is-disabled
-    &,
-    &:hover
-      color: $text-light
+    color: $text-light
+    pointer-events: none
+    input
+      pointer-events: none
 
 .checkbox
   @extend %control-with-element
   @extend %control-with-element
   & + .radio
     margin-left: 10px
-  input
-    border-radius: 8px
-    &:after
-      background: $link-invert
-      border: 0
-      border-radius: 2px
-      left: 4px
-      top: 4px
-      transform: none
-      width: 4px
 
 .select
   display: inline-block
 .control
   position: relative
   text-align: left
-  &.is-loading
-    &:after
-      @extend .loader
-      position: absolute !important
-      right: 8px
-      top: 8px
   &:not(:last-child)
     margin-bottom: 10px
-  &.has-icon
-    & > .fa
-      +fa(14px, 16px)
-      color: $text-light
-      pointer-events: none
-      position: absolute
-      top: 8px
-      z-index: 4
-    .input
-      &:focus + .fa
-        color: $text-strong
-    &:not(.has-icon-right)
-      & > .fa
-        left: 8px
-      .input
-        padding-left: 32px
-  &.has-icon-right
-    & > .fa
-      right: 8px
-    .input
-      padding-right: 32px
+  // Modifiers
   &.has-addons
     display: flex
-    .input,
+    justify-content: flex-start
     .button,
+    .input,
     .select
       border-radius: 0
       margin-right: -1px
           border-radius: $radius 0 0 $radius
       &:last-child
         border-radius: 0 $radius $radius 0
-    &.is-centered
+        select
+          border-radius: 0 $radius $radius 0
+    &.has-addons-centered
       justify-content: center
+    &.has-addons-right
+      justify-content: flex-end
+  &.has-icon
+    & > .fa
+      +fa(14px, 16px)
+      color: $text-light
+      pointer-events: none
+      position: absolute
+      top: 8px
+      z-index: 4
+    .input
+      &:focus + .fa
+        color: $text-strong
+    &:not(.has-icon-right)
+      & > .fa
+        left: 8px
+      .input
+        padding-left: 32px
+    &.has-icon-right
+      & > .fa
+        right: 8px
+      .input
+        padding-right: 32px
   &.is-grouped
     display: flex
+    justify-content: flex-start
     & > .button,
     & > .input,
     & > .select
         margin-right: 10px
     & > .input
       flex: 1
+    &.is-grouped-centered
+      justify-content: center
+    &.is-grouped-right
+      justify-content: flex-end
   &.is-horizontal
     +tablet
       display: flex
       & > .control
         display: flex
         flex: 5
+  &.is-loading
+    &:after
+      @extend .loader
+      position: absolute !important
+      right: 8px
+      top: 8px
index 2c3d87117f2f81e41c3b01b260c1df6dbc18f0d4..4d13cf24e36c2073164ab702b946bbe889b43d1f 100644 (file)
@@ -39,6 +39,7 @@
     transform: rotate(-45deg)
   &:hover
     background: $red
+  // Sizes
   &.is-small
     height: 16px
     width: 16px
@@ -54,6 +55,7 @@
   .fa
     font-size: inherit
     line-height: inherit
+  // Sizes
   &.is-small
     +fa(14px, 16px)
   &.is-medium
@@ -86,6 +88,7 @@
       margin-top: 4px
   &:hover
     background: $background
+  // Modifers
   &.is-active
     span
       background: $link
     overflow: auto
     max-width: 100%
 
-.image
-  display: block
-  position: relative
-  vertical-align: top
-  img
-    +overlay
-    display: block
-    width: 100%
-  &.is-3x2
-    padding-top: 66.6666%
-
 .loader
   animation: spin-around 500ms infinite linear
   border: 2px solid $border
   vertical-align: top
 
 .tag
+  align-items: center
   background: $background
-  border-radius: $radius
-  box-shadow: inset 0 -1px 0 rgba(black, 0.1)
+  border-radius: 290486px
   color: $text
-  display: inline-block
+  display: inline-flex
   font-size: 12px
   height: 24px
+  justify-content: center
   line-height: 16px
   padding: 4px 10px
   vertical-align: top
   white-space: nowrap
+  .delete
+    margin-left: 4px
+    margin-right: -6px
+  &:not(.is-large)
+    .delete
+      @extend .delete.is-small
+  // Colors
+  @each $name, $pair in $colors
+    $color: nth($pair, 1)
+    $color-invert: nth($pair, 2)
+    &.is-#{$name}
+      background: $color
+      color: $color-invert
   &.is-dark
     background: $text
     color: $text-invert
-  &.is-rounded
-    border-radius: 290486px
+  // Sizes
+  &.is-small
+    font-size: $size-small
+    height: 20px
+    padding: 2px 8px
   &.is-medium
-    box-shadow: inset 0 -2px 0 rgba(black, 0.1)
     font-size: $size-normal
     height: 32px
-    padding: 7px 14px 9px
-  &:not(.is-large)
-    .delete
-      @extend .delete.is-small
-      margin-left: 4px
-      margin-right: -6px
+    padding: 8px 14px
   &.is-large
-    box-shadow: inset 0 -2px 0 rgba(black, 0.1)
     font-size: $size-5
     height: 40px
     line-height: 24px
-    padding: 7px 18px 9px
+    padding: 8px 18px
     .delete
       margin-left: 4px
       margin-right: -8px
-  @each $name, $pair in $colors
-    $color: nth($pair, 1)
-    $color-invert: nth($pair, 2)
-    &.is-#{$name}
-      background: $color
-      color: $color-invert
index f5ff36e6d82177722cb6c5e75266cfd740f150eb..90f996ece0c55ea9d95d494de2b09162551be37c 100644 (file)
@@ -5,6 +5,7 @@ $dimensions: 16 24 32 48 64 96 128
   position: relative
   img
     display: block
+  // Ratio
   &.is-square,
   &.is-1by1,
   &.is-4by3,
@@ -26,6 +27,7 @@ $dimensions: 16 24 32 48 64 96 128
     padding-top: 56.25%
   &.is-2by1
     padding-top: 50%
+  // Sizes
   @each $dimension in $dimensions
     &.is-#{$dimension}x#{$dimension}
       height: $dimension * 1px
index f46e2de7db9226ee46f92f3ad1c4e8be7e9bc06e..33d5e8c3c1d8dc9d8351055c091e218c6044d5ae 100644 (file)
@@ -9,11 +9,9 @@
   background: $text
   border-radius: $radius $radius 0 0
   color: $text-invert
-  font-size: 10px
-  font-weight: bold
-  letter-spacing: 1px
-  padding: 3px 8px
-  text-transform: uppercase
+  padding: 7px 10px
+  strong
+    color: inherit
   & + .message-body
     border-radius: 0 0 $radius $radius
     border-top: none
@@ -22,6 +20,7 @@
   @extend .block
   background: $background
   border-radius: $radius
+  // Colors
   @each $name, $pair in $colors
     $color: nth($pair, 1)
     $color-invert: nth($pair, 2)
index 67c424b0c60538b7ea115964bb77e3a0ffa86e8d..e9edfba07acf1ba7d68b650b5614068956e4dc86 100644 (file)
@@ -5,19 +5,19 @@
   border-radius: $radius
   padding: 16px 20px
   position: relative
+  .delete
+    background: rgba(black, 0.2)
+    border-radius: 0 $radius
+    float: right
+    margin: -16px -20px 0 20px
+    &:hover
+      background: rgba(black, 0.5)
   .title
     color: inherit
+  // Colors
   @each $name, $pair in $colors
     $color: nth($pair, 1)
     $color-invert: nth($pair, 2)
     &.is-#{$name}
       background: $color
       color: $color-invert
-  .delete
-    background: rgba(black, 0.2)
-    border-radius: 0 $radius
-    float: right
-    margin: -16px -20px 0 20px
-    &:hover
-      background: rgba(black, 0.5)
-
index e58df2aa81200915610799b86b62dd10097bcfd0..8136f5589846ddff4093b4fe32f43ceb9daeea0f 100644 (file)
@@ -1,7 +1,7 @@
 .progress
+  @extend .block
   -moz-appearance: none
   -webkit-appearance: none
-  @extend .block
   border: none
   border-radius: 290486px
   display: block
     background: $text
   &::-moz-progress-bar
     background: $text
-  &.is-small
-    height: 8px
-  &.is-medium
-    height: 16px
-  &.is-large
-    height: 20px
+  // Colors
   @each $name, $pair in $colors
     $color: nth($pair, 1)
     &.is-#{$name}
         background: $color
       &::-moz-progress-bar
         background: $color
+  // Sizes
+  &.is-small
+    height: 8px
+  &.is-medium
+    height: 16px
+  &.is-large
+    height: 20px
index a0eb9bbd15793f5565add31f52673b996dbd802f..617a8a71e292f87bd96d9b90f34f2beabf89ff1b 100644 (file)
@@ -5,11 +5,11 @@
   em,
   span
     font-weight: $weight-title-normal
-  strong
-    font-weight: $weight-title-bold
   a
     &:hover
       border-bottom: 1px solid
+  strong
+    font-weight: $weight-title-bold
   .tag
     vertical-align: bottom
 
   color: $text-strong
   font-size: $size-large
   line-height: 1
-  strong
-    color: inherit
   code
     display: inline-block
     font-size: $size-large
-  & + .subtitle
-    margin-top: -10px
+  strong
+    color: inherit
   & + .highlight
     margin-top: -10px
-  &.is-normal
-    font-weight: 400
-    strong
-      font-weight: 700
+  & + .subtitle
+    margin-top: -10px
+  // Colors
   @each $size in $sizes
     $i: index($sizes, $size)
     &.is-#{$i}
       font-size: $size
       code
         font-size: nth($sizes, min($i + 1, 6))
+  // Modifiers
+  &.is-normal
+    font-weight: 400
+    strong
+      font-weight: 700
+  // Responsiveness
   +tablet
     & + .subtitle
       margin-top: -15px
 
 .subtitle
+  color: $text
   font-size: $size-medium
   line-height: 1.125
-  & + .title
-    margin-top: -20px
-  strong
-    color: $text-strong
   code
     border-radius: $radius
     display: inline-block
     font-size: $size-normal
     padding: 2px 3px
     vertical-align: top
-  & + .text
-    margin-top: 20px
-  &.is-normal
-    font-weight: 400
-    strong
-      font-weight: 700
+  strong
+    color: $text-strong
+  & + .title
+    margin-top: -20px
+  // Colors
   @each $size in $sizes
     $i: index($sizes, $size)
     &.is-#{$i}
       font-size: $size
       code
         font-size: nth($sizes, min($i + 1, 6))
+  // Modifiers
+  &.is-normal
+    font-weight: 400
+    strong
+      font-weight: 700
index 4b089d2c63caae13c3f6e6dbe9f24f77f24bb588..22fa42ff30ba8ec113e7bf26d3d1860d20772b58 100644 (file)
     line-height: 24px
   .button + .button
     margin-left: 10px
+  .tag
+    &:first-child
+      margin-right: 5px
+    &:last-child
+      margin-left: 5px
   +mobile
     text-align: left
 
index cbe589d74fac8c3faebe9150d8b7f7a0fcd65ae1..4a3b216977d41342f7a16ba81292ed8292f4433c 100644 (file)
@@ -33,7 +33,6 @@
 
 .hero
   background: white
-  text-align: center
   .header
     background: none
     .container
       flex: 1
       flex-direction: column
       justify-content: center
-  &.is-left
-    text-align: left
-  &.is-right
-    text-align: right