Skip to content

Add class to P elements (or others) that start with punctuation #20

@jpamental

Description

@jpamental

Thinking of this as a way to handle hanging punctuation in as abstracted a way as possible. Perhaps something like this:

Define classes that follow the (not yet implemented anywhere) spec as outlined here:
https://css-tricks.com/almanac/properties/h/hanging-punctuation/

So, for a paragraph that begins with double quotation marks, this might be added:

class="beginswith-dq"

or if it's single quotation marks:

class="beginswith-sq"

And if it ends with double quotation marks:

class="endswith-dq"

These could be added wherever necessary, so if it's a quote in a paragraph on its own you might have:

class="beginswith-dq endswith-dq"

There are likely a relatively small number of punctuation marks to consider. I think they should be referenced specifically thought because if you were using CSS to hang the punctuation nicely you would want to only bring it back out a small amount for a single quote and slightly larger amount for double quotes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions