theking2
theking2

Reputation: 2803

Quotation marks for Swiss text

For a Swiss website in need the proper quotation marks to be set for <q> tagged content for Swiss, German and French language. The HTML

<!DOCTYPE html>
<html lang="de-CH">
...
<p>Lorem <q>ipsum</q> dolor sit amet</p>

the styles

q[lang="de-CH"] {
  quotes: '«' '»' '‹' '›';
}

The quotes used (Edge) are and which are the default German quotations not the specified Swiss one's. If I add lang="de-CH" to <q> it does work but I do not want to specify this in the text, it should take it from the <html lang setting. Is there a way to do this?

Upvotes: 0

Views: 93

Answers (1)

Fabrizio Calderan
Fabrizio Calderan

Reputation: 123377

The block then should be

html[lang="de-CH"] q {
  quotes: '«' '»' '‹' '›';
}

so you change the quotes for q when html has lang=de-CH. (the html part may be omitted so to decrease the specificity of the selector)

Upvotes: 1

Related Questions