Currently it seems that isn’t possible to toggle property(s) in CSS. I want to be able to click on this sidebar thing and have it toggle between open and closed.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Some Page...</title>
<style>
.thing {
position:absolute;
transform:rotate(90deg);
transform-origin:0% 0%;
left:6px;
top:26px;
border:3px solid #339955;
background-color:#66CC88;
width:200px;
cursor:pointer;
transition: left 1s;
}
.thing:active {
left:26px;
}
.top {
position:relative;
border:3px solid #335599;
background-color:#6688CC;
width: calc(100% + 10px);
left:-8px;
top:-8px;
}
</style>
</head>
<body>
<div class="top">Top Thing</div>
<div class="thing">Side Thing</div>
</body>
</html>
That code in action: https://www.w3schools.com/code/tryit.asp?filename=FRQAB0QBSE04
If this becomes a reality, this could have some really useful applications. (like the one above)
.thing:toggle {left:26px;}