Improve tiles

This commit is contained in:
Jeremy Thomas
2016-04-11 22:51:11 +01:00
parent 96c1d03168
commit 4cfb9341df
5 changed files with 92 additions and 28 deletions

View File

@@ -1,5 +1,21 @@
# Bulma Changelog # Bulma Changelog
## 0.0.19
### BREAKING
* `.is-third` renamed to `.is-one-third`
* `.is-quarter` renamed to `.is-one-quarter`
### Added
* `.is-two-thirds`
* `.is-three-quarters`
### Changed
* `.delete` in `.tag` has no red
## 0.0.18 ## 0.0.18
### BREAKING ### BREAKING

View File

@@ -4,20 +4,30 @@
.columns.is-mobile > &.is-full .columns.is-mobile > &.is-full
flex: none flex: none
width: 100% width: 100%
.columns.is-mobile > &.is-three-quarters
flex: none
width: 75%
.columns.is-mobile > &.is-two-thirds
flex: none
width: 66.6666%
.columns.is-mobile > &.is-half .columns.is-mobile > &.is-half
flex: none flex: none
width: 50% width: 50%
.columns.is-mobile > &.is-third .columns.is-mobile > &.is-one-third
flex: none flex: none
width: 33.3333% width: 33.3333%
.columns.is-mobile > &.is-quarter .columns.is-mobile > &.is-one-quarter
flex: none flex: none
width: 25% width: 25%
.columns.is-mobile > &.is-offset-three-quarters
margin-left: 75%
.columns.is-mobile > &.is-offset-two-thirds
margin-left: 66.6666%
.columns.is-mobile > &.is-offset-half .columns.is-mobile > &.is-offset-half
margin-left: 50% margin-left: 50%
.columns.is-mobile > &.is-offset-third .columns.is-mobile > &.is-offset-one-third
margin-left: 33.3333% margin-left: 33.3333%
.columns.is-mobile > &.is-offset-quarter .columns.is-mobile > &.is-offset-one-quarter
margin-left: 25% margin-left: 25%
@for $i from 1 through 12 @for $i from 1 through 12
.columns.is-mobile > &.is-#{$i} .columns.is-mobile > &.is-#{$i}
@@ -29,20 +39,30 @@
&.is-full-mobile &.is-full-mobile
flex: none flex: none
width: 100% width: 100%
&.is-three-quarters-mobile
flex: none
width: 75%
&.is-two-thirds-mobile
flex: none
width: 66.6666%
&.is-half-mobile &.is-half-mobile
flex: none flex: none
width: 50% width: 50%
&.is-third-mobile &.is-one-third-mobile
flex: none flex: none
width: 33.3333% width: 33.3333%
&.is-quarter-mobile &.is-one-quarter-mobile
flex: none flex: none
width: 25% width: 25%
&.is-offset-three-quarters-mobile
margin-left: 75%
&.is-offset-two-thirds-mobile
margin-left: 66.6666%
&.is-offset-half-mobile &.is-offset-half-mobile
margin-left: 50% margin-left: 50%
&.is-offset-third-mobile &.is-offset-one-third-mobile
margin-left: 33.3333% margin-left: 33.3333%
&.is-offset-quarter-mobile &.is-offset-one-quarter-mobile
margin-left: 25% margin-left: 25%
@for $i from 1 through 12 @for $i from 1 through 12
&.is-#{$i}-mobile &.is-#{$i}-mobile
@@ -55,26 +75,40 @@
&.is-full-tablet &.is-full-tablet
flex: none flex: none
width: 100% width: 100%
&.is-three-quarters,
&.is-three-quarters-tablet
flex: none
width: 75%
&.is-two-thirds,
&.is-two-thirds-tablet
flex: none
width: 66.6666%
&.is-half, &.is-half,
&.is-half-tablet &.is-half-tablet
flex: none flex: none
width: 50% width: 50%
&.is-third, &.is-one-third,
&.is-third-tablet &.is-one-third-tablet
flex: none flex: none
width: 33.3333% width: 33.3333%
&.is-quarter, &.is-one-quarter,
&.is-quarter-tablet &.is-one-quarter-tablet
flex: none flex: none
width: 25% width: 25%
&.is-offset-three-quarters,
&.is-offset-three-quarters-tablet
margin-left: 75%
&.is-offset-two-thirds,
&.is-offset-two-thirds-tablet
margin-left: 66.6666%
&.is-offset-half, &.is-offset-half,
&.is-offset-half-tablet &.is-offset-half-tablet
margin-left: 50% margin-left: 50%
&.is-offset-third, &.is-offset-one-third,
&.is-offset-third-tablet &.is-offset-one-third-tablet
margin-left: 33.3333% margin-left: 33.3333%
&.is-offset-quarter, &.is-offset-one-quarter,
&.is-offset-quarter-tablet &.is-offset-one-quarter-tablet
margin-left: 25% margin-left: 25%
@for $i from 1 through 12 @for $i from 1 through 12
&.is-#{$i}, &.is-#{$i},
@@ -88,20 +122,30 @@
&.is-full-desktop &.is-full-desktop
flex: none flex: none
width: 100% width: 100%
&.is-three-quarters-desktop
flex: none
width: 75%
&.is-two-thirds-desktop
flex: none
width: 66.6666%
&.is-half-desktop &.is-half-desktop
flex: none flex: none
width: 50% width: 50%
&.is-third-desktop &.is-one-third-desktop
flex: none flex: none
width: 33.3333% width: 33.3333%
&.is-quarter-desktop &.is-one-quarter-desktop
flex: none flex: none
width: 25% width: 25%
&.is-offset-three-quarters-desktop
margin-left: 75%
&.is-offset-two-thirds-desktop
margin-left: 66.6666%
&.is-offset-half-desktop &.is-offset-half-desktop
margin-left: 50% margin-left: 50%
&.is-offset-third-desktop &.is-offset-one-third-desktop
margin-left: 33.3333% margin-left: 33.3333%
&.is-offset-quarter-desktop &.is-offset-one-quarter-desktop
margin-left: 25% margin-left: 25%
@for $i from 1 through 12 @for $i from 1 through 12
&.is-#{$i}-desktop &.is-#{$i}-desktop
@@ -158,7 +202,7 @@
&.is-desktop &.is-desktop
display: flex display: flex
.tile .tilefiejsoif
flex: 1 flex: 1
// Modifiers // Modifiers
&.is-parent &.is-parent
@@ -171,8 +215,9 @@
flex: none flex: none
width: ($i / 12) * 100% width: ($i / 12) * 100%
.tiles .tile
align-items: stretch align-items: stretch
flex: 1
// Modifiers // Modifiers
&.is-ancestor &.is-ancestor
margin-left: -10px margin-left: -10px
@@ -183,12 +228,17 @@
&:not(:last-child) &:not(:last-child)
margin-bottom: 10px margin-bottom: 10px
&.is-child &.is-child
flex: 1
margin: 0 !important margin: 0 !important
&.is-parent
padding: 10px
&.is-vertical &.is-vertical
flex-direction: column flex-direction: column
& > .tiles.is-child:not(:last-child) & > .tile.is-child:not(:last-child)
margin-bottom: 20px !important margin-bottom: 20px !important
// Responsiveness // Responsiveness
+tablet +tablet
display: flex display: flex
@for $i from 1 through 12
&.is-#{$i}
flex: none
width: ($i / 12) * 100%

View File

@@ -38,7 +38,7 @@
&:after &:after
transform: rotate(-45deg) transform: rotate(-45deg)
&:hover &:hover
background: $red background: rgba(black, 0.5)
// Sizes // Sizes
&.is-small &.is-small
height: 16px height: 16px

View File

@@ -6,12 +6,9 @@
padding: 16px 20px padding: 16px 20px
position: relative position: relative
.delete .delete
background: rgba(black, 0.2)
border-radius: 0 $radius border-radius: 0 $radius
float: right float: right
margin: -16px -20px 0 20px margin: -16px -20px 0 20px
&:hover
background: rgba(black, 0.5)
.title .title
color: inherit color: inherit
// Colors // Colors

View File

@@ -2,6 +2,7 @@
.subtitle .subtitle
@extend .block @extend .block
font-weight: $weight-title-normal font-weight: $weight-title-normal
word-break: break-all
em, em,
span span
font-weight: $weight-title-normal font-weight: $weight-title-normal