@import 'bourbon'; $color_a: #A101A6; $color_b: #D9005B; $color_c: #84E900; $color_d: #CFF700; $color_e: #AAA; $octet_lighten: 15%; body { background: #eee; font-family: $lucida-grande; header { margin-bottom: 30px; } div.ip-address { text-align: center; div { margin-top: 65px; } div.address { input { width: 2.5em; font-size: 2.7em; text-align: center; border: 0px; border-radius: 3px; } span.octet { span.dot { font-size: 2.7em; text-align: center; padding: 0.1em 0.13em; } &:nth-child(1) input.octet { background-color: $color_a; } &:nth-child(2) input.octet { background-color: $color_b; } &:nth-child(3) input.octet { background-color: $color_c; } &:nth-child(4) input.octet { background-color: $color_d; } } input.cidr { background-color: $color_e; } } div.bits { ol { display: inline; padding-left: 0px; padding-right: 15px; li.octet { display: inline; ol { li.bit { display: inline; padding: 0.4em 0.6em; margin-left: -1px; border: 1px black solid; } } &:nth-child(1) ol li.bit.unmasked { background-color: lighten($color_a, $octet_lighten); } &:nth-child(2) ol li.bit.unmasked { background-color: lighten($color_b, $octet_lighten); } &:nth-child(3) ol li.bit.unmasked { background-color: lighten($color_c, $octet_lighten); } &:nth-child(4) ol li.bit.unmasked { background-color: lighten($color_d, $octet_lighten); } ol li.bit.masked { background-color: lighten($color_e, $octet_lighten); } } } } } footer { margin-top: 50px; text-align: center; font-size: 0.7em; } }