diff options
| author | Yuval Adam <yuval@y3xz.com> | 2015-12-09 12:29:25 +0200 |
|---|---|---|
| committer | Yuval Adam <yuval@y3xz.com> | 2015-12-09 12:29:25 +0200 |
| commit | 0a8ec05f4f484d9c195a2dc56eee572b502df57b (patch) | |
| tree | a4a5e43572b80b7747ba59633227a1abb3984840 | |
| parent | c58d1594e2e5670a528e89ce0d67c4cece3012a8 (diff) | |
Fix dots and slash styles
| -rw-r--r-- | index.js | 6 | ||||
| -rw-r--r-- | style.scss | 26 |
2 files changed, 18 insertions, 14 deletions
@@ -40,9 +40,11 @@ class IPAddress extends React.Component { return <div className="ip-address"> <div className="address"> {[...Array(4)].map((x, octet) => - <input className="octet" type="text" data-octet={octet} onChange={this.handleChange} value={this.state.octets[octet]}/> + <span className="octet"> + <input className="octet" type="text" data-octet={octet} onChange={this.handleChange} value={this.state.octets[octet]}/> + <span className="dot">{octet == '3' ? '/' : '.'}</span> + </span> )} - <span className="slash">/</span> <input className="cidr" type="text" data-octet="cidr" onChange={this.handleChange} value={this.state.cidr}/> </div> @@ -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 { |
