]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Fix layout code style
authorJeremy Thomas <bbxdesign@gmail.com>
Sun, 10 Apr 2016 15:56:27 +0000 (16:56 +0100)
committerJeremy Thomas <bbxdesign@gmail.com>
Sun, 10 Apr 2016 15:56:27 +0000 (16:56 +0100)
CHANGELOG.md
bulma/base/content.sass
bulma/base/generic.sass
bulma/components/card.sass
bulma/components/grid.sass
bulma/config/generated-variables.sass
bulma/elements/buttons.sass
bulma/layout/header.sass
bulma/layout/hero.sass
bulma/layout/section.sass

index d849382ba9a6288157600a1a69771a907bd92c89..c1afa680d5908a59d8f553110293885cdf19e581 100644 (file)
@@ -5,7 +5,6 @@
 ### BREAKING
 
 * `.is-text-*` renamed to `.has-text-*`
-* `.is-gapless` renamed to `.has-no-gap`
 * removed `.is-fullwidth` helper
 
 ### Added
index d479e5f654d5486777894d07d18f5bf2f708749a..ca83568a885c963e7edd2a87fd362d23534b6124 100644 (file)
@@ -1,13 +1,15 @@
 .content
   @extend .block
-  &.is-medium
-    font-size: $size-5
-    code
-      font-size: $size-6
-  &.is-large
-    font-size: $size-4
-    code
-      font-size: $size-5
+  // Inline
+  li + li
+    margin-top: 0.25em
+  // Block
+  blockquote,
+  p,
+  ol,
+  ul
+    &:not(:last-child)
+      margin-bottom: 1em
   h1,
   h2,
   h3,
   h3
     &:not(:first-child)
       margin-top: 40px
+  blockquote
+    background: $background
+    border-left: 5px solid $border
+    padding: 1.5em
   h1
     font-size: 2em
   h2
     font-size: 1.125em
   h6
     font-size: 1em
-  p:not(:last-child)
-    margin-bottom: 1em
-  li + li
-    margin-top: 0.25em
   ol
     list-style: decimal outside
-    margin: 1em 2em
+    margin-left: 2em
+    margin-right: 2em
+    margin-top: 1em
   ul
     list-style: disc outside
-    margin: 1em 2em
+    margin-left: 2em
+    margin-right: 2em
+    margin-top: 1em
     ul
       list-style-type: circle
       margin-top: 0.5em
       ul
         list-style-type: square
-  blockquote
-    background: $background
-    border-left: 5px solid $border
-    padding: 1.5em
-    &:not(:last-child)
-      margin-bottom: 1em
+  // Sizes
+  &.is-medium
+    font-size: $size-5
+    code
+      font-size: $size-6
+  &.is-large
+    font-size: $size-4
+    code
+      font-size: $size-5
index ead7784374d500005a655b0f765674c3517fa2f8..9356c573c50d1dbf79d0f5d32cb41478d0ffc577 100644 (file)
@@ -7,9 +7,19 @@ html
   overflow-x: hidden
   overflow-y: scroll
   text-rendering: optimizeLegibility
-  &.has-modal-open
+  // Modifiers
+  &.has-modal
     overflow: hidden
 
+article,
+aside,
+figure,
+footer,
+header,
+hgroup,
+section
+  display: block
+
 body,
 button,
 input,
@@ -21,7 +31,7 @@ code,
 pre
   -moz-osx-font-smoothing: auto
   -webkit-font-smoothing: auto
-  font-family: monospace
+  font-family: $family-code
   line-height: 1.25
 
 body
@@ -29,6 +39,8 @@ body
   font-size: 1rem
   line-height: 1.428571428571429
 
+// Inline
+
 a
   color: $link
   cursor: pointer
@@ -61,14 +73,7 @@ small
 strong
   color: $text-strong
 
-article,
-aside,
-figure,
-footer,
-header,
-hgroup,
-section
-  display: block
+// Block
 
 pre
   background: $pre-background
@@ -84,21 +89,25 @@ pre
 
 table
   width: 100%
-  th,
-  td
+  td,
+  th
     text-align: left
     vertical-align: top
   th
     color: $text-strong
 
-.block:not(:last-child)
-  margin-bottom: 20px
+// Classes
+
+.block
+  &:not(:last-child)
+    margin-bottom: 20px
 
 .container
   position: relative
   +desktop
     margin: 0 auto
     max-width: 960px
+    // Modifiers
     &.is-fluid
       margin: 0 20px
       max-width: none
index 4f119a1ad1c87cd4931c77f59ac4dc8e96965995..4cb32fa434386d05ad193ffda4fd7f3b4f19df4d 100644 (file)
@@ -46,6 +46,7 @@
 .card
   background: white
   box-shadow: 0 2px 3px rgba(black, 0.1), 0 0 0 1px rgba(black, 0.1)
+  color: $text
   max-width: 100%
   position: relative
   width: 300px
index 704dc33424081a5edfb4c91bfe13dbd20e951f98..4d8cf862cd3c435c67bc4c827b977c40e5bede27 100644 (file)
     justify-content: center
   &.is-mobile
     display: flex
-  &.has-no-gap
+  &.is-gapless
     margin-left: 0
     margin-right: 0
     &:not(:last-child)
index f2ee877f84956c6f35b7c41bab26a99ccc44d11a..76d0fb13d74cb1b770a8591ebfbd598b580f930d 100644 (file)
@@ -67,6 +67,7 @@ $control-active-border: $link
 // Typography
 
 $family-primary: $family-sans-serif
+$family-code: $family-monospace
 
 $size-small: $size-7
 $size-normal: $size-6
index f1137e34022c34ce0d11424f3abaf4f7f68c1970..ee4231f44fc728aeee6aaf9a5cc526ce76c5976d 100644 (file)
@@ -65,6 +65,8 @@
           color: $color-invert
           &:hover
             background: rgba(black, 0.05)
+            border-color: $color-invert
+            color: $color-invert
       &.is-loading
         &:after
           border-color: transparent transparent $color-invert $color-invert !important
index 22fa42ff30ba8ec113e7bf26d3d1860d20772b58..3b23f69acf978a7857f8f2fc31a3fef4cf8b8ca1 100644 (file)
     align-items: stretch
     display: flex
     width: 100%
+  // Modifiers
   &.has-shadow
     box-shadow: 0 1px 2px rgba(black, 0.1)
+  // Responsiveness
   +mobile
     .container
       flex-direction: column
@@ -23,6 +25,7 @@
   position: absolute
   right: 0
   top: 0
+  // Responsiveness
   +tablet
     display: none
 
   align-items: center
   display: flex
   padding: 10px
-  img
-    max-height: 24px
   a
     flex-grow: 1
+  img
+    max-height: 24px
+  .button + .button
+    margin-left: 10px
   .fa
     font-size: 21px
     line-height: 24px
-  .button + .button
-    margin-left: 10px
   .tag
     &:first-child
       margin-right: 5px
     &:last-child
       margin-left: 5px
+  // Responsiveness
   +mobile
     text-align: left
 
@@ -54,6 +58,7 @@ a.header-item
   color: $text
   &:hover
     color: $link-hover
+  // Modifiers
   &.is-active
     color: $link-active
 
@@ -74,6 +79,7 @@ a.header-item
   padding: 13px 15px
   &:hover
     border-bottom: 1px solid $link
+  // Modifiers
   &.is-active
     border-bottom: 3px solid $link
     color: $link
@@ -87,19 +93,19 @@ a.header-item
   overflow: hidden
   overflow-x: auto
   white-space: nowrap
+  // Responsiveness
   +mobile
     height: $header-height
   +desktop
-    .header-item:first-child
-      padding-left: 0
+    margin-left: -10px
 
 .header-right
   align-items: stretch
+  // Responsiveness
   +tablet
     display: flex
   +desktop
-    .header-item:last-child
-      padding-right: 0
+    margin-right: -10px
 
 .header-full
   align-items: stretch
@@ -120,12 +126,14 @@ a.header-item
       width: 100%
 
 .header-menu
+  // Responsiveness
   +mobile
     box-shadow: 0 4px 7px rgba(black, 0.1)
     display: none
     .header-item
       border-top: 1px solid rgba($border, 0.5)
       padding: 10px
+    // Modifiers
     &.is-active
       display: block
 
index 4a3b216977d41342f7a16ba81292ed8292f4433c..7e0e9cab88e2b2b5d0d73263b619457a2e938062 100644 (file)
@@ -1,8 +1,6 @@
 .hero-video
   +overlay
   overflow: hidden
-  &.is-transparent
-    opacity: 0.3
   video
     left: 50%
     min-height: 100%
     position: absolute
     top: 50%
     transform: translate3d(-50%, -50%, 0)
+  // Modifiers
+  &.is-transparent
+    opacity: 0.3
+  // Responsiveness
   +mobile
     display: none
 
 .hero-content
   padding: 40px 20px
+  // Responsiveness
   +desktop
     padding: 40px 0
 
 .hero-buttons
   margin-top: 20px
+  // Responsiveness
   +mobile
     .button
       display: block
       border: none
     ul
       border-bottom: none
+    // Modifiers
     &.is-boxed
       a
         padding: 8px 15px
+  // Colors
   @each $name, $pair in $colors
     $color: nth($pair, 1)
     $color-invert: nth($pair, 2)
             &:hover
               background: $color-invert
               color: $color
+      // Modifiers
       &.is-bold
         $gradient-top-left: darken(saturate(adjust-hue($color, -10deg), 10%), 10%)
         $gradient-bottom-right: lighten(saturate(adjust-hue($color, 10deg), 5%), 5%)
         background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%)
+      // Responsiveness
       +mobile
         .header-toggle
           span
         .header-menu
           .header-item
             border-top-color: rgba($color-invert, 0.2)
+  // Sizes
   &.is-fullheight,
   &.is-large
+    // Responsiveness
     +tablet
       .tabs
         font-size: $size-medium
   &.is-medium
+    // Responsiveness
     +tablet
       .hero-content
         padding: 120px 20px
     +desktop
       .hero-content
         padding: 120px 0
-  &.is-large
-    .tabs
-      a
-        padding: 10px 15px
-    +tablet
-      .hero-content
-        padding: 240px 20px
-    +desktop
-      .hero-content
-        padding: 240px 0
   &.is-fullheight
     align-items: stretch
     display: flex
       flex: 1
       flex-direction: column
       justify-content: center
+  &.is-large
+    .tabs
+      a
+        padding: 10px 15px
+    // Responsiveness
+    +tablet
+      .hero-content
+        padding: 240px 20px
+    +desktop
+      .hero-content
+        padding: 240px 0
index 86bbe85f9e0f9632fdc3ba13970cfa1721864e2a..0a552e85a987f2c21ee60c437a835e0db748d583 100644 (file)
@@ -3,8 +3,10 @@
   padding: 40px 20px
   & + .section
     border-top: 1px solid rgba($border, 0.5)
+  // Responsiveness
   +desktop
     padding: 40px 0
+    // Sizes
     &.is-medium
       padding: 120px 0
     &.is-large