蛇之谕 Ⅰ
评分: +20+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; }

评分: +20+x
snow-camp

铃声洪亮悠远,坐在火堆旁喝汤的莉莉怀德被惊得一震。林德尔放下皮袋,向山林深处眺望。一开始时几乎什么都没有发生。这洪亮的声响被雪与树林尽数吸收,林地以惊人的速度恢复了原本的静谧。这是一个无风的冬日清晨。身边重又凝滞下来的寒冷空气,会让人怀疑刚才的声音是否只是幻听。

但她不会怀疑。她是随风而动的精灵,她知道在野地中不存在真正凝滞的空气。微弱的气流为她带来一种纷乱的振动,那不会是花鼠或狐狸,在如此厚实的雪地上,它们轻巧的步履连风也无法留住。发出这样的声响,必须是某种足够大,足够重的东西才行。

很快,蹄声已经清晰可闻。驯鹿感知到使鹿人的呼唤,从森林的深处应召而来。它们太久没有回到人类的营地,厚实的皮毛因脏污而更加膨胀。当它们顶着巨硕的鹿角,以近乎滑行的沉稳步伐在莉莉面前呼啸奔过时,她恍惚间以为是山向她走来。当她回过神时,驯鹿们已经围绕在林德尔的身边,一边喘息,一边争先恐后地用鼻唇在他摊开的手上探索。在驯鹿的簇拥中,身穿长袍的白发青年此刻宛如一位圣者。

“你是不是第一次见到驯鹿?”林德尔问。

“嗯。”她捞出碗里最后剩下的肉干放在嘴里嚼。

“你知道人是靠什么驯服驯鹿的吗?”

“枪。”她回答。“食物。或者锁链?”

“……其实不是啦。”林德尔露出无奈的笑容。“是盐。”

“盐?”她舔了一下嘴里的肉干。

“对于它们而言,盐是林地中最稀缺的东西。”他拍了拍手掌。“它们不缺少食物,苔藓与地衣在丛林中随处可得;但这些食物无法像猎物的血肉那样,为它们提供盐分。林地中的碱土永远不够多,而且总会有猎食者的窥伺。所以它们不会抗拒牧人盐袋的召唤。”

“那个锁链呢?”

“你说鹿套?”林德尔扯了扯手上的鹿套。“这个只需要稍微用力就能扯断。使鹿人不会试图束缚驯鹿的,那只会让它们离开之后不再归来。”

“那么,就把它们永远关在围栏里。”

“何至如此哟,心狠的姑娘。”

莉莉稍稍挪动身体坐到旁边,林德尔越过她拿起火堆上的水壶,倒一杯红茶,然后把瓶子中最后剩下的牛奶倒在里面。他在莉莉身旁的石头上坐下,慢慢地喝了一口,白雾从杯中和他的唇边袅袅升起。驯鹿安静地站在空地上,偶尔打一个喷嚏。

“总算找到它们了,看起来它们精神还好。这样能赶在下一次大雪之前回到营地。”林德尔握着杯子。“这段时间要你带着伤和我到处东奔西跑,实在是辛苦你了。”

“不,哪里的话……我的伤都是你治的。”莉莉说。“我现在恢复许多了。能够帮上你的忙,已经是我的荣幸。”

“哎呀?哎呀呀?”林德尔笑了。“你这么说我很开心呐。既然恢复许多了,那今天也来复健吧。”

“还来?不要啊……”

“快来嘛。”林德尔脱下长袍,挂在树枝上。驯鹿向两人的方向伸长脖子。


“我总是回忆起我们初次相遇时的情景。”林德尔说。“那时你还是一个总是缩在角落里的女孩,只是因为太害羞而一言不发。看看这个小姑娘,她现在可活泼多了!”

林德尔猛地压低身子,避开莉莉瞄准躯干的回身踢。他保持低重心的姿态击打她支撑身体的单腿。雪地湿滑,这一击成功地令她踉跄一下,但她身后的尾巴立刻以本能支撑住主人的身体,使她不至于摔倒。尾部伤处的隐痛让她打了个颤。她抬脚回以刺击,而林德尔已闪到一旁。

“别说得像你是我老妈一样。”莉莉说。“还有你干嘛要在战斗途中聊这种事?”

“我就是突然想到了。你知道,老人就是这样,总是突然陷入回忆。”

“身手比猴子还矫健的老人?”

“这世上也是有的嘛。况且,这世上也有喜欢用话语扰乱对手心神的家伙。如果觉得不服气,可别让油嘴滑舌的狐狸偷偷得手啊。”

对那一晚她只有模糊的记忆。因为在那之前的日子里,她已经无法保持意识清醒。她躺在冰冷的地板上,浑身滚烫;而头尤为沉重而灼热,像是一滩融化的铅。她不知道已经过了几天,也不知道现在是白天还是夜晚。她无法睡去也无法醒来,意识在可怕的混沌中漂浮,只有偶尔从尾部传来的刺痛让她知道自己还活着。但除了抽搐一下,她的身体没有力气做到更多。

有风掠过脸颊——这久违的新鲜空气令她勉强睁开双眼。她趴在一张修长却有力的后背上,鳞片冰凉细腻的触感使她舒适而安心。暮色低沉,龙群在辽阔的原野上乘风奔驰。亲爱的朋友,我是如此想念你们。她抱住林德虫的脊背,再次陷入了昏睡。

在营火前歇息的林德尔听到附近的空间发出噼啪声响。林德虫们穿越森林的背面,在他的面前站定。林德尔一惊,但随即马上察觉到为首的林德虫背上女孩的状况。

长生的贤者。林德虫说。北方大地的守卫,百花之歌,请求您救治——

“敬语先免了。”林德尔俯身将手搭在她的身上,温柔的绿光浮现,她感觉自己头脑清明许多。“如此可怕的外伤和感染,这孩子遭遇了什么?”

她曾被囚禁在风不能触及的地方,我们不能知晓内情。林德虫回答。她的身躯已经堕落,无法再与我们同行,但这不是她的错。无论如何,请您救救她。

“医者是不会对面前正在受苦的生命置若罔闻的。”林德尔说。“向你们保证,我会照顾这个孩子。”

她收回思绪,在林德尔三步距离处站定。下一秒,青年的身形闪电一般向她袭来。她伸手借力按下林德尔的摆拳,抬起膝盖,但大腿马上被他的手臂扼住。他抽手向她的脸挥出直拳,而她仰面向后,尾部支撑重心,用另一条腿踢向他的下颚。是她的速度更快。她顺势空翻,轻巧地落地,而林德尔仰面躺在雪地上。

“好,很好!就是这样!”林德尔喘着气说。“用上你的手和尾巴,习惯使用它们。不要视它们为你的弱点!即使不为你所愿而生,你的肢体也永远不会背叛。”

“没事吧?”莉莉说。

“没事没事,你的力道控制得很好。”

“别把你那疏松的下巴踢歪了,老爷子。”

她回到火炉旁边歇息。林德尔从地上爬起来,添了半壶冰凉的泉水,把水壶重新架在火堆上。壶嘴很快冒出了白烟。他抱着杯子,舒适地叹了口气。她皱着眉头啜饮杯中的茶水。

“是该去城镇补充必需品的时候了,回家的路还远呢。”林德尔说。“牛奶。还有茶叶。”

“我不喜欢茶。”

“哎呀,习惯就好。而且盐也没有了。”

“没有盐不行。”莉莉说。

“是啊。为了维持身体的运转必须摄入盐,这一点无论人类还是野兽都一样。”林德尔说。“我知道你对人类没有什么好感,但我们不得不补充物资了。放心吧,不会出什么意外。我可是贤者哟。”


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