From 0a8ec05f4f484d9c195a2dc56eee572b502df57b Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Wed, 9 Dec 2015 12:29:25 +0200 Subject: Fix dots and slash styles --- index.js | 6 ++++-- style.scss | 26 ++++++++++++++------------ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/index.js b/index.js index 2dece11..fcb42e3 100644 --- a/index.js +++ b/index.js @@ -40,9 +40,11 @@ class IPAddress extends React.Component { return
{[...Array(4)].map((x, octet) => - + + + {octet == '3' ? '/' : '.'} + )} - /
diff --git a/style.scss b/style.scss index b04653b..477809c 100644 --- a/style.scss +++ b/style.scss @@ -4,6 +4,7 @@ $color_a: #A101A6; $color_b: #D9005B; $color_c: #84E900; $color_d: #CFF700; +$color_e: #AAA; $octet_lighten: 15%; body { @@ -22,24 +23,25 @@ body { } div.address { input { - width: 3em; + width: 2.5em; font-size: 2.7em; text-align: center; border: 0px; + border-radius: 3px; } - input.octet { - &:nth-child(1) { background-color: $color_a; } - &:nth-child(2) { background-color: $color_b; } - &:nth-child(3) { background-color: $color_c; } - &:nth-child(4) { background-color: $color_d; } - } - span.slash { - font-size: 2.7em; - text-align: center; - padding: 0.4em 0.6em; + 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 { -- cgit v1.3.1