Shattered Slumber
Shattered Slumber
Byㅤ TopDownUnderTopDownUnder
Published on 05 May 2022 15:02
rating: 0+x

What this is

A bunch of miscellaneous CSS 'improvements' that I, CroquemboucheCroquembouche, use on a bunch of pages because I think it makes them easier to deal with.

The changes this component makes are bunch of really trivial modifications to ease the writing experience and to make documenting components/themes a bit easier (which I do a lot). It doesn't change anything about the page visually for the reader — the changes are for the writer.

I wouldn't expect translations of articles that use this component to also use this component, unless the translator likes it and would want to use it anyway.

This component probably won't conflict with other components or themes, and even if it does, it probably won't matter too much.

Usage

On any wiki:

[[include :scp-wiki:component:croqstyle]]

This component is designed to be used on other components. When using on another component, be sure to add this inside the component's [[iftags]] block, so that users of your component are not forced into also using Croqstyle.

Related components

Other personal styling components (which change just a couple things):

Personal styling themes (which are visual overhauls):

CSS changes

Reasonably-sized footnotes

Stops footnotes from being a million miles wide, so that you can actually read them.

.hovertip { max-width: 400px; }

Monospace edit/code

Makes the edit textbox monospace, and also changes all monospace text to Fira Code, the obviously superior monospace font.

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&display=swap');
 
:root { --mono-font: "Fira Code", Cousine, monospace; }
#edit-page-textarea, .code pre, .code p, .code, tt, .page-source { font-family: var(--mono-font); }
.code pre * { white-space: pre; }
.code *, .pre * { font-feature-settings: unset; }

Teletype backgrounds

Adds a light grey background to <tt> elements ({{text}}), so code snippets stand out more.

tt {
  background-color: var(--swatch-something-bhl-idk-will-fix-later, #f4f4f4);
  font-size: 85%;
  padding: 0.2em 0.4em;
  margin: 0;
  border-radius: 6px;
}

No more bigfaces

Stops big pictures from appearing when you hover over someone's avatar image, because they're stupid and really annoying and you can just click on them if you want to see the big version.

.avatar-hover { display: none !important; }

Breaky breaky

Any text inside a div with class nobreak has line-wrapping happen between every letter.

.nobreak { word-break: break-all; }

Code colours

Add my terminal's code colours as variables. Maybe I'll change this to a more common terminal theme like Monokai or something at some point, but for now it's just my personal theme, which is derived from Tomorrow Night Eighties.

Also, adding the .terminal class to a fake code block as [[div class="code terminal"]] gives it a sort of pseudo-terminal look with a dark background. Doesn't work with [[code]], because Wikidot inserts a bunch of syntax highlighting that you can't change yourself without a bunch of CSS. Use it for non-[[code]] code snippets only.

Quick tool to colourise a 'standard' Wikidot component usage example with the above vars: link

:root {
  --c-bg: #393939;
  --c-syntax: #e0e0e0;
  --c-comment: #999999;
  --c-error: #f2777a;
  --c-value: #f99157;
  --c-symbol: #ffcc66;
  --c-string: #99cc99;
  --c-operator: #66cccc;
  --c-builtin: #70a7df;
  --c-keyword: #cc99cc;
}
 
.terminal, .terminal > .code {
  color: var(--c-syntax);
  background: var(--c-bg);
  border: 0.4rem solid var(--c-comment);
  border-radius: 1rem;
}

Debug mode

Draw lines around anything inside .debug-mode. The colour of the lines is red but defers to CSS variable --debug-colour.

You can also add div.debug-info.over and div.debug-info.under inside an element to annotate the debug boxes — though you'll need to make sure to leave enough vertical space that the annotation doesn't overlap the thing above or below it.

…like this!

.debug-mode, .debug-mode *, .debug-mode *::before, .debug-mode *::after {
  outline: 1px solid var(--debug-colour, red);
  position: relative;
}
.debug-info {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
  white-space: nowrap;
}
.debug-info.over { top: -2.5rem; }
.debug-info.under { bottom: -2.5rem; }
.debug-info p { margin: 0; }
/* source: http://ah-sandbox.wikidot.com/component:collapsible-sidebar-x1 */
 
#top-bar .open-menu a {
        position: fixed;
        top: 0.5em;
        left: 0.5em;
        z-index: 5;
        font-family: 'Nanum Gothic', san-serif;
        font-size: 30px;
        font-weight: 700;
        width: 30px;
        height: 30px;
        line-height: 0.9em;
        text-align: center;
        border: 0.2em solid #888;
        background-color: #fff;
        border-radius: 3em;
        color: #888;
}
 
@media (min-width: 768px) {
 
    #top-bar .mobile-top-bar {
        display: block;
    }
 
    #top-bar .mobile-top-bar li {
        display: none;
    }
 
    #main-content {
        max-width: 708px;
        margin: 0 auto;
        padding: 0;
        transition: max-width 0.2s ease-in-out;
    }
 
    #side-bar {
        display: block;
        position: fixed;
        top: 0;
        left: -20em;
        width: 17.75em;
        height: 100%;
        margin: 0;
        overflow-y: auto;
        z-index: 10;
        padding: 1em 1em 0 1em;
        background-color: rgba(0,0,0,0.1);
        transition: left 0.4s ease-in-out;
 
        scrollbar-width: thin;
    }
 
    #side-bar:target {
        left: 0;
    }
    #side-bar:focus-within:not(:target) {
        left: 0;
    }
 
    #side-bar:target .close-menu {
        display: block;
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        margin-left: 19.75em;
        opacity: 0;
        z-index: -1;
        visibility: visible;
    }
    #side-bar:not(:target) .close-menu { display: none; }
 
    #top-bar .open-menu a:hover {
        text-decoration: none;
    }
 
    /* FIREFOX-SPECIFIC COMPATIBILITY METHOD */
    @supports (-moz-appearance:none) {
    #top-bar .open-menu a {
        pointer-events: none;
    }
    #side-bar:not(:target) .close-menu {
        display: block;
        pointer-events: none;
        user-select: none;
    }
 
    /* This pseudo-element is meant to overlay the regular sidebar button
    so the fixed positioning (top, left, right and/or bottom) has to match */
 
    #side-bar .close-menu::before {
        content: "";
        position: fixed;
        z-index: 5;
        display: block;
 
        top: 0.5em;
        left: 0.5em;
 
        border: 0.2em solid transparent;
        width: 30px;
        height: 30px;
        font-size: 30px;
        line-height: 0.9em;
 
        pointer-events: all;
        cursor: pointer;
    }
    #side-bar:focus-within {
        left: 0;
    }
    #side-bar:focus-within .close-menu::before {
        pointer-events: none;
    }
    }
}

rating: 0+x

Shattered Slumber

Paradise.

How else could I describe the High Realm if not as paradise? It's all a dead man could ask for. No pain, no fighting, no endless torment, no overseers. All of that, replaced by… by… The High Realm was difficult to explain. It isn't a place, it isn't a location, a new plane of existence. It was a feeling. A state of mind. A good, calming, state of mind. Like a herbal tea, or a mother's warm embrace after a long, arduous day of work. Or, rather, it was.

I'm not so sure how long I had been in the High Realm when it happened. All I remember is a distant, muted explosion followed by a sense of dread. The ever-comforting feeling of the High Realm came to an abrupt stop. Then the cracks started forming. Fissures in the very being of the Realm, ruptures in the endless wonder. Through these cracks, I saw her. Yvith, this large, indescribable mass of… suffering. As though all the bad of Xerophylla, of the Foundation, of humanity, had been given form. I watched, from my popped bubble of blissful ignorance, as she tore apart the Heavens.

As I fell from paradise, I felt a toxic, maddening presence enter me.


I got up with a start and hit my skull on the wood above me, cursing the pain as I rubbed my head. Pain… That's not something I had felt in a long, long time. I slowly forced open my crusty eyes, coming face to face with the wood in front of me. It was old and rotten, the holes in the planks letting in some of the light from above. Had I really been dead for that long?

I pushed against the lid of the coffin, which came off far too easily. I looked up at the descending sun illuminating my coffin, through a clear absence of dirt. With some effort, I pulled myself out of my grave and stood up. The city around me looked just like how I remembered it, dreary and decrepit. I looked down at the tombstone behind me, taking time to take in each letter of my name.

HERE LIES

ESSIE EVEREST

LOVING SON AND HARDWORKING ARCHITECT

1781 - 1832

I frowned. I worked hard at that damnable Foundation and that was all they could be bothered to put down for me? I helped with numerous projects and helped them gain power and this is all they could bother to put on my grave? They couldn't even give me an actual tomb. Just chuck me in here with the lowlife, like I was a no one…

I turn to look at the rest of the graveyard. None of the other graves were unburied or disturbed. I look at the one next to mine - belonging to an "Iceberg" - and hear the sounds of pounding underneath the dirt. Whatever had happened in paradise has caused the dead to come back. No trouble, I'll find someone to send me back.

I began to shamble down the dirt path, my rotten legs struggling to take me anywhere. I'd leave this graveyard, find an arcanist or witch to send me back to the High Realm, and be done with this. As I walked, I heard the same pounding I had heard from Iceberg's grave in all the others. Maybe I had been lucky to be unburied, even if it was disrespectful.

At the far end of the graveyard, I saw someone else, tending to a broken gravestone. She seemed to be on the younger side, though it was hard to tell with the haggard robe that she wore. She had on the clothes of a peasant, a patchwork hood made up of other, equally as dirty clothing. She'd have to make do. I limped towards her, calling out for her help.

She got up with a start, turning to look at me with a scared expression. Her face was stained with filth and grime, her hands covered in dirt and muck from the grave. She seemed to be paralyzed from fright at the sight of me.

As I got closer to her, I felt myself start to move faster, much more quickly than I had intended. I tried to call out to her to help, to ask for me to be sent back to the High Realm, but all that came out was a guttural scream. I felt my arms come up in front of me, reaching out to grab her. I closed my eyes and tried to stop, tried to freeze my body in place. I felt myself become a lot lighter as I heard footsteps running away from me.

I hesitantly opened my eyes and, in horror, saw my body in front of me, moving on its own. It shambled towards the girl, swiping and clawing at her. I ran towards it, reaching out to stop it, grab onto its shoulders and pull it back. I pounced on it and went right through it, hitting the ground hard. The body ran over me and jumped on the girl as I got up. I laid there on the ground and watched in horror as I ripped into the girl, biting down on her flesh and spraying blood on the nearby gravestone.

Trembling, I sat back up. My body copied my movements, pulling out a long piece of the intestine as it rose. I almost vomited at this site, doubling over and falling back to my knees. My body fell back down and ripped a chunk out of her face, exposing her yellowed teeth underneath her cheeks.

Every time I tried to move away, avert my gaze from myself, my body mocked my movement, moving so I could see as it tore into the poor girl, mutilating and mangling what was left of her.

Under the reddening sun, I watched as a hateful presence took over my body. I watched as it rose from the tattered remains of the girl and, without any input or command from me, shambled away to find its next victim. To tarnish what was left of my legacy.


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License