A very hack way of putting stripes on your text. Make sure to update the stripe # in both the markup (1..8) and the styles ($steps).
A Pen by Riley Shaw on CodePen.
| - for i in 1..8 do | |
| div | |
| p tomato |
A very hack way of putting stripes on your text. Make sure to update the stripe # in both the markup (1..8) and the styles ($steps).
A Pen by Riley Shaw on CodePen.
| @import "compass" | |
| $size: 300px | |
| $stripes: 8 | |
| $stripe-height: $size / $stripes | |
| $color: #00ffff | |
| body | |
| margin: 0 | |
| background: $color / $stripes * (ceil($stripes / 2) + 1) | |
| div | |
| height: $stripe-height | |
| overflow: hidden | |
| p | |
| text-align: center | |
| font-size: $size | |
| line-height: 1em | |
| font-weight: bold | |
| @for $n from 1 through $stripes | |
| div:nth-child(#{$n}) | |
| p | |
| margin-top: -$stripe-height * ($n - 1) | |
| color: $color / $stripes * $n |