]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Fix components code style
authorJeremy Thomas <bbxdesign@gmail.com>
Sun, 10 Apr 2016 15:27:27 +0000 (16:27 +0100)
committerJeremy Thomas <bbxdesign@gmail.com>
Sun, 10 Apr 2016 15:27:27 +0000 (16:27 +0100)
CHANGELOG.md
bulma/base/helpers.sass
bulma/components/card.sass
bulma/components/media.sass
bulma/components/menu.sass
bulma/components/modal.sass
bulma/components/navbar.sass
bulma/components/pagination.sass
bulma/components/panel.sass
bulma/components/table.sass
bulma/components/tabs.sass

index 627c6061bc021521964f96ef66575cd998988ab6..d849382ba9a6288157600a1a69771a907bd92c89 100644 (file)
@@ -6,7 +6,7 @@
 
 * `.is-text-*` renamed to `.has-text-*`
 * `.is-gapless` renamed to `.has-no-gap`
-* `.is-marginless` renamed to `.has-no-margin`
+* removed `.is-fullwidth` helper
 
 ### Added
 
index 25a87d04ab6fe94a7e0196e0e5dffd7762441896..3186ae42672bff489742d83433f62bf3ba681d99 100644 (file)
 .is-overlay
   +overlay
 
-// Size
-
-.is-fullwidth
-  width: 100%
-
 // Text
 
 .has-text-centered
 
 // Other
 
-.has-no-margin
-  margin: 0 !important
-
 .is-disabled
   pointer-events: none
 
+.is-marginless
+  margin: 0 !important
+
 .is-unselectable
   +unselectable
-
index 8aa69d254ed0907d3cdfc5611c01da2e4d2d1b15..4f119a1ad1c87cd4931c77f59ac4dc8e96965995 100644 (file)
@@ -51,7 +51,8 @@
   width: 300px
   .media:not(:last-child)
     margin-bottom: 10px
-  &.is-rounded
-    border-radius: 5px
+  // Modifiers
   &.is-fullwidth
     width: 100%
+  &.is-rounded
+    border-radius: 5px
index d6cdae3f007a9631d61994467e5667b59ad75be5..90397ad2de3f473ddadba364117fe9ca21f3f31c 100644 (file)
@@ -9,6 +9,7 @@
   padding: 4px 8px
   text-align: center
   vertical-align: top
+  // Responsiveness
   +mobile
     margin-bottom: 10px
   +tablet
     border-top: 1px solid rgba($border, 0.5)
     margin-top: 10px
     padding-top: 10px
+  // Sizes
   &.is-large
     & + .media
       margin-top: 20px
       padding-top: 20px
+  // Responsiveness
   +tablet
     &.is-large
       .media-number
index 3e92228684049600658993efce519e8d28b25747..b8040db2fe5c2ff03adef6c557077219ee5e89b8 100644 (file)
     &:hover
       background: $background
       color: $link
+    // Modifiers
     &.is-active
       background: $link
       color: $link-invert
-  li ul
-    border-left: 1px solid $border
-    margin: 10px
-    padding-left: 10px
+  li
+    ul
+      border-left: 1px solid $border
+      margin: 10px
+      padding-left: 10px
 
 .menu-label
   color: $text-light
index 89e09fd226be861ce7e0c9fd5314cda6e4302e38..87e7843ebdec27419593c253146fb0c39d4a1ca1 100644 (file)
@@ -8,6 +8,7 @@
   overflow: auto
   position: relative
   width: 100%
+  // Responsiveness
   +tablet
     margin: 0 auto
     max-height: calc(100vh - 40px)
@@ -30,5 +31,6 @@
   overflow: hidden
   position: fixed
   z-index: 1986
+  // Modifiers
   &.is-active
     display: flex
index a1b36b0a52d3c29a960a0610fd1e9c1b54063b51..1668b42a2055b3ccd914ba3c74f9be0f00b277c2 100644 (file)
@@ -2,34 +2,22 @@
   .title,
   .subtitle
     margin-bottom: 0
+  // Responsiveness
   +mobile
     &:not(:last-child)
       margin-bottom: 10px
 
-.navbar
-  @extend .block
-  code
-    border-radius: $radius
-  img
-    display: inline-block
-    vertical-align: top
-  +tablet
-    align-items: center
-    display: flex
-    justify-content: space-between
-    & > .navbar-item
-      &:not(.is-narrow)
-        flex: 1
-
 .navbar-left,
 .navbar-right
   .navbar-item
-    &.is-flexible
-      flex: 1
     &:not(:last-child)
       margin-right: 10px
+    // Modifiers
+    &.is-flexible
+      flex: 1
 
 .navbar-left
+  // Responsiveness
   +mobile
     & + .navbar-right
       margin-top: 20px
     display: flex
 
 .navbar-right
+  // Responsiveness
   +tablet
     align-items: center
     display: flex
     justify-content: flex-end
+
+.navbar
+  @extend .block
+  code
+    border-radius: $radius
+  img
+    display: inline-block
+    vertical-align: top
+  // Responsiveness
+  +tablet
+    align-items: center
+    display: flex
+    justify-content: space-between
+    & > .navbar-item
+      &:not(.is-narrow)
+        flex: 1
index 78e12496fba2119299d1b24377e9bfb81642367f..c154db7687a8ad3e45d9a1c29383eea2d3b0a1f1 100644 (file)
@@ -8,6 +8,7 @@
     display: block
     min-width: 32px
     padding: 3px 8px
+    // Modifiers
     &.is-active
       background: $link
       border-color: $link
@@ -23,6 +24,7 @@
     display: flex
     flex: 1
     justify-content: center
+  // Responsiveness
   +mobile
     flex-wrap: wrap
     & > a
index 0d269287744a873ae2a7f41202560c076d0e5b1e..32af2acd84b6dd1175ab8d9074a5d5b9dbb40089 100644 (file)
   font-size: $size-small
   padding: 5px 10px 0
   justify-content: center
-  &:not(:last-child)
-    border-bottom: 1px solid $border
   a
     border-bottom: 1px solid $border
     margin-bottom: -1px
     padding: 5px
+    // Modifiers
     &.is-active
       border-bottom-color: $link-active-border
       color: $link-active
+  &:not(:last-child)
+    border-bottom: 1px solid $border
 
 .panel-block
   color: $text-strong
   display: block
   line-height: 16px
   padding: 10px
+  &:hover
+    background: $background
   &:not(:last-child)
     border-bottom: 1px solid $border
-  .checkbox
-    border: 1px solid transparent
-    border-radius: $radius
-    display: block
-    padding: 8px
-    padding-left: 32px
-    input
-      left: 9px
-      top: 9px
-    &:hover
-      border-color: $link
-
-a.panel-block:hover
-  background: $background
-
-.panel-checkbox
-  @extend .checkbox
-  display: block
-  padding: 9px 10px 9px 30px
-  &:not(:last-child)
-    border-bottom: 1px solid $border
-  input
-    left: 8px
-    top: 10px
 
 .panel
   border: 1px solid $border
index b249e98a805924ab46dc43cd1b9d6a66bcdc9fcb..47bfeb6426387145af758cdbcee0fc26bd2a939e 100644 (file)
@@ -3,15 +3,24 @@
   color: $text-strong
   margin-bottom: 20px
   width: 100%
-  th,
-  td
+  td,
+  th
     border: 1px solid $border
     border-width: 0 0 1px
     padding: 8px 10px
     vertical-align: top
-    &.table-narrow
+    // Modifiers
+    &.table-icon
+      padding: 5px
+      text-align: center
       white-space: nowrap
       width: 1%
+      .fa
+        +fa(21px, 24px)
+      &.table-link
+        padding: 0
+        & > a
+          padding: 5px
     &.table-link
       padding: 0
       & > a
         &:hover
           background: $link
           color: $link-invert
-    &.table-icon
-      padding: 5px
-      text-align: center
+    &.table-narrow
       white-space: nowrap
       width: 1%
-      .fa
-        +fa(21px, 24px)
-      &.table-link
-        padding: 0
-        & > a
-          padding: 5px
   th
     color: $text-strong
     text-align: left
   tr
     &:hover
-      background: rgba($background, 0.5)
+      background: $background
       color: $text-strong
-    &:last-child td
-      border-bottom-width: 0
   thead
-    th,
-    td
+    td,
+    th
       border-width: 0 0 2px
       color: $text-light
+  tbody
+    tr
+      &:last-child
+        td,
+        th
+          border-bottom-width: 0
   tfoot
-    th,
-    td
+    td,
+    th
       border-width: 2px 0 0
       color: $text-light
+  // Modifiers
   &.is-bordered
-    th,
-    td
+    td,
+    th
       border-width: 1px
     tr
-      &:last-child td
-        border-bottom-width: 1px
+      &:last-child
+        td,
+        th
+          border-bottom-width: 1px
   &.is-narrow
-    th,
-    td
+    td,
+    th
       padding: 5px 10px
-      &.table-link
-        padding: 0
-        & > a
-          padding: 5px 10px
+      // Modifiers
       &.table-icon
         padding: 2px
         &.table-link
           padding: 0
           & > a
             padding: 2px
+      &.table-link
+        padding: 0
+        & > a
+          padding: 5px 10px
   &.is-striped
     tbody
-      tr:nth-child(2n)
-        background: rgba($background, 0.5)
-        &:hover
+      tr
+        &:nth-child(2n)
           background: $background
+          &:hover
+            background: $border
index df7b934c32a5439f9ef1ce3be8d598e57b9f49f1..1522654a1af6ad84a73fbedde7a9dc8f1c41f449 100644 (file)
@@ -4,11 +4,6 @@
   overflow: hidden
   overflow-x: auto
   white-space: nowrap
-  .fa
-    font-size: 14px
-    line-height: 20px
-    margin: 2px -2px
-    width: 20px
   a
     border-bottom: 1px solid $border
     color: $text
@@ -24,6 +19,7 @@
     vertical-align: top
     & + li
       margin-left: 20px
+    // Modifiers
     &.is-active
       a
         border-bottom-color: $link
   ul
     border-bottom: 1px solid $border
     display: flex
-  &.is-centered
-    a
-      padding: 5px 10px
-    li
-      & + li
-        margin-left: 0
-    ul
-      justify-content: center
-      text-align: center
-  &.is-right
-    ul
-      justify-content: flex-end
+  .fa
+    font-size: 14px
+    line-height: 20px
+    margin: 2px -2px
+    width: 20px
+  // Modifiers
   &.is-boxed
     a
       border: 1px solid transparent
     li
       & + li
         margin-left: 5px
+      // Modifiers
       &.is-active
         a
           background: white
           border-color: $border
           border-bottom-color: transparent
+    // Modifiers
     &.is-centered
       li
         &,
         & + li
           margin: 0 2px
+  &.is-centered
+    a
+      padding: 5px 10px
+    li
+      & + li
+        margin-left: 0
+    ul
+      justify-content: center
+      text-align: center
+  &.is-fullwidth
+    li
+      flex: 1
+      & + li
+        margin-left: 0
+    ul
+      justify-content: center
+      text-align: center
+  &.is-right
+    ul
+      justify-content: flex-end
   &.is-toggle
     a
       border: 1px solid $border
@@ -81,6 +93,7 @@
         border-radius: $radius 0 0 $radius
       &:last-child a
         border-radius: 0 $radius $radius 0
+      // Modifiers
       &.is-active
         a
           background: $primary
           z-index: 1
     ul
       border-bottom: none
-  &.is-fullwidth
-    li
-      flex: 1
-      & + li
-        margin-left: 0
-    ul
-      justify-content: center
-      text-align: center