NOTICE:
This is a component page used internally by the SCP Wiki. It is intended to be used and included on other pages.
What this is
A component that makes everything on the page smoothly fade in, instead of appearing instantly when the page loads. The fade can be staggered, with each thing on the page appearing one by one instead of all at once.
⚠️ Warning: This component can present a hostile reading experience for some users, especially when staggered. I recommend not using this component, and advising other authors to do the same.
⛔️ Not suitable for: Any page where the reader might not start at the top of the page, e.g. hubs or any page with a table of contents.
Usage
On any wiki:
[[include :scp-wiki:component:fade-in speed=1]]
speed=1: everything appears at the same time
speed=2: everything appears 0.2s after the last thing (not recommended)
speed=3: everything appears 0.1s after the last thing (not recommended)
Caveats
The fade-in effect will only apply to elements that are direct children of #page-content. It won't apply to nested elements (e.g. stuff inside a blockquote or a div) or other parts of the page (e.g the sidebar).
(You can use this to your advantage if there are other animations on your page that would conflict (e.g ACS Animation) by simply wrapping the problematic animated element in a div.)
To alleviate the negative impact on readers, the fade in animation only applies to the first 15 elements on the page, and everything else after that will appear at the same time.
Removing from other themes
Some CSS themes bundle Fade In by default (BLANKSTYLE CSS, Flopstyle: LITE, Foxtrot Theme and Queerstyle CSS at the time of writing). If you'd like to use those themes without Fade In, you can disable it with the following:
[[module CSS]]
:root {
--fade-in: none;
}
[[/module]]
Source code
:where(:root) { --fade-in: fadeIn; --fade-in-delay: 0s; } /* Disable for hub pages, due to the reader being likely to want to start reading elsewhere than the top of the page */ :root:has(#page-tags a[href*=hub]), /* Disable for pages with a table of contents, as the user is likely to jump directly to where they want to start reading */ :root:has(#toc) { --fade-in: none !important; } @media (prefers-reduced-motion: no-preference) { :where(#page-title, #breadcrumbs, #page-content > *) { animation-name: var(--fade-in); animation-duration: 0.8s; animation-iteration-count: 1; animation-timing-function: ease-out; animation-fill-mode: backwards; } } :where(#page-title) { animation-delay: 0s; } @keyframes fadeIn { from { opacity: 0; transform: translate(0,30px); } to { opacity: 1; transform: translate(0,0); } } :where(#page-content > :nth-child(1)) { animation-delay: calc(1 * var(--fade-in-delay)); } :where(#page-content > :nth-child(2)) { animation-delay: calc(2 * var(--fade-in-delay)); } :where(#page-content > :nth-child(3)) { animation-delay: calc(3 * var(--fade-in-delay)); } :where(#page-content > :nth-child(4)) { animation-delay: calc(4 * var(--fade-in-delay)); } :where(#page-content > :nth-child(5)) { animation-delay: calc(5 * var(--fade-in-delay)); } :where(#page-content > :nth-child(6)) { animation-delay: calc(6 * var(--fade-in-delay)); } :where(#page-content > :nth-child(7)) { animation-delay: calc(7 * var(--fade-in-delay)); } :where(#page-content > :nth-child(8)) { animation-delay: calc(8 * var(--fade-in-delay)); } :where(#page-content > :nth-child(9)) { animation-delay: calc(9 * var(--fade-in-delay)); } :where(#page-content > :nth-child(10)) { animation-delay: calc(10 * var(--fade-in-delay)); } :where(#page-content > :nth-child(11)) { animation-delay: calc(11 * var(--fade-in-delay)); } :where(#page-content > :nth-child(12)) { animation-delay: calc(12 * var(--fade-in-delay)); } :where(#page-content > :nth-child(13)) { animation-delay: calc(13 * var(--fade-in-delay)); } :where(#page-content > :nth-child(14)) { animation-delay: calc(14 * var(--fade-in-delay)); } :where(#page-content > :nth-child(15)) { animation-delay: calc(15 * var(--fade-in-delay)); } :where(#page-content > :nth-child(n+15)) { animation-delay: calc(16 * var(--fade-in-delay)); }
:where(:root) { --fade-in-delay: 0.2s; }
:where(:root) { --fade-in-delay: 0.1s; }
On any wiki:
[[include :scp-wiki:component:pjpss]]
This is a repository for the various custom CSS I use for all of my articles. I'll end up editing this as my tastes change, so use it at your own risk. Currently, this includes:
- Thinner horizontal rule.
- Custom interview, blockquote, and addendum boxes.
- Hides the page title.
- Adds an indent to bulleted lists.
- Like this!
FEATURES
Addendum Box
Interview Box
Blockquote with some thin horizontal rules
ALSO STARRING
BLACK HIGHLIGHTER THEME
BHL DARK AND HIDDEN SIDEBAR
CENTERED HEADER
ACS ANIMATION
#page-title { display: none; } #page-content hr { border: solid 0.02em #000000 !important; background: #000000 !important; height: 0.02em !important; display: block !important; box-shadow: none !important; margin: 1em 0 !important; } #page-content > .collapsible-block { display: block; text-align: left; padding: 1px; margin: 5px auto; border: none; } #page-content > .collapsible-block .collapsible-block-content { text-align: left; } .info-container .collapsible-block-folded a, .info-container .collapsible-block-unfolded-link a { color: #FFF; } blockquote, div.blockquote { border: 0.125rem solid #d4d4d4; background-color: #F5F5F5; } .interview { border: solid 2px #d4d4d4; background: #F5F5F5; width: 90%; padding: 1px 15px; margin: 10px auto; box-shadow: 1px 1px 4px #5e5e5e82; } .addendum { border-left: solid 5px #642c2c; background: #ffffff; box-shadow: 1px 1px 4px #5e5e5e82; width: 90%; padding: 1px 15px; margin: 10px auto; } #page-content ul:not(.yui-nav) { list-style-position: outside; margin: .25em 0 1em 2em; padding: 0; } #page-content ul:not(.yui-nav) > li { line-height: 1.4; margin: .25em 0; } #page-content ul:not(.yui-nav) > li:last-child { padding-bottom: .25em; } #page-content ul ul:not(.yui-nav) { margin: .35em 0 .6em 1.5em; } #page-content ul ul:not(.yui-nav) > li { margin: .15em 0; } #page-content ul ul:not(.yui-nav) > li:first-child { margin-top: 0; } #page-content ul ul:not(.yui-nav) > li:last-child { padding-bottom: 0; } @media (max-width: 768px) { #page-content ul:not(.yui-nav) { margin-left: 2.4em; } #page-content ul:not(.yui-nav) > li { line-height: 1.3; } #page-content ul ul:not(.yui-nav) { margin-left: 1.2em; } } :root { --logo-image: url("https://nu-scptheme.github.io/Black-Highlighter/img/logo.svg"); }
For anyone who really wants the dark sidebar from the O.G. BHL on their articles.
Just add this include AFTER the BHL include:
[[include :scp-wiki:component:bhl-dark-sidebar]]
#interwiki, #side-bar { /* ===SECONDARY & TERTIARY COLORS=== */ /* Editing these will edit a vast majority of theme elements. Useful for making dark themes */ /* Colors for Secondary & Tertiary items like Blockquote and YUI Tabs */ --swatch-secondary-color: var(--swatch-menubg-dark-color); --swatch-tertiary-color: var(--swatch-menubg-medium-color); --swatch-alternate-color: var(--swatch-menubg-light-color); /* Text Colors for Secondary & Tertiary items like Sidebar Headers and Top-Bar Menu Text */ --swatch-text-secondary-color: var(--swatch-menutxt-dark-color); --swatch-text-tertiary-color: var(--swatch-menutxt-light-color); /* ===SIDE-BAR ELEMENTS=== */ /* ===SIDE-BAR GENERAL=== */ --sidebar-bg-color: var(--swatch-menubg-dark-color); --sidebar-resources-bg-color: 0, 0, 0, 0; --sidebar-media-bg-color: 0, 0, 0, 0; /* ===SIDEBLOCK MENU=== */ --sideblock-heading-border-color: var(--bright-accent); --sideblock-heading-bg-color: 0, 0, 0, 0; /* Transparent */ --sideblock-heading-text-color: var(--swatch-text-tertiary-color); /* ===MENU-ITEMS=== */ --sidebar-border-color: var(--swatch-primary), 0.08; --sidebar-subtext-color: var(--swatch-text-tertiary-color); --sidebar-links-text: var(--swatch-text-tertiary-color); --sidebar-links-hover-bg-color: var(--bright-accent); --sidebar-links-hover-text-color: var(--swatch-text-tertiary-color); /* ===SIDEBAR COLLAPSIBLES=== */ /*Folded Colors */ --sidebar-collapsible-fld-link-bg: var(--swatch-primary), 0.25; --sidebar-collapsible-fld-link-color: var(--swatch-text-tertiary-color); --sidebar-collapsible-fld-link-hover-color: var(--swatch-text-tertiary-color); --sidebar-collapsible-fld-arrow-hover-color: var(--swatch-text-tertiary-color); /*Unfolded Colors */ --sidebar-collapsible-ufld-link-bg: var(--swatch-primary-darker), 0.25; --sidebar-collapsible-ufld-link-color: var(--swatch-text-tertiary-color); --sidebar-collapsible-ufld-link-hover-color: var(--swatch-text-tertiary-color); --sidebar-collapsible-ufld-arrow-hover-color: var(--swatch-text-tertiary-color); /* Unfolded Body Colors */ --sidebar-collapsible-link-color: var(--swatch-text-tertiary-color); --sidebar-collapsible-link-hover-color: var(--swatch-text-tertiary-color); scrollbar-color: rgba(var(--swatch-primary-darker), 0.1) /* Thumb */ rgba(var(--swatch-secondary-color), 0.05); /* Track */ border-color: rgba(var(--swatch-secondary-color), 0.4); } /* Hover Scrollbar Behavior */ #side-bar:hover, #side-bar:active { scrollbar-color: rgb(var(--swatch-primary-darker), 1) /* Thumb */ rgb(var(--swatch-menubg-dark-color), 1); /* Track */ } #side-bar:focus-within { scrollbar-color: rgb(var(--swatch-primary-darker), 1) /* Thumb */ rgb(var(--swatch-menubg-dark-color), 1); /* Track */ } #side-bar::-webkit-scrollbar-track { background-color: rgba(var(--swatch-tertiary-color), 0.8); } #side-bar::-webkit-scrollbar, #side-bar::-webkit-scrollbar-thumb, #side-bar::-webkit-scrollbar-corner { background-color: rgba(var(--swatch-menubg-dark-color), 0); } #side-bar .side-block.media a:-webkit-any-link { background: rgba(var(--swatch-menubg-light-color), 0.75) !important; } #side-bar .side-block.media a:-moz-any-link { background: rgba(var(--swatch-menubg-light-color), 0.75) !important; } #side-bar .side-block.media a:any-link { background: rgba(var(--swatch-menubg-light-color), 0.75) !important; } #side-bar .side-block.media a::before { background: rgb(var(--social-color)); } #side-bar .side-block.media a[href*="tiktok"]::before, #side-bar .side-block.media a[href*="tiktok"]::after { transition: background 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-image 200ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-clip-path 200ms cubic-bezier(0.4, 0, 0.2, 1); transition: clip-path 200ms cubic-bezier(0.4, 0, 0.2, 1), background 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-image 200ms cubic-bezier(0.4, 0, 0.2, 1); transition: clip-path 200ms cubic-bezier(0.4, 0, 0.2, 1), background 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-image 200ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-clip-path 200ms cubic-bezier(0.4, 0, 0.2, 1); } #side-bar .side-block.media a[href*="tiktok"]:hover::before { --clip-path: polygon(-15% 0, 115% 0, 100% 100%, 0 100% ); } #side-bar .side-block.media a[href*="tiktok"]:hover::before, #side-bar .side-block.media a[href*="tiktok"]:active::before { --clip-path: polygon(-15% 0, 115% 0, 100% 100%, 0 100% ); background-image: var(--tiktok-icon-gradient); background-size: contain; } #side-bar .side-block.media a[href*="tiktok"]:focus-within::before { --clip-path: polygon(-15% 0, 115% 0, 100% 100%, 0 100% ); background-image: var(--tiktok-icon-gradient); background-size: contain; } #side-bar .side-block.media a[href*="tiktok"]::after { --clip-path: polygon(0 0, 0 0, 0 100%, 0 100% ); background: rgba(var(--swatch-menubg-light-color), 0.75) !important; } #side-bar .side-block.media a[href*="tiktok"]:hover::after, #side-bar .side-block.media a[href*="tiktok"]:active::after { --clip-path: polygon(-15% 0, 115% 0, 100% 100%, 0 100% ); background: rgba(var(--swatch-menubg-light-color), 0.75) !important; } #side-bar .side-block.media a[href*="tiktok"]:focus-within::after { --clip-path: polygon(-15% 0, 115% 0, 100% 100%, 0 100% ); background: rgba(var(--swatch-menubg-light-color), 0.75) !important; } #side-bar .side-block.media a img { -webkit-filter: drop-shadow(0 0 0 rgba(var(--swatch-alternate-color), 0)); filter: drop-shadow(0 0 0 rgba(var(--swatch-alternate-color), 0)); transition: -webkit-filter 200ms cubic-bezier(0.4, 0, 0.2, 1); transition: filter 200ms cubic-bezier(0.4, 0, 0.2, 1); transition: filter 200ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-filter 200ms cubic-bezier(0.4, 0, 0.2, 1); } #side-bar .side-block.media a:hover img, #side-bar .side-block.media a:active img { -webkit-filter: drop-shadow(0.1875rem 0.1875rem 0 rgb(var(--swatch-alternate-color))); filter: drop-shadow(0.1875rem 0.1875rem 0 rgb(var(--swatch-alternate-color))); } #side-bar .side-block.media a:focus-within img { -webkit-filter: drop-shadow(0.1875rem 0.1875rem 0 rgb(var(--swatch-alternate-color))); filter: drop-shadow(0.1875rem 0.1875rem 0 rgb(var(--swatch-alternate-color))); } html:not(:lang(cn)) div.scpnet-interwiki-wrapper p::before { box-shadow: inherit; } #side-bar .scpnet-interwiki-wrapper:not(:lang(cn))::before, #side-bar .scpnet-interwiki-wrapper:not(:lang(cn)) p::before, #side-bar .scpnet-interwiki-wrapper:not(:lang(cn)) p::after { background-color: rgb(var(--swatch-menubg-dark-color)); }
What this does
Rearranges the header so that the titles and logos are centered
- Does NOT work on Sigma-9. This ONLY functions with Black Highlighter.
- Highly suggest using with either Collapsible Sidebar or Toggle Sidebar
How to use
1. Copy code below.
2. Paste in article after Black Highlighter and any other Theme include.
[[include :scp-wiki:component:centered-header-bhl]]
:root { /* header measurements */ --header-height-on-desktop: 10rem; --header-height-on-mobile: 10rem; --header-h1-font-size: clamp(2rem, 5vw, 2.8125rem); --header-h2-font-size: clamp(0.875rem, 3vw, 0.9375rem); --logo-image: url("https://nu-scptheme.github.io/Black-Highlighter/img/logo.svg"); } #header { --search-textbox-text-color: var(--swatch-secondary-color); background: none; } #header::before { content: " "; position: absolute; width: 100%; height: 100%; left: 0; top: 0.75rem; background-image: var(--logo-image); background-repeat: no-repeat; background-position: center 0; background-size: auto calc(var(--header-height-on-desktop) - 1.5rem); opacity: 0.8; pointer-events: none; } #header h1, #header h2 { margin: 0; padding: 0; width: 100%; height: var(--header-height-on-desktop); display: flex; align-items: center; justify-content: center; display: flex; align-items: center; justify-content: center; } #header h1 a, #header h1 a::before, #header h2 span, #header h2 span::before { margin: 0; padding: 0; z-index: 0; display: block; text-align: center; } #header h1 { z-index: 1; } #header h1 a::before, #header h1 a::after { content: var(--header-title); } #header h1 a::before { color: rgb(var(--swatch-text-tertiary-color)); z-index: -1; -webkit-text-stroke: 0.325rem rgb(var(--swatch-text-dark)); } #header h1 a::after { color: rgb(var(--swatch-headerh1-color)); z-index: 1; } #header h2 { z-index: 0; text-transform: uppercase; pointer-events: none; } #header h2 span { margin-top: calc(var(--header-height-on-mobile)/2 + var(--header-h1-font-size)/2 - 2em); } #header h2 span::before, #header h2 span::after { --wght: 600; content: var(--header-subtitle); position: absolute; left: 50%; transform: translateY(-50%) translateX(-50%); width: 100%; text-align: center; } #header h2 span::before { -webkit-text-stroke: 0.25rem rgb(var(--swatch-text-dark)); } #header h2 span::after { color: rgb(var(--swatch-headerh2-color)); z-index: 1; } #search-top-box form[id="search-top-box-form"]:not(:focus-within) input[type="text"] { color: rgba(0, 0, 0, 0); } @media (min-width: 36rem) { #login-status { flex-grow: 1; left: 3%; right: initial; } #login-status::before { --mask-image: none; background-color: transparent; } #login-status:not(:focus-within) { color: rgb(var(--login-line-divider-color)); -webkit-user-select: initial; -moz-user-select: initial; -ms-user-select: initial; user-select: initial; } #login-status #account-topbutton, #login-status:not(:focus-within) #account-topbutton { --clip-path: polygon( 0 0, 100% 0, 100% 100%, 0 100% ); background-color: rgba(var(--login-arrow-color), 0); } #login-status #account-topbutton::before{ --clip-path: polygon( 30% 35%, 70% 35%, 50% 60%, 50% 60% ); --mask-image: initial; content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(var(--login-arrow-color), 1); -webkit-clip-path: var(--clip-path); clip-path: var(--clip-path); } #login-status #account-topbutton::before, #login-status:not(:focus-within) #account-topbutton::before, #login-status:not(:focus-within) #account-topbutton:hover::before { --clip-path: polygon( 30% 35%, 70% 35%, 50% 60%, 50% 60% ); --mask-image: initial; } #login-status:not(:focus-within) #account-topbutton::after { display: none; } #login-status:not(:focus-within) *:not(#account-topbutton):not([href*="account/messages"]) { --clip-path: polygon( 0 0, 100% 0, 100% 100%, 0 100% ); pointer-events: all; -webkit-clip-path: var(--clip-path); clip-path: var(--clip-path); } #login-status:not(:focus-within) *:not(#account-topbutton):not(#account-options):not([href*="account/messages"]) { opacity: 1; } #login-status #my-account { --wght: 300; } #account-options { background: var(--gradient-header); } #search-top-box { top: 1.5em; right: 3%; background: rgba(var(--search-focus-textbox-bg-color), 0.4); } #search-top-box:focus-within ~ #login-status { opacity: 1; } #search-top-box::after { transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-clip-path 150ms cubic-bezier(0.4, 0, 0.2, 1); transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1), clip-path 150ms cubic-bezier(0.4, 0, 0.2, 1); transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1), clip-path 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-clip-path 150ms cubic-bezier(0.4, 0, 0.2, 1); } #search-top-box:not(:focus-within)::after { --clip-path: polygon( 0 0, 100% 0, 100% 100%, 0% 100% ); background-color: rgba(var(--search-icon-bg-color, --dark-accent), 1); -webkit-clip-path: var(--clip-path); clip-path: var(--clip-path); } #search-top-box:not(:focus-within):hover::after { --clip-path: polygon( 0 0, 100% 0, 100% 100%, 0 100% ); background-color: rgb(var(--search-icon-hover-bg-color)); } #search-top-box form[id="search-top-box-form"]:not(:focus-within) { max-width: var(--search-width); } #search-top-box form[id="search-top-box-form"]:not(:focus-within) input[type="text"] { max-width: var(--search-width); padding: 0 var(--search-height) 0 1em; outline-width: 0; background-color: rgb(var(--search-focus-textbox-bg-color), 0.35); color: rgba(var(--search-textbox-text-color), 0.4); cursor: pointer; } #search-top-box form[id="search-top-box-form"]:not(:focus-within) input[type="submit"], #search-top-box form[id="search-top-box-form"]:focus-within input[type="submit"] { pointer-events: all; border: none; } } #page-title::after, .meta-title::after, #page-title::before, .meta-title::before { content: ""; flex-grow: 1; height: 0.0625rem; background: rgb(var(--swatch-primary)); } #page-title::before, .meta-title::before { margin: auto 1.25rem auto auto; }
What this does
Makes the sidebar hidden by default and toggled via a corner button, similar to the mobile version of the site.
- Does NOT work on Sigma-9. This ONLY functions with Black Highlighter.
- Use this component by EstrellaYoshte instead if you intend to use Sigma-9.
- If you prefer, there is also a Collapsible Sidebar that functions on both BHL and Sigma-9.
The collapsible sidebar functions via hovering rather than clicking and is slightly more visible than the Toggle Sidebar.
How to use
1. Copy code below.
2. Paste in article after Black Highlighter and any other Theme include.
[[include :scp-wiki:component:toggle-sidebar-bhl]]
3. (Optional) Style toggle button if using a theme.
There are also 5 CSS Vars available to style the button if needed.
For the colors, it is heavily suggested that you use the available BHL Color Vars which can be found here.
:root {
--toggle-button-bg: hex/rgb/hsl color;
--toggle-border-color: hex/rgb/hsl color;
--toggle-border-width: px/rem/em;
--toggle-icon-color: hex/rgb/hsl color;
--toggle-roundness: percentage;
}
:root { --sidebar-width-on-desktop: calc((var(--base-font-size) * (14 / 15)) * 19); --body-width-on-desktop: 45.75rem; } @media only screen and (min-width: 48.0625rem) { #side-bar .close-menu { display: block; position: fixed; top: 0.5rem; left: 0.5rem; width: 3rem; height: 3rem; background: unset; opacity: 1; pointer-events: all; z-index: -1; } #side-bar .close-menu img { color: transparent; } #side-bar .close-menu::before, #side-bar .close-menu::after { content: ""; box-sizing: border-box; position: fixed; display: block; top: 0.5rem; left: 0.5rem; width: 3rem; height: 3rem; padding: 0; margin: 0; text-align: center; pointer-events: all; cursor: pointer; transition: opacity var(--sidebar-transition-timing); } #side-bar .close-menu::before { --mask:url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' id='Hamburger' x='0' y='0' baseProfile='tiny' overflow='visible' version='1.2' viewBox='0 0 32 32' xml:space='preserve'%3E%3Cpath d='M4 10h24c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm24 4H4c-1.1 0-2 .9-2 2s.9 2 2 2h24c1.1 0 2-.9 2-2s-.9-2-2-2zm0 8H4c-1.1 0-2 .9-2 2s.9 2 2 2h24c1.1 0 2-.9 2-2s-.9-2-2-2z'/%3E%3C/svg%3E"); z-index: -1; background-color: var(--toggle-icon-color, rgb(var(--sidebar-links-text))) !important; -webkit-mask: var(--mask); mask: var(--mask); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: 50% 50%; mask-position: 50% 50%; -webkit-mask-size: 60%; mask-size: 60%; } #side-bar .close-menu::after { z-index: -2; background-color: var(--toggle-button-bg, rgb(var(--sidebar-bg-color))) !important; border-radius: var(--toggle-roundness, 50%); border: var(--toggle-border-color, rgb(var(--sidebar-links-text))) var(--toggle-border-width, 0.25rem) solid; } #side-bar:focus-within .close-menu, #side-bar:not(:has(.close-menu:hover)):not(:focus-within):hover .close-menu { pointer-events: none; } #side-bar:focus-within .close-menu::before, #side-bar:focus-within .close-menu::after { opacity: 0; pointer-events: none; } #side-bar:not(:has(.close-menu:hover)):not(:focus-within):hover .close-menu::before, #side-bar:not(:has(.close-menu:hover)):not(:focus-within):hover .close-menu::after { opacity: 0; pointer-events: none; } #side-bar { display: block; position: fixed; top: 0; left: calc(var(--sidebar-width-on-desktop)*-1); z-index: 10; transition: left 500ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; height: 100%; overflow-y: auto; overflow-x: hidden; margin-top: 0; } #side-bar:focus-within { left: 0; } #side-bar:not(:has(.close-menu:hover)):not(:focus-within):hover { left: 0; } #side-bar .side-block { margin-top: 1rem; background-color: rgb(0, 0, 0, 0); border-radius: 0; border-left-width: 0px; border-right-width: 0px; } #main-content::before { content: ""; display: block; position: fixed; top: 0; right: 0; z-index: -1; opacity: 0; transition: opacity 500ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, width 500ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; margin-left: var(--sidebar-width-on-desktop); background: rgba(var(--swatch-menubg-black-color), .3) 1px 1px repeat; padding-right: 0; width: 100%; height: 100vh; pointer-events: none; z-index: 99; } #side-bar:focus-within ~ #main-content::before { width: calc(100% - var(--sidebar-width-on-desktop)); opacity: 1; pointer-events: all; } #side-bar:not(:has(.close-menu:hover)):not(:focus-within):hover ~ #main-content::before { width: calc(100% - var(--sidebar-width-on-desktop)); opacity: 1; pointer-events: all; } @supports (-moz-appearance:none) and (background-attachment:local) and (not (-moz-osx-font-smoothing:auto)) { #side-bar { padding: inherit; } } #content-wrap { display: flex; flex-direction: row; width: calc(100vw - (100vw - 100%)); min-height: calc(100vh - calc(var(--final-header-height-on-desktop, 10.125rem))); flex-grow: 2; height: auto; position: relative; margin: 0 auto; max-width: inherit; } #main-content { width: 100%; position: initial; max-height: 100%; padding: 2rem 1rem; max-width: var(--body-width-on-desktop, 45.75rem); margin: 0 auto; } #page-content { max-width: min(90vw, var(--body-width-on-desktop, 45.75rem)); } @supports (-webkit-hyphens:none) { #side-bar { transition: left 500ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, padding-right 500ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, background-color 500ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; padding-right: 0; background-color: rgb(0, 0, 0, 0); pointer-events: all; overflow-x: visible; overflow-y: visible; z-index: 999; } #side-bar::-webkit-scrollbar { opacity: 0; -webkit-transition: opacity 500ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; transition: opacity 500ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; } #side-bar .close-menu::before { z-index: 999; } #side-bar .close-menu::after { z-index: 998; } #side-bar:hover .close-menu::before, #side-bar:hover .close-menu::after { opacity: 0; } #side-bar:hover { left: 0; background-color: rgba(var(--swatch-menubg-color), 1); padding-right: 0; } #side-bar:hover::-webkit-scrollbar { opacity: 1; } #side-bar:hover~#main-content::before { width: calc(100% - var(--sidebar-width-on-desktop)); opacity: 1; pointer-events: all; } } }
This is a component that animates the ACS header upon loading.
How to use:
Put this in anywhere in the article:
[[include :scp-wiki:component:acs-animation]]
And you're done!
Example: SCP-5935
Note:
- Two variables, --timeScale and --timeDelay, control the timings of the animation. For example:
[[module CSS]]
:root {
--timeScale: 2;
--timeDelay: 0.5s;
}
[[/module]]
--timeScale slows down the entire animation by a factor of 2, and --timeDelay delays the starting point of the animation by half a second. Default values are 1 and 0s, respectively.
To change the default values, put the above after the [[include]]. --timeDelay is recommended if the ACS isn't the first content element, or you're using it in conjunction with other animation modules (a la Fade In.)
- Likely incompatible with other types of ACS headers*.
*To use with PeppersGhost's ACS Lite, add the following patch after the [[include]]:
[[module CSS]]
/*-- ACS Lite Animation Compatibility Patch --*/
.anom-bar > .bottom-box::before { display: none; }
.anom-bar > .bottom-box { box-shadow: none!important; }
div.diamond-part { clip-path: none; animation: none; box-shadow: none!important; }
@media (max-width: 480px) {
div.top-right-box { clip-path: polygon(0% -30%, 100% -30%, 100% 130%, 0% 130%); }
}
[[/module]]
- Inspired by the works of AnAnomalousWriter.
Source Code:
:root { --timeScale: 1; --timeDelay: 0s; } /* Converting middle divider from box-shadow to ::before pseudo-element */ .anom-bar > div.bottom-box { box-shadow: none; position: relative; } .anom-bar > div.bottom-box::before { position: absolute; content: " "; width: 100%; height: 0.5rem; bottom: 100%; left: 0; background-color: rgb(var(--swatch-menubg-black-color, 12, 12, 12)); } /* DIVIDER */ .anom-bar > .bottom-box::before { animation-name: divider; animation-duration: calc(0.74s * var(--timeScale)); animation-delay: calc(0.1s * var(--timeScale) + var(--timeDelay)); animation-iteration-count: 1; animation-timing-function: cubic-bezier(.32,.38,.39,.94); animation-fill-mode: backwards; } /* CLASSIFIED LEVEL BARS */ div.top-center-box > * { animation-name: bar; animation-duration: calc(0.45s * var(--timeScale)); animation-iteration-count: 1; animation-timing-function: ease-out; animation-fill-mode: backwards; } div.top-center-box > :nth-child(1) { animation-delay: calc(0.2s * var(--timeScale) + var(--timeDelay)); } div.top-center-box > :nth-child(2) { animation-delay: calc(0.32s * var(--timeScale) + var(--timeDelay)); } div.top-center-box > :nth-child(3) { animation-delay: calc(0.45s * var(--timeScale) + var(--timeDelay)); } div.top-center-box > :nth-child(4) { animation-delay: calc(0.61s * var(--timeScale) + var(--timeDelay)); } div.top-center-box > :nth-child(5) { animation-delay: calc(0.75s * var(--timeScale) + var(--timeDelay)); } div.top-center-box > :nth-child(6) { animation-delay: calc(0.95s * var(--timeScale) + var(--timeDelay)); } /* TOP TEXT */ div.top-left-box, div.top-right-box { clip-path: polygon( 0% -50%, 150% -50%, 150% 100%, 0% 100%); } div.top-left-box > *, div.top-right-box > * { position: relative; animation-name: bottomup; animation-duration: calc(0.65s * var(--timeScale)); animation-delay: calc(0.5s * var(--timeScale) + var(--timeDelay)); animation-iteration-count: 1; animation-timing-function: ease-out; animation-fill-mode: backwards; } /*-----------------------------------*/ /*-----------------------------------*/ /* CONTAINMENT, DISRUPTION, RISK CLASSES */ div.text-part > * { clip-path: polygon( 0% 0%, 100% 0%, 100% 100%, 0% 100%); animation-name: expand2; animation-duration: calc(0.5s * var(--timeScale)); animation-iteration-count: 1; animation-timing-function: cubic-bezier(.12,.41,.27,.99); animation-fill-mode: backwards; } div.text-part > :nth-child(1) { animation-name: expand1; } div.text-part > :nth-child(1) { animation-delay: calc(0.6s * var(--timeScale) + var(--timeDelay)); } div.text-part > :nth-child(2) { animation-delay: calc(0.75s * var(--timeScale) + var(--timeDelay)); } div.text-part > :nth-child(3) { animation-delay: calc(0.86s * var(--timeScale) + var(--timeDelay)); } div.main-class::before, div.main-class::after { animation-name: iconslide; animation-duration: calc(0.45s * var(--timeScale)); animation-delay: calc(0.8s * var(--timeScale) + var(--timeDelay)); animation-iteration-count: 1; animation-timing-function: cubic-bezier(.12,.41,.27,.99); animation-fill-mode: backwards; } /* BOTTOM TEXT */ div.main-class > *, div.disrupt-class > *, div.risk-class > * { white-space: nowrap; animation-name: flowIn; animation-duration: calc(0.42s * var(--timeScale)); animation-delay: calc(0.75s * var(--timeScale) + var(--timeDelay)); animation-iteration-count: 1; animation-timing-function: ease-out; animation-fill-mode: backwards; } /*-----------------------------------*/ /*-----------------------------------*/ /* DIAMOND */ div.arrows { animation-name: arrowspin; animation-duration: calc(0.65s * var(--timeScale)); animation-delay: calc(0.55s * var(--timeScale) + var(--timeDelay)); animation-iteration-count: 1; animation-timing-function: cubic-bezier(.12,.41,.27,.99); animation-fill-mode: backwards; } div.quadrants > * { animation-name: fade; animation-duration: calc(0.3s * var(--timeScale)); animation-delay: calc(1.4s * var(--timeScale) + var(--timeDelay)); animation-iteration-count: 1; animation-timing-function: cubic-bezier(.12,.41,.27,.99); animation-fill-mode: backwards; } div.top-icon, div.right-icon, div.left-icon, div.bottom-icon { animation-name: nodegrow; animation-duration: calc(0.4s * var(--timeScale)); animation-delay: calc(1.4s * var(--timeScale) + var(--timeDelay)); animation-iteration-count: 1; animation-timing-function: cubic-bezier(.12,.41,.27,.99); animation-fill-mode: backwards; } .bottom-box > div.diamond-part { box-shadow: none; } .bottom-box > div.diamond-part::before { content: ""; position: absolute; width: 0.5rem; height: 100%; top: 0; right: 100%; background-color: rgb(var(--swatch-menubg-black-color, 12, 12, 12)); animation-name: diamondBorder; animation-duration: calc(0.475s * var(--timeScale)); animation-delay: calc(0.775s * var(--timeScale) + var(--timeDelay)); animation-iteration-count: 1; animation-timing-function: cubic-bezier(.28,.72,.55,.91); animation-fill-mode: backwards; } /* MOBILE QUERY */ @media (max-width: 480px ) { .anom-bar > div.bottom-box { position: initial; } .anom-bar > div.bottom-box::before { bottom: initial; top: 40vw; } div.top-center-box > * { animation-name: bar-mobile; animation-duration: calc(0.9s * var(--timeScale)); } div.top-center-box > :nth-child(1) { animation-delay: calc(0.1s * var(--timeScale) + var(--timeDelay)); } div.top-center-box > :nth-child(2) { animation-delay: calc(0.2s * var(--timeScale) + var(--timeDelay)); } div.top-center-box > :nth-child(3) { animation-delay: calc(0.3s * var(--timeScale) + var(--timeDelay)); } div.top-center-box > :nth-child(4) { animation-delay: calc(0.4s * var(--timeScale) + var(--timeDelay)); } div.top-center-box > :nth-child(5) { animation-delay: calc(0.5s * var(--timeScale) + var(--timeDelay)); } div.top-center-box > :nth-child(6) { animation-delay: calc(0.6s * var(--timeScale) + var(--timeDelay)); } } /*--- Motion Accessibility ---*/ @media screen and (prefers-reduced-motion: reduce) { div.anom-bar-container { --timeScale: 0!important; } } /*-------------------------*/ @keyframes divider { from { max-width: 0%; } to { max-width: 100%; } } @keyframes bar { from { max-width: 0%; } to { max-width: 100%; } } @keyframes bar-mobile { from { max-height: 0%; } to { max-height: 100%; } } @keyframes bottomup { from { top: 100px; } to { top: 0; } } @keyframes expand1 { from { opacity: 0; clip-path: inset(0 calc(100% - 0.75rem) 0 0); } to { opacity: 1; clip-path: inset(0); } } @keyframes iconslide { from { opacity: 0; transform: translateX(-5rem); } to { opacity: 1; transform: translateX(0); } } @keyframes expand2 { from { opacity: 0; width: 1%; } to { opacity: 1; width: calc(100% - 0.25rem); } } @keyframes fade { from { opacity: 0; } to { opacity: 1; } } @keyframes flowIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @keyframes arrowspin { from { clip-path: circle(0%); transform: rotate(135deg); } to { clip-path: circle(75%); transform: rotate(0deg); } } @keyframes nodegrow { from { transform: scale(0);} to { transform: scale(1);} } @keyframes diamondBorder { from { height: 0; } to { height: 100%; } }
What this is
A component that makes everything on the page smoothly fade in, instead of appearing instantly when the page loads. The fade can be staggered, with each thing on the page appearing one by one instead of all at once.
⚠️ Warning: This component can present a hostile reading experience for some users, especially when staggered. I recommend not using this component, and advising other authors to do the same.
⛔️ Not suitable for: Any page where the reader might not start at the top of the page, e.g. hubs or any page with a table of contents.
Usage
On any wiki:
[[include :scp-wiki:component:fade-in speed=1]]
speed=1: everything appears at the same time
speed=2: everything appears 0.2s after the last thing (not recommended)
speed=3: everything appears 0.1s after the last thing (not recommended)
Caveats
The fade-in effect will only apply to elements that are direct children of #page-content. It won't apply to nested elements (e.g. stuff inside a blockquote or a div) or other parts of the page (e.g the sidebar).
(You can use this to your advantage if there are other animations on your page that would conflict (e.g ACS Animation) by simply wrapping the problematic animated element in a div.)
To alleviate the negative impact on readers, the fade in animation only applies to the first 15 elements on the page, and everything else after that will appear at the same time.
Removing from other themes
Some CSS themes bundle Fade In by default (BLANKSTYLE CSS, Flopstyle: LITE, Foxtrot Theme and Queerstyle CSS at the time of writing). If you'd like to use those themes without Fade In, you can disable it with the following:
[[module CSS]]
:root {
--fade-in: none;
}
[[/module]]
Source code
:where(:root) { --fade-in: fadeIn; --fade-in-delay: 0s; } /* Disable for hub pages, due to the reader being likely to want to start reading elsewhere than the top of the page */ :root:has(#page-tags a[href*=hub]), /* Disable for pages with a table of contents, as the user is likely to jump directly to where they want to start reading */ :root:has(#toc) { --fade-in: none !important; } @media (prefers-reduced-motion: no-preference) { :where(#page-title, #breadcrumbs, #page-content > *) { animation-name: var(--fade-in); animation-duration: 0.8s; animation-iteration-count: 1; animation-timing-function: ease-out; animation-fill-mode: backwards; } } :where(#page-title) { animation-delay: 0s; } @keyframes fadeIn { from { opacity: 0; transform: translate(0,30px); } to { opacity: 1; transform: translate(0,0); } } :where(#page-content > :nth-child(1)) { animation-delay: calc(1 * var(--fade-in-delay)); } :where(#page-content > :nth-child(2)) { animation-delay: calc(2 * var(--fade-in-delay)); } :where(#page-content > :nth-child(3)) { animation-delay: calc(3 * var(--fade-in-delay)); } :where(#page-content > :nth-child(4)) { animation-delay: calc(4 * var(--fade-in-delay)); } :where(#page-content > :nth-child(5)) { animation-delay: calc(5 * var(--fade-in-delay)); } :where(#page-content > :nth-child(6)) { animation-delay: calc(6 * var(--fade-in-delay)); } :where(#page-content > :nth-child(7)) { animation-delay: calc(7 * var(--fade-in-delay)); } :where(#page-content > :nth-child(8)) { animation-delay: calc(8 * var(--fade-in-delay)); } :where(#page-content > :nth-child(9)) { animation-delay: calc(9 * var(--fade-in-delay)); } :where(#page-content > :nth-child(10)) { animation-delay: calc(10 * var(--fade-in-delay)); } :where(#page-content > :nth-child(11)) { animation-delay: calc(11 * var(--fade-in-delay)); } :where(#page-content > :nth-child(12)) { animation-delay: calc(12 * var(--fade-in-delay)); } :where(#page-content > :nth-child(13)) { animation-delay: calc(13 * var(--fade-in-delay)); } :where(#page-content > :nth-child(14)) { animation-delay: calc(14 * var(--fade-in-delay)); } :where(#page-content > :nth-child(15)) { animation-delay: calc(15 * var(--fade-in-delay)); } :where(#page-content > :nth-child(n+15)) { animation-delay: calc(16 * var(--fade-in-delay)); }
:where(:root) { --fade-in-delay: 0.2s; }
:where(:root) { --fade-in-delay: 0.1s; }






