/* Tabs. */ .tab-yes { height: 100%; width: 6%; position: absolute; left: 0; background: var(--yes); animation-name: squeeze-refresh; animation-duration: var(--med-speed); } .tab-yes:hover ~ .feed-post { left: 6%; right: 0%; transition: var(--fast-speed); } .tab-no { height: 100%; width: 6%; position: absolute; right: 0; background: var(--no); animation-name: squeeze-refresh; animation-duration: var(--med-speed); } .tab-no:hover ~ .feed-post { left: 0%; right: 6%; transition: var(--fast-speed); } /* Feed of posts. */ .feed-post { height: 100%; left: 3%; right: 3%; background: white; background-image: url(../img/home.png); background-repeat: repeat-x; display: flex; position: absolute; flex-wrap: wrap; overflow: auto; justify-content: space-between; animation-name: fade-refresh; animation-duration: var(--slow-speed); } .post-wrapper { /* background: blue; */ position: relative; /* height: 20rem; */ height: 20%; max-width: 40%; margin: 1rem; perspective: 600px; } .post { position: relative; margin: 0 auto; height: 100%; width: 100%; background: white; border-radius: 12px; overflow: hidden; transition-duration: var(--med-speed); } .post-wrapper:hover > .post { width: 65%; overflow-y: auto; } .btn-yes { height: 100%; width: 15%; position: absolute; left: 0; background: var(--yes); border-radius: 8px; transform: rotateY(-90deg); transition-duration: var(--slow-speed); transform-origin: right; } .post-wrapper:hover > .btn-yes {transform: rotateY(0deg);} .btn-no { height: 100%; width: 15%; position: absolute; right: 0; background: var(--no); border-radius: 8px; transform: rotateY(90deg); transition-duration: 1s; transform-origin: left; } .post-wrapper:hover > .btn-no {transform: rotateY(0deg);} /* Dynamic content reajustment if browser window is made too narrow */ @media (max-width: 900px) { .feed-post { display: inline; } .post-wrapper { max-width: 100%; } }