RSO Component

NOTICE:

This is a component page used internally by the SCP Wiki. It is intended to be used and included on other pages.

This component makes everything on the page smoothly fade in, instead of appearing instantly when the page loads.

There's not really any reason to use it and in most cases it makes the page feel a bit pretentious, but if that's what you're looking for, this may be the component for you.

The fade-in effect is applied directly to the contents of the page), the page title, and breadcrumbs. It won't apply to other parts of the page e.g. the sidebar or the header.

Usage

[[include :scp-wiki:component:fade-in]]

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

/* https://scp-wiki.wikidot.com/component:fade-in */
 
:where(:root) {
  --fade-in: fadeIn;
}
 
@media (prefers-reduced-motion: no-preference) {
  :where(#page-title, #breadcrumbs, #page-content) {
    animation-name: var(--fade-in);
    animation-duration: 0.5s;
    animation-iteration-count: 1;
    animation-timing-function: ease-out;
    animation-fill-mode: backwards;
  }
}
 
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(0,15px);
  }
  to {
    opacity: 1;
    transform: translate(0,0);
  }
}
rating: +39+–x

On any wiki:

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

This is a component I use to easily change the formatting on all my articles. I update it all the time according to my tastes and what I want my articles to look like. If you use it and it breaks your page, I am not responsible.

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