Custom CSS¶
Every session type has a Custom CSS feature. Whatever you type is inserted into the
player page as a <style> element, unchanged and unscoped, so you can restyle almost
anything the player draws: fonts, colours, sizes, animation, layout and stacking.
The player page is deliberately bare. It has no site chrome, only a black background, white text and the elements the session’s features create. Those element ids and class names are a stable contract: the XR presenter relies on the same names, so they do not change between releases without notice.
Note
The old wiki referred to #spiral-gif and #image. Those names no longer exist. The
current names are #spiral-holder, #webgl-spiral-holder, #images-holder and
img.scatter-image, listed below.
Adding custom CSS to a session¶
On the session editor’s Content tab, click + Custom CSS in the Add optional feature row. The editor jumps to the Settings tab, where the feature now has a Custom CSS for Session box.
Type or paste CSS into the box and press Save.
Selectors you can target¶
Text¶
Selector |
What it is |
|---|---|
|
The centre text in MST and BST sessions. Use the class, not the id: in VR there are two of them ( |
|
The full-screen flex container that centres the focus line. |
|
A classic distractor. Each also carries |
|
The wall-of-text distractor layer. Full screen, |
Spiral and images¶
Selector |
What it is |
|---|---|
|
Full-screen layer for the spiral. With a media spiral it holds the image as a |
|
The |
|
The red error box shown when a custom shader fails to compile. |
|
Full-screen wrapper for the full-screen image cycler. |
|
The element that receives each image as |
|
Layer for the scatter image mode. |
|
One floating image. Has |
Task user interfaces¶
Session type |
Selectors |
|---|---|
Write Lines Task |
|
Action Task |
|
Story Trance Task |
|
Engram Completion Task |
|
Stacking order¶
From back to front. Use z-index above these values if you add your own layers.
Layer |
z-index |
|---|---|
|
1 |
|
2 |
|
3 |
|
4 |
Story Trance Task text and button |
5 |
|
10 |
Write Lines and Engram punishment overlays |
9999 |
Fonts and animations that are always available¶
The player stylesheet defines two fonts and one animation you can use without any
@font-face of your own:
Name |
Kind |
Effect |
|---|---|---|
|
font family |
block lettering with hearts |
|
font family |
some characters randomly flipped |
|
keyframes |
scale 0.9 → 1.0 → 0.9. Already applied to distractors through |
While the matching feature is active, these keyframes are also defined:
Name |
Defined by |
|---|---|
|
full-screen image cycler (scale 1 → 1.25 over 1.5s) |
|
scatter images (durations come from the feature settings) |
|
Write Lines Task cursor |
Examples¶
Change the focus text font, size and colour:
.focus-line {
font-family: 'heartFont', sans-serif;
font-size: 9vh;
color: #ffb3e6;
}
Make the focus text breathe:
.focus-line {
animation: breathing 4s linear infinite;
}
Tint and soften the spiral canvas:
#webgl-spiral-holder {
filter: hue-rotate(90deg) blur(1px);
}
Make distractors large, faint and italic:
.distractor {
font-size: 4vh;
font-style: italic;
opacity: 0.5;
}
Fill the screen with the image cycler instead of letterboxing it:
.images-holder {
background-size: cover !important;
}
Use a font from your Stash:
@font-face {
font-family: 'MyFont';
src: url('https://…/stash/…/MyFont.woff2');
}
.focus-line { font-family: 'MyFont', sans-serif; }
Define a class you switch on from YSS:
.focus-line.shout {
text-transform: uppercase;
letter-spacing: 0.2em;
color: #ff2020;
}
[style.text.main.add_class=shout] LISTEN
Notes¶
The engine sets many properties inline on the elements it creates. If a rule seems to have no effect, add
!important.CSS is applied as written, with no sanitising. A stray
}can silently disable everything after it. The browser’s developer tools show the injected<style>in the page head.Subjects can copy a session’s full JSON, custom CSS included, from the transparency report’s copy button, so there is nothing hidden in it.