quotes

The quotes property in CSS allows you to specify which types of quotes are used when quotes are added via the content: open-quote; or content: close-quote; rules. Here’s how to use it:q {

quotes: "“" "”" "‘" "’";

}

q::before {

content: open-quote;

}

q::after {

content: close-quote;

}

In the example above, four values are added. A set of double smart quotes and a pair of single smart quotes. It’s slightly confusing as each quote is wrapped in quotes – but those are just programmatic quotes (could be double (“) or single (‘)) as anywhere else in CSS. The quotes inside are what will be used on the page.

There are four values for the content property that relate to the quotes property: open-quote, close-quote, no-open-quote, and no-close-quote.

The first pair of quotes in the value are the opening and closing quotes. The second pair are the opening and closing quotes for quotes nested one level deep within other quotes that also use the quotes property. E.g. a element inside of a element.

Double quotes on the first quote, single quotes on the second.

You can place as many pairs of quotes in the quotes property as you like. But you don’t have to put more than two, because for every extra quote it simply repeats the quotes values from the beginning.

The no-open-quote and no-close-quote values stop the quotes from displaying, but they continue to increment the quote depth. More InformationDon’t use the element unless you’re quoting someone. In all other cases (irony, sarcasm, or whatever else you use quotes for) simply use the quotation marks themselves (like these: “ ”).This isn’t just for the element, it could be

too or anything else. Quotes & AccentsRelated Propertiescontent::before / ::afterOther ResourcesCSS2 specCSS2 content specMDNSemantics of the `q` element, on the HTML DoctorBrowser SupportChromeSafariFirefoxOperaIEAndroidiOS11+Any1.5+4+8+AnyAny

Tidak ada komentar:

Posting Komentar

Love Quotes and meaning of love

Love isn't about honesty. It's about protecting the people you love from things that will hurt them. - Simone Elkeles You know...