module.exports = { id: 'visibility-helpers', title: 'Visibility helpers', keywords: ['hidden', 'visibility', 'visually-hidden', 'accessibility', 'utility'], description: '

You can use visibility helper classes to hide elements for all users (.hidden) or for users not on screen readers (.visually-hidden). There are also responsive visibility helpers provided, for hiding or visually hiding content only for specific screen sizes (.hidden-sm, .hidden-md, .hidden-lg and .visually-hidden-sm, .visually-hidden-md and .visually-hidden-lg respectively).

', example: '', samples: [`
<p class="hidden">Not visible for any users.</p>
<p class="visually-hidden">Visible only for screen readers.</p>
<p class="hidden-sm">Not visible for users on screens under 768px wide.</p>
<p class="hidden-md">Not visible for users on screens 768px-1280px wide.</p>
<p class="hidden-lg">Not visible for users on screens wider than 1280px.</p>
<p class="visually-hidden-sm">Visible only for screen readers under 768px wide.</p>
<p class="visually-hidden-md">Visible only for screen readers 768px-1280px wide.</p>
<p class="visually-hidden-lg">Visible only for screen readers wider than 1280px.</p>
`], notes: [ 'Visibility helpers use !important declarations to override any other styles, so exercise caution when using them.', 'The specific breakpoints for small, medium and large screen sizes are as follows:', 'Responsive visibility helper classes are independent, meaning that hiding or visually hiding an element in one screen size will not affect its visibility in any other screen size.' ], customization: [], modifiers: [], dos: [ { description: `You can apply multiple responsive visibility helpers on the same element.`, sample: `
<p class="hidden-sm hidden-md">Not visible for users on screens under 1280px wide.</p>
` } ], donts: [ { description: `Avoid combining .hidden and .visually-hidden or responsive helpers for the same screen size.`, sample: `
<p class="hidden visually-hidden">Do not do this.</p>
` } ] }