Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                  <link rel="preconnect" href="">
  <link rel="preconnect" href="" crossorigin>
  <link href=";900&display=swap" rel="stylesheet">

    <h1>CSS Color Aberration Effect</h1>
    <h3>With Print Paper Simulation</h3>
    <h2>Stop squinting!</h2>
    <h1>Here it is on a</h1>
    <h2>Light background</h2>
    <h3>With a dark font color</h3>
    <h1>And here without the</h1>
    <h2>Paper Simulation</h2>
    <h3>Just a solid background</h3>



                @mixin aberration($size: 0.05rem) {
  --aberration-offset: #{$size};
  --aberration-bleed: var(--override-aberration-bleed, 0.05rem);
  --aberration-opacity: var(--override-aberration-opacity, 0.6);
    calc(var(--aberration-offset) * 2) 0 var(--aberration-bleed) rgba(0, 0, 255, var(--aberration-opacity)),
    calc(-1 * var(--aberration-offset)) var(--aberration-offset) var(--aberration-bleed) rgba(255,0,255, var(--aberration-opacity)), 
    calc(-1 * var(--aberration-offset)) calc(-1 * var(--aberration-offset)) var(--aberration-bleed) rgba(0, 255, 0, var(--aberration-opacity)),
    calc(-1.5 * var(--aberration-offset)) calc(-0.5 * var(--aberration-offset)) var(--aberration-bleed) rgba(var(--color), calc(var(--aberration-opacity) / 2)),
    calc(1.5 * var(--aberration-offset)) calc(0.5 * var(--aberration-offset)) var(--aberration-bleed) rgba(var(--color), calc(var(--aberration-opacity) / 2));

html, body {
  padding: 0;
  margin: 0;

body {
  background-color: #222;
  display: flex;
  align-items: stretch;
  align-content: stretch;
  height: 100vh;
  justify-content: center;
  justify-items: stretch;
  flex-wrap: wrap;
  flex-direction: row;

main, footer, aside {
  --override-aberration-opacity: 0.6;
  --color: 247, 247, 225; //must be rgb color string
  display: flex;
  flex-basis: 100%;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: relative;
  padding: 1rem 0;
main, footer {
  &::before {
    content: "";
    position: absolute;
    display: flex;
    inset: 0;
    mix-blend-mode: overlay;
    z-index: 3;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 150 150' xmlns=''%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='6' numOctaves='6' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
    background-repeat: repeat;

footer {
  --override-aberration-opacity: 0.3; //light backgrounds need less aberration
  --override-aberration-bleed: 0.08rem; //and some more bleed
  --color: 46, 46, 38; //must be rgb color string
  background-color: #f7f7f5;

h1, h2, h3 {
  text-transform: uppercase;
  display: flex;
  font-size: 2rem;
  letter-spacing: .025ex;
  font-family: 'Roboto', sans-serif;
  color: rgba(var(--color), 1);
  margin: 0;
  z-index: 1;
  @include aberration();


h2, h3 {
  font-size: 3.5rem;
h2 {
  font-weight: normal;