module.exports = { id: 'text-highlighting', title: 'Text highlighting', keywords: [`mark`, `highlight`, `text highlighting`, `tag`, `primary`, `secondary`, `tertiary`, `inline-block`], description: `
The native HTML5 mark element has been minimally styled to allow for easy text highlighting.
`, example: `This is a paragraph with some highlighted text.
`, samples: [`<p>This is some <mark>highlighted text</mark>.</p>
`],
notes: [
`Highlighted text scales according to its parent element, so it can be used inside any kind of element (headings, forms, paragraphs etc.).`
],
customization: [
`Text color for highlighted text can be changed by changing the value of the --mark-fore-color
variable.`,
`Background color for highlighted text can be changed by changing the value of the --mark-back-color
variable.`,
`Universal padding for elements can be changed globally by changing the value of the --universal-padding
variable.`,
`Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius
variable.`
],
modifiers: [
{
title : 'Color variants',
description: 'You can change the color of highlighted text, based on context by applying the appropriate class (secondary - .secondary
or tertiary - .tertiary
).
This is a secondary highlight and this is a tertiary highlight.
`, samples: [`<p>This is a <mark class="secondary">secondary highlight</mark> and this is a <mark class="tertiary">tertiary highlight</mark>.</p>
`]
},
{
title : 'Style variants',
description: `You can make highlights look like tags (.tag
) or display as inline blocks (.inline-block
), by applying the appropriate class.
This is a highlight styled as a tag.
This is some highlighted text that is displayed as an inline block.
`, samples: [`<p>This is a highlight styled as a <mark class="tag">tag</mark>.</p> <p><mark class="inline-block">This is some highlighted text that is displayed as an inline block.</mark></p>`] } ], dos: [{ description: `You can nest a highlight inside another one, if the outer one is displayed as an inline-block.`, sample: `
<mark class="inline-block"><mark class="secondary">Secondary highlight</mark> inside a inline block.</mark>
`
}],
donts: [
{
description: `Avoid applying multiple color modifiers on the same highlight.`,
sample: `<mark class="primary inverse">Highlight</mark>
`
}
]
}