埋葬光明
埋葬光明
作者 Hg-labHg-lab
发布于 27 Jun 2022 07:03
评分: +2+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; }

埋葬光明

他本以为这个男人无法踏足他的领地,而这个男人总是令人吃惊。

伯爵一瘸一拐,迅速穿过庄园,按住流血不止的左臂。他闻到了甜腥气,甘美的脓血滴落在曾经华美的瓷砖地板上,几乎按捺不住将其喝干的冲动。他已经很久、很久没有进食了。如果不是痛苦地意识到这具破烂不堪的身体属于自己,他早就将其糟蹋了;他早已臣服于几近动物的本能。而这一次,他却没有这样奢侈的选择。决不能让那个男人追上他。

一瞬间他想,也许那些所谓的仆人能把守住门,也许他用难以想象的痛苦刻下的圣痕会让这个男人退却。但当他踩上面前咯吱作响的楼阶,连直行都变得困难时,他明白自己应该更清楚——真是个蠢货,居然期许这种雕虫小技对那个男人奏效。

但也许——只是也许——在吸血鬼逃出生天之前,这个男人会迷失在伯爵建下的迷宫之中。即便在夜幕降临之前,那些无穷无尽、迷局重重的走廊和大厅也足以令任何人发疯,但他不十分确定这个男人究竟是不是人类。其传说流传甚广,纵然大部分是下层平民为了弄清自己的悲惨际遇而编织的谣言,伯爵也无法简单置之不理。

快到了,伯爵在脑海里大喊,伸手去够卧室的门把手。他几乎没有力气完成这一尝试,但他咬紧下唇,办到了,将一头脏兮兮、长长的黑发甩开。只要一步,只要再前进一步,他就安全了。他发出一声动物般的咕哝,像庶民一般倒在冰冷的地板上,即使身着皇室的华服。但这种屈尊无关紧要——他此刻来到了避难所,那个男人在这是抓不到他的。他一面爬向放酒的桌子,一面从腐烂的牙齿中露出灿烂的笑容。他知道自己赢了。

“恭候多时。”一个粗哑的声音冷冷道,让伯爵的心脏漏了一拍,——要是它还会跳动的话。

男人的样貌正如他所料——身形瘦高,一袭黑衣,宽大的黑帽将他的脸掩盖在阴影之中。两把上好膛的手枪挂在腰间,蓄势待发。手上一把单刀,玩具似地在指间抛着。他甚至没看伯爵一眼——那潜伏在黑发间的目光似乎全部聚集在刀子上,在各部件之间小心游走。他志在必得地微笑。

“怎—怎么…?”吸血鬼只能后撤,但一秒不到就咳嗽起来,喷出的血弄脏了男人手边的桌子。兴许他的大脑精疲力尽,出现了幻觉,但在液体溅上桌面时,伯爵在男人灰色的眼睛里看见了一丝欲望。

他露齿而笑,歪着脑袋,“这么说吧,我自有办法。”

“但,我——”前者将头伸向男人,努力想说什么。

回应几乎是一瞬间。男人将刀插进他的手掌,扎穿脆弱的灰色皮肤,力透地表。血液喷涌而出,吸血鬼本能地想要尖叫,两眼变得混乱疯狂。

“嘘,嘘,”猎人发出戏谑的声音,取过伯爵手边的酒抿了一口,酸得五官一皱。“哭什么,马上就好。”

“我可以…我可以随时…sh…杀了,你——!”吸血鬼抓住胸腔,试图阻止肺部的过度换气。他又咳出一口脓液,意识到凭自己没法满足这个愿望。“我有,有强悍的朋友,我——”

男人无视了他,从对方衣袋掏出了什么。在他将之扔进瓶子的时候,伯爵看清了那是奥术尘埃和海洛因的混合物。他向灵魂中那个神形空洞暗自祈祷,祈求男人不知道它的用途。

“哦,我可一点不怀疑。”前者简短回答,又从杯子里啜了一口。这一次,他晃着脑袋,品味由内而外的清晰口感。“但我非常怀疑他们是否能及时赶来,或者说,他们是否能活着。”他轻叩着自己的武器。

男人悄无声息地上前,用冰冷的手指抓住伯爵的脸,将原本是酒的液体灌入他的喉咙。他起初想反抗,身体每一个细胞都在尖叫着抗拒,知道这将会是他的末路。但当味蕾接触到其中虚幻不真的味道时,他再也无力继续了。他艰难地吞咽,感到毒液充满了他的肝脏、他的身体、他的大脑,还有他的灵魂。他的视线开始模糊。

“这就对了,”猎人继续嘲弄,后退一步,让伯爵倒在地板上,拼命朝门口爬去。“我就说没那么难的。”

他知道自己低估了这个男人,但并非毫无希望。在下面的某处,他的一些随从或许能够幸存。也许——只是也许——他们中的一个会听到他动物般痛苦的咆哮,弄清原委,并杀了那人。尽管渺茫到几近于无,但他必须一试,只想再为自己争取点时间。

“为…为什么?”他又吐了口血,再次喷在他珍贵的地板上。他能感到自己的生命在飞速流逝。

男人几步逼近可怜兮兮爬行的伯爵,钢靴在地板上发出三响。此刻他能感觉到男人的手正伸向腰间的银色枪托,但还能觉出更多东西——他的手在碰到金属握把时带有一种几不可闻的厌烦和抽搐。如果伯爵还能扬起眉毛的话,他会的。

“这个世界烂透了。”他扬起另一条胳膊做个手势,转向中庭唯一的窗户,一面红色玻璃。微红的,难以察觉的月光泻进房间,让伯爵得以看清男人的部分面庞。那张脸几乎带着狂喜,沉浸在一种无法言喻的期待之中。“病入膏肓。你这样的东西让黑夜降临于我们。是的,没错,我还记得那些岁月,”他拔高音量,注视着伯爵垂死的眼里流露出的诧异。“那时这个世界还很美好,没有像你这样的腐臭之物;那时我还能够沐浴在阳光的照耀之下。”

男人顿了顿,将戴着手套的手伸向远处某个不可见的形体。片刻,他看着布满了五芒星和秘印的白手套,将其褪下,露出一串苍白枯瘦的手指,它们在兴奋中颤抖。 “所以,只有一个结论合情合理。要让这一天重返人间,我们必须摆脱……,”他厌恶地啐了一口, “碰巧我是一个了解自己职责的人。”

药粉渗入伯爵的呼吸系统,引发了癫痫的一系列症状。当他在曾被他视若珍宝的地板上挣扎时,男人毫不理睬,但觉察到这个问题在空气中挥之不去。

“哦?我是谁?”他迅速回过身,面露灿烂的微笑。 “我有很多名字。男人。猎人。血生者。但这没能完全满足你的好奇心,是吗?” 他再次走上前,将六颗银弹塞进了武器筒中。“丹尼尔……丹尼尔·阿什沃思,是的,就是这样。但那个时代早已一去不复返了。你可以向那个丹尼尔祈求怜悯。”

伯爵几乎看不见了。随着最后一星生命之火在他身上渐燃渐暗,他仰面躺着,颤抖的手伸向桌上的酒杯。 “可……你……你是怎么知道的?!”

男人只是笑了笑,把头往后一仰。再没有任何东西遮住他的脸了。曾经被阴影所遮蔽的地方,现在是一排被干渴的舌头舔净的,长长的牙齿。两眼盯着伯爵流血的手臂,几乎脱眶而出。男人转向他的下一个受害者,在他的头颅旁蹲下身,“不了解自己的同类,很难。”

他举枪,瞄准,扣动了扳机。

除非特别注明,本页内容采用以下授权方式: Creative Commons Attribution-ShareAlike 3.0 License