title: Creating a box-shadow offset without additional elements or double box-shadows
body: <p>Is there any way to give a box-shadow an offset without using <code>:before</code> and <code>:after</code> (and, of course, additional elements) like this (which would cost the usage of at least one pseudo-element, and I don't want that):</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    background: #34495e;
  }
  
  div {
    position: relative;
    width: 8px;
    height: 8px;
    background: #3498db;
  }
  
  div::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #e74c3c;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>...and without using a double box-shadow which would require the knowledge of the background-color as otherwise there would be a non-transparent gap:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    background: #34495e;
  }
  
  div {
    position: relative;
    width: 8px;
    height: 8px;
    background: #3498db;
    box-shadow: 0 0 0 1px white, 0 0 0 3px #e74c3c;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>