I don't think you can do this with buttons without using JavaScript to add a class or change the style.
However, you can do this with <a href> by adding a :visited style:
.button {
padding: 15px 30px;
margin: 0px 3px 0px 0px;
font-size: 20px;
font-weight: 400;
font-family:Arial, Helvetica, sans-serif;
border:none;
text-decoration:none;
}
.button:hover,.button:active,.button:visited{
cursor: pointer;
background: black;
}
.btn-scale-0, .btn-scale-1, .btn-scale-2, .btn-scale-3{
background-color: #FE0200;
color: white;
text-shadow: 1px 1px 3px #8e8e8e;
}
<a href="#scale-0" id="scale-0" class="button btn-scale-0">0</a>
<a href="#scale-1" id="scale-1" class="button btn-scale-1">1</a>
<a href="#scale-2" id="scale-2" class="button btn-scale-2">2</a>
<a href="#scale-3" id="scale-3" class="button btn-scale-3">3</a>
The downside is that they will remain black even if you leave the page and return (unless the user clears their browser history).
Here's a second approach that uses invisible checkboxes instead of buttons. However, this also has a downside where the user can click the button again to undo the color change:
input[type=checkbox][id^=scale-] {
display: none;
}
.button {
padding: 15px 30px;
margin: 0px 3px 0px 0px;
font-size: 20px;
font-weight: 400;
font-family: Arial, Helvetica, sans-serif;
border: none;
}
input[type=checkbox][id^=scale-]:checked + .button,
.button:hover,
.button:active,
.button:visited {
cursor: pointer;
background: black;
}
.btn-scale-0,
.btn-scale-1,
.btn-scale-2,
.btn-scale-3 {
background-color: #FE0200;
color: white;
text-shadow: 1px 1px 3px #8e8e8e;
}
<input type="checkbox" id="scale-0"><label for="scale-0" class="button btn-scale-0">0</label>
<input type="checkbox" id="scale-1"><label for="scale-1" class="button btn-scale-1">1</label>
<input type="checkbox" id="scale-2"><label for="scale-2" class="button btn-scale-2">2</label>
<input type="checkbox" id="scale-3"><label for="scale-3" class="button btn-scale-3">3</label>