Skip to main content
Dublin Library

The Publishing Project

Hanging punctuation in CSS

 

Chris Coyuer wrote about the hanging punctuation CSS property, how it works and why it may be useful.

This property controls the pulling of characters, usually quotation marks, from the body of the text.

Officially, only Safari supports the feature so we need feature queries to make sure this works as the intended enhancement it is.

We check if the browser supports the feature and then provide code using the feature along with any other relevant code.

@​supports (hanging-punctuation: first) {
  blockquote {
    text-indent: 0;
    hanging-punctuation: first;
  }
}

Edit on Github