You've already forked computing-box
@@ -1,38 +1,16 @@
|
||||
:root{
|
||||
--bg: #1f2027;
|
||||
--panel: #22242d;
|
||||
--panel2: rgba(255,255,255,.04);
|
||||
--text: #e8e8ee;
|
||||
--muted: #a9acb8;
|
||||
|
||||
--accent: #33ff7a;
|
||||
--accent-dim: rgba(51,255,122,.15);
|
||||
|
||||
--line: rgba(255,255,255,.12);
|
||||
}
|
||||
|
||||
/* DSEG7ClassicRegular font */
|
||||
@font-face{
|
||||
font-family: "DSEG7ClassicRegular";
|
||||
src:
|
||||
url("/fonts/DSEG7Classic-Regular.woff2") format("woff2"),
|
||||
url("/fonts/DSEG7Classic-Regular.woff") format("woff"),
|
||||
url("/fonts/DSEG7Classic-Regular.ttf") format("truetype");
|
||||
url("/fonts/DSEG7Classic-Regular.ttf") format("truetype"),
|
||||
url("/fonts/DSEG7Classic-Regular.woff") format("woff");
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
body{
|
||||
margin:0;
|
||||
font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.wrap{
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 32px 20px 60px;
|
||||
.binary-wrap{
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
.topGrid{
|
||||
@@ -64,32 +42,41 @@ body{
|
||||
text-shadow: 0 0 18px var(--accent-dim);
|
||||
}
|
||||
|
||||
.denaryValue{
|
||||
font-size: 72px;
|
||||
.denary{
|
||||
font-size: 72px; /* smaller */
|
||||
line-height: 1.0;
|
||||
margin: 6px 0 10px;
|
||||
}
|
||||
|
||||
.binaryValue{
|
||||
font-size: 52px;
|
||||
letter-spacing: .10em;
|
||||
line-height: 1.0;
|
||||
.binary{
|
||||
font-size: 46px; /* smaller */
|
||||
letter-spacing: .12em;
|
||||
line-height: 1.15;
|
||||
margin: 6px 0 14px;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
display:inline-block;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.controls{
|
||||
margin-top: 10px;
|
||||
margin-top: 8px;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
gap: 10px;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.controlRow{
|
||||
.controls--twoRows{
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.controlsRow{
|
||||
display:flex;
|
||||
gap: 12px;
|
||||
justify-content:center;
|
||||
flex-wrap:nowrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.btn{
|
||||
@@ -102,34 +89,37 @@ body{
|
||||
cursor: pointer;
|
||||
min-width: 160px;
|
||||
}
|
||||
|
||||
.btn:active{ transform: translateY(1px); }
|
||||
|
||||
.btnPrimary{
|
||||
background: rgba(51,255,122,.18);
|
||||
.btn--green{
|
||||
background: rgba(51,255,122,.16);
|
||||
border-color: rgba(51,255,122,.45);
|
||||
box-shadow: 0 0 0 1px rgba(51,255,122,.10) inset;
|
||||
}
|
||||
|
||||
.btnSpin{
|
||||
.btn--green:hover{
|
||||
background: rgba(51,255,122,.22);
|
||||
}
|
||||
|
||||
.btn--spin{
|
||||
min-width: 120px;
|
||||
font-size: 18px;
|
||||
padding: 12px 10px;
|
||||
font-size: 18px; /* bigger */
|
||||
}
|
||||
|
||||
.divider{
|
||||
margin-top: 26px;
|
||||
margin-top: 22px;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.panelCol{
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
gap:14px;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.card{
|
||||
background: var(--panel2);
|
||||
border: 1px solid rgba(255,255,255,.10);
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--panel-border);
|
||||
border-radius: 14px;
|
||||
padding: 14px;
|
||||
}
|
||||
@@ -154,7 +144,7 @@ body{
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:space-between;
|
||||
gap:10px;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.toggleLabel{
|
||||
@@ -164,11 +154,11 @@ body{
|
||||
}
|
||||
|
||||
.switch{
|
||||
position: relative;
|
||||
width: 56px;
|
||||
height: 34px;
|
||||
position:relative;
|
||||
width:56px;
|
||||
height:34px;
|
||||
display:inline-block;
|
||||
flex: 0 0 auto;
|
||||
flex:0 0 auto;
|
||||
}
|
||||
.switch input{
|
||||
opacity:0;
|
||||
@@ -180,19 +170,19 @@ body{
|
||||
inset:0;
|
||||
background: rgba(255,255,255,.10);
|
||||
border: 1px solid rgba(255,255,255,.14);
|
||||
border-radius: 999px;
|
||||
transition: .18s ease;
|
||||
border-radius:999px;
|
||||
transition:.18s ease;
|
||||
}
|
||||
.slider::before{
|
||||
content:"";
|
||||
position:absolute;
|
||||
height: 28px;
|
||||
width: 28px;
|
||||
left: 3px;
|
||||
top: 2px;
|
||||
height:28px;
|
||||
width:28px;
|
||||
left:3px;
|
||||
top:2px;
|
||||
background: rgba(255,255,255,.92);
|
||||
border-radius: 50%;
|
||||
transition: .18s ease;
|
||||
border-radius:50%;
|
||||
transition:.18s ease;
|
||||
}
|
||||
.switch input:checked + .slider{
|
||||
background: rgba(51,255,122,.20);
|
||||
@@ -205,8 +195,8 @@ body{
|
||||
|
||||
.bitWidthRow{
|
||||
display:grid;
|
||||
grid-template-columns: 44px 1fr 44px;
|
||||
gap: 10px;
|
||||
grid-template-columns:44px 1fr 44px;
|
||||
gap:10px;
|
||||
align-items:center;
|
||||
}
|
||||
|
||||
@@ -218,69 +208,56 @@ body{
|
||||
border: 1px solid rgba(255,255,255,.14);
|
||||
color:#fff;
|
||||
cursor:pointer;
|
||||
font-weight: 900;
|
||||
font-size: 18px;
|
||||
font-weight:900;
|
||||
font-size:18px;
|
||||
}
|
||||
|
||||
.bitInputWrap{
|
||||
background: rgba(255,255,255,.06);
|
||||
border: 1px solid rgba(255,255,255,.14);
|
||||
border-radius: 12px;
|
||||
padding: 10px 12px;
|
||||
border-radius:12px;
|
||||
padding:10px 12px;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:space-between;
|
||||
gap: 12px;
|
||||
gap:12px;
|
||||
}
|
||||
|
||||
.bitInputLabel{
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
font-weight: 900;
|
||||
letter-spacing: .18em;
|
||||
text-transform: uppercase;
|
||||
font-size:12px;
|
||||
font-weight:900;
|
||||
letter-spacing:.18em;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
|
||||
.bitInput{
|
||||
width: 86px;
|
||||
width:86px;
|
||||
text-align:right;
|
||||
background: transparent;
|
||||
border:none;
|
||||
outline:none;
|
||||
border: none;
|
||||
outline: none;
|
||||
color: var(--accent);
|
||||
font-family: "DSEG7ClassicRegular", ui-monospace, monospace;
|
||||
font-size: 28px;
|
||||
font-family:"DSEG7ClassicRegular", ui-monospace, monospace;
|
||||
font-size:28px;
|
||||
}
|
||||
.bitInput::-webkit-outer-spin-button,
|
||||
.bitInput::-webkit-inner-spin-button{
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
-webkit-appearance:none;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
.actionGrid{
|
||||
display:grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10px;
|
||||
}
|
||||
.actionGrid .btn{
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* -------- Bits grid: wrap every 8, centered when <8, no scrollbar -------- */
|
||||
/* Bits: wrap every 8 */
|
||||
.bits{
|
||||
margin-top: 22px;
|
||||
--cols: 8;
|
||||
margin-top: 26px;
|
||||
padding-top: 18px;
|
||||
|
||||
display: grid;
|
||||
grid-template-columns: repeat(8, 92px);
|
||||
display:grid;
|
||||
grid-template-columns: repeat(var(--cols), 90px);
|
||||
justify-content: center; /* centres when < 8 too */
|
||||
gap: 18px;
|
||||
justify-content: center;
|
||||
|
||||
width: fit-content;
|
||||
max-width: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
align-items:end;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.bit{
|
||||
@@ -291,45 +268,30 @@ body{
|
||||
padding: 8px 4px;
|
||||
}
|
||||
|
||||
/* Bulb: emoji 💡 larger, grey when off, glowing when on */
|
||||
/* Bulb emoji bigger */
|
||||
.bulb{
|
||||
font-size: 28px; /* bigger bulb */
|
||||
font-size: 26px; /* bigger */
|
||||
line-height: 1;
|
||||
filter: grayscale(100%) brightness(.85);
|
||||
opacity: .65;
|
||||
filter: grayscale(1);
|
||||
opacity: .35;
|
||||
transform: translateY(2px);
|
||||
user-select: none;
|
||||
}
|
||||
.bulb.on{
|
||||
filter: none;
|
||||
filter: grayscale(0);
|
||||
opacity: 1;
|
||||
text-shadow: 0 0 18px rgba(255, 216, 107, .55);
|
||||
text-shadow: 0 0 16px rgba(255,216,107,.55);
|
||||
}
|
||||
|
||||
/* Bit place value */
|
||||
.bitVal{
|
||||
font-family: "DSEG7ClassicRegular", ui-monospace, monospace;
|
||||
font-size: 30px;
|
||||
font-size: 28px;
|
||||
color: var(--text);
|
||||
opacity: .95;
|
||||
line-height: 1;
|
||||
min-height: 34px;
|
||||
}
|
||||
|
||||
/* Per-bit switch */
|
||||
.bit .switch{
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
@media (max-width: 980px){
|
||||
.topGrid{ grid-template-columns: 1fr; }
|
||||
.denaryValue{ font-size: 64px; }
|
||||
.binaryValue{ font-size: 46px; }
|
||||
.btn{ min-width: 140px; }
|
||||
}
|
||||
|
||||
@media (max-width: 520px){
|
||||
.bits{
|
||||
grid-template-columns: repeat(4, 92px);
|
||||
}
|
||||
.denary{ font-size: 62px; }
|
||||
.binary{ font-size: 40px; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user