title: Adding CSS class on pseudo-element
body: <p>I was wondering if there's a way to add a CSS class to pseudo-elements, such as :after.</p>
  
  <p>I want to use :after to append an error message.  I also want the error message styled the same way as the other error messages.</p>
  
  <p>This works:</p>
  
  <pre><code>.error:after {
    content: "Error Message";
    color: red;
  }
  </code></pre>
  
  <p>But can I do something like this to add more than the color styling?:</p>
  
  <pre><code>.error:after {
    content: "Error Message";
    class: error_message_styles;
  }
  </code></pre>
  
  <p>Also, is there a difference between using "::after" vs ":after"?</p>
  
  <p>Thanks in advance!</p>