diff --git a/files/en-us/web/css/text-emphasis-position/index.md b/files/en-us/web/css/text-emphasis-position/index.md index d7f6dbd9c21701f..c1282c07baf0d91 100644 --- a/files/en-us/web/css/text-emphasis-position/index.md +++ b/files/en-us/web/css/text-emphasis-position/index.md @@ -7,7 +7,7 @@ browser-compat: css.properties.text-emphasis-position {{CSSRef}} -The **`text-emphasis-position`** [CSS](/en-US/docs/Web/CSS) property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. +The **`text-emphasis-position`** [CSS](/en-US/docs/Web/CSS) property sets where emphasis marks are drawn. Similar to the text rendered by the [``](/en-US/docs/Web/HTML/Element/ruby) HTML element, if there isn't enough room for emphasis marks, the line height is increased. {{EmbedInteractiveExample("pages/css/text-emphasis-position.html")}} @@ -15,14 +15,19 @@ The **`text-emphasis-position`** [CSS](/en-US/docs/Web/CSS) property sets where ```css /* Initial value */ -text-emphasis-position: over right; +text-emphasis-position: auto; + +/* Keyword values */ +text-emphasis-position: over; +text-emphasis-position: under; -/* Keywords value */ +text-emphasis-position: over right; text-emphasis-position: over left; text-emphasis-position: under right; text-emphasis-position: under left; text-emphasis-position: left over; +text-emphasis-position: right over; text-emphasis-position: right under; text-emphasis-position: left under; @@ -36,6 +41,14 @@ text-emphasis-position: unset; ### Values +The property accepts one or two values: + +If only one value is provided, it can be `auto`, `over`, or `under`. When only `over` or `under` is used, `right` is assumed as the default position. + +If two values are provided, they must include one of `over` or `under`and one of `right` or `left`. Their order does not matter. + +- `auto` {{Experimental_Inline}} + - : Draws marks over the text in horizontal writing mode and to the right of the text in vertical writing mode. - `over` - : Draws marks over the text in horizontal writing mode. - `under` @@ -116,7 +129,95 @@ The preferred position of emphasis marks depends on the language. In Japanese fo {{csssyntax}} -## Examples +### Adding emphasis mark positions + +Use the drop down menu to change the position of the emphasis marks. This will change the class on the `
` element, which in turn, will update the position of the emphasis marks on the text. + +#### HTML + +```html hidden +

The auto value is not supported in your browser.

+