SCP Hover Box Styling

ERMAHGERD STAHP

This is a template page used internally by the SCP Wiki.

PLEASE DO NOT TOUCH THIS PAGE
WITHOUT STAFF PERMISSION


[[module css]]
 @import url("https://use.typekit.net/fmm4kex.css");

.scp-hover-box {
    width: 85%;
    margin: 0 auto;
    position: relative;
}

.scp-hover-box::before {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    content: " ";
    box-sizing: content-box;
    top: 0;
    left: 0;
    transition: 
        border 1s 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
        top 1s 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
        left 1s 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        background 1s 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.scp-hover-box:hover::before {
    box-sizing: content-box;
}

.scp-hover-box::before,
.scp-hover-box div.container, 
.scp-hover-box div.header {
    clip-path: polygon(
            0% var(--notch-size), 
            var(--notch-size) 0%, 
            calc(100% - var(--notch-size)) 0%, 
            100% var(--notch-size), 
            100% calc(100% - var(--notch-size)), 
            calc(100% - var(--notch-size)) 100%, 
            var(--notch-size) 100%, 
            0% calc(100% - var(--notch-size))
    );
}

div.scp-hover-box * {
    box-sizing: border-box;
}

div.scp-hover-box .container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    max-width: var(--body-width-on-desktop, 65rem) !important;
    box-sizing: border-box;
    transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), color 1s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 4rem;
}

div.scp-hover-box .container::before,
div.scp-hover-box .container::after {
    content: "";
    position: absolute;
    left: 0;
    height: 0.125rem;
    width: 100%;
    max-width: var(--body-width-on-desktop, 65rem) !important;
    z-index: -1;
}

div.scp-hover-box .container::before {
    top: 0;
}

div.scp-hover-box .container::after {
    bottom: 0;
}

div.scp-hover-box .container:hover > * > *::before,
div.scp-hover-box .container:hover > * > *::after {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

div.scp-hover-box .container:hover > * > * > *::before,
div.scp-hover-box .container:hover > * > * > *::after {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

div.scp-hover-box .container > *::before,
div.scp-hover-box .container > *::after {
    content: "";
    position: absolute;
    top: 0;
    height: 100%;
    width: 0.125rem;
    z-index: -1;
}

div.scp-hover-box .container > *::before {
    left: 0;
}

div.scp-hover-box .container > *::after {
    right: 0;
}

div.scp-hover-box .container > * > *::before,
div.scp-hover-box .container > * > *::after {
    content: "";
    position: absolute;
    left: 0;
    z-index: 9;
    height: 0.125rem;
    width: 100%;
}

div.scp-hover-box .container > * > *::before {
    top: 0;
    -webkit-transform: translate3d(-105%, 0, 0);
    transform: translate3d(-105%, 0, 0);
    transition: -webkit-transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

div.scp-hover-box .container > * > *::after {
    bottom: 0;
    -webkit-transform: translate3d(105%, 0, 0);
    transform: translate3d(105%, 0, 0);
    transition: -webkit-transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

div.scp-hover-box .container > * > * > *::before,
div.scp-hover-box .container > * > * > *::after {
    content: "";
    position: absolute;
    top: 0;
    z-index: 9;
    height: 100%;
    width: 0.125rem;
}

div.scp-hover-box .container > * > * > *::before {
    left: 0;
    -webkit-transform: translate3d(0, 105%, 0);
    transform: translate3d(0, 105%, 0);
    transition: -webkit-transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

div.scp-hover-box .container > * > * > *::after {
    right: 0;
    -webkit-transform: translate3d(0, -105%, 0);
    transform: translate3d(0, -105%, 0);
    transition: -webkit-transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

div.scp-hover-box div.container div:not(.sub-title):not(.title) {
    width: 100%;
}

div.scp-hover-box div.header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    letter-spacing: 0.05em;
}

div.scp-hover-box div.title > a, 
div.scp-hover-box div.sub-title > a,
div.scp-hover-box div.title,
div.scp-hover-box div.sub-title {
    display: flex;
    margin: 0;
    flex-basis: 50%;
    flex-grow: 1;
    flex-shrink: 1;
    padding: 0;
    box-sizing: border-box;
}

div.scp-hover-box div.title > a,
div.scp-hover-box div.sub-title > a {
    font-size: 150%;
    font-family: var(--title-font, proxima-nova-extra-condensed);
    width: 100%;
    padding: 0.5em;
    line-height: 1em;
    align-items: center;
}

div.scp-hover-box div.title > a:hover,
div.scp-hover-box div.sub-title > a:hover {
    text-decoration: none;
}

div.scp-hover-box div.title > a {
    justify-content: flex-start;
    text-align: left;
}

div.scp-hover-box div.sub-title > a {
    justify-content: flex-end;
    text-align: right;
}

div.scp-hover-box div.blerb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-basis: 100%;
    flex-shrink: 0;
    min-height: 4em;
    padding: 0.75em;
    text-align: center;
}

.blerb br {
    display: none;
}

.blerb *:not(:last-child) {
    margin-bottom: 0.25em;
}
[[/module]]
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License