<header class="header">
  <div class="header__title">
  <div class="header__reference">
    <ul class="reference-list">
      <li><a class="reference-list__link" href="https://developer.mozilla.org/en-US/docs/Web/CSS/:not">MDN reference</a></li>
      <li><a class="reference-list__link" href="https://caniuse.com/#feat=mdn-css_selectors_not">caniuse Support</a></li>

  <div class="example">
      In this example we are using the <code>not()</code> selector to apply a yellow outline to anything that is <strong>not</strong> a <code>p</code> element in the demo area. Notice that the selector targets not only each list item in the <code>ul</code> element, but also the <code>ul</code> element itself:
    <div class="example__demo example__demo--not">
        Oranges are round, orange-colored fruit that grow on trees. There are many different kinds of oranges, including: 
        <li>Cara Cara</li>
        Oranges are a commonly available source of Vitamin C, and last longer than many other fruits when stored. They are easy to transport because each orange comes in its own tough skin which acts as a container.
        alt="A basket of oranges sitting in a red crate."
        src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/11907/naomi-koelemans-633994-unsplash.jpg" />
      <p>Orange description taken from <a href="https://simple.m.wikipedia.org/wiki/Orange_(fruit)">Simple English Wikipedia</a>.

      <small>Photo by <a href="https://unsplash.com/photos/QI5nFAUXWvM">Naomi Koelemans</a> on <a href="https://unsplash.com/">Unsplash</a>.</small>
// Demo
.example__demo--not :not(p) {
  outline: 0.25em solid var(--color-sand);

// Pen Setup
.example__demo--not {  
  ul {
    color: var(--color-cinder);
  img {
    height: auto;
    margin-top: var(--size-epsilon);
    width: 100%;
View Compiled
Run Pen

External CSS

  1. https://codepen.io/ericwbailey/pen/vMXWgz.scss

External JavaScript

This Pen doesn't use any external JavaScript resources.