breakpoint.overview.html.twig

Same filename in other branches
  1. 9 core/modules/help_topics/help_topics/breakpoint.overview.html.twig
  2. 8.9.x core/modules/help_topics/help_topics/breakpoint.overview.html.twig
  3. 10 core/modules/breakpoint/help_topics/breakpoint.overview.html.twig
---
label: 'Managing height, width, and resolution breakpoints'
related:
  - core.appearance
---
<h2>{% trans %}What are breakpoints?{% endtrans %}</h2>
<p>{% trans %}Breakpoints are the point at which your site's content will respond to provide the user with the best possible layout to consume the information. A breakpoint separates the height or width of viewports (screens, printers, and other media output types) into steps. For instance, a width breakpoint of 40em creates two steps: one for widths up to 40em and one for widths above 40em. Breakpoints can be used to define when layouts should shift from one form to another, when images should be resized, and other changes that need to respond to changes in viewport height or width.{% endtrans %}</p>
<h2>{% trans %}What are media queries?{% endtrans %}</h2>
<p>{% trans %}Media  queries are a formal way to encode breakpoints. For instance, a width breakpoint at 40em would be written as the media query "(min-width: 40em)". Breakpoints are really just media queries with some additional meta-data, such as a name and multiplier information.{% endtrans %}</p>
<h2>{% trans %}What are resolution multipliers?{% endtrans %}</h2>
<p>{% trans %}Resolution multipliers are a measure of the viewport's device resolution, defined to be the ratio between the physical pixel size of the active device and the <a href="http://en.wikipedia.org/wiki/Device_independent_pixel">device-independent pixel</a> size. The Breakpoint module defines multipliers of 1, 1.5, and 2; when defining breakpoints, modules and themes can define which multipliers apply to each breakpoint.{% endtrans %}</p>
<h2>{% trans %}What is a breakpoint group?{% endtrans %}</h2>
<p>{% trans %}Breakpoints can be organized into groups. Modules and themes should use groups to separate out breakpoints that are meant to be used for different purposes, such as breakpoints for layouts or breakpoints for image sizing.{% endtrans %}</p>
<h2>{% trans %}Managing breakpoints and breakpoint groups overview{% endtrans %}</h2>
<p>{% trans %}The <em>Breakpoint</em> module allows you to define breakpoints and breakpoint groups in YAML files. Modules and themes can use the API provided by the <em>Breakpoint</em> module to define breakpoints and breakpoint groups, and to assign resolution multipliers to breakpoints.{% endtrans %}
</p>
<h2>{% trans %}Additional resources{% endtrans %}</h2>
<ul>
  <li><a href="https://www.drupal.org/documentation/modules/breakpoint">{% trans %}Working with breakpoints in Drupal{% endtrans %}</a></li>
  <li><a href="https://www.w3.org/TR/css3-mediaqueries/">{% trans %}W3C standards for media queries{% endtrans %}</a></li>
</ul>

File

core/modules/breakpoint/help_topics/breakpoint.overview.html.twig

View source
  1. ---
  2. label: 'Managing height, width, and resolution breakpoints'
  3. related:
  4. - core.appearance
  5. ---
  6. <h2>{% trans %}What are breakpoints?{% endtrans %}</h2>
  7. <p>{% trans %}Breakpoints are the point at which your site's content will respond to provide the user with the best possible layout to consume the information. A breakpoint separates the height or width of viewports (screens, printers, and other media output types) into steps. For instance, a width breakpoint of 40em creates two steps: one for widths up to 40em and one for widths above 40em. Breakpoints can be used to define when layouts should shift from one form to another, when images should be resized, and other changes that need to respond to changes in viewport height or width.{% endtrans %}</p>
  8. <h2>{% trans %}What are media queries?{% endtrans %}</h2>
  9. <p>{% trans %}Media queries are a formal way to encode breakpoints. For instance, a width breakpoint at 40em would be written as the media query "(min-width: 40em)". Breakpoints are really just media queries with some additional meta-data, such as a name and multiplier information.{% endtrans %}</p>
  10. <h2>{% trans %}What are resolution multipliers?{% endtrans %}</h2>
  11. <p>{% trans %}Resolution multipliers are a measure of the viewport's device resolution, defined to be the ratio between the physical pixel size of the active device and the <a href="http://en.wikipedia.org/wiki/Device_independent_pixel">device-independent pixel</a> size. The Breakpoint module defines multipliers of 1, 1.5, and 2; when defining breakpoints, modules and themes can define which multipliers apply to each breakpoint.{% endtrans %}</p>
  12. <h2>{% trans %}What is a breakpoint group?{% endtrans %}</h2>
  13. <p>{% trans %}Breakpoints can be organized into groups. Modules and themes should use groups to separate out breakpoints that are meant to be used for different purposes, such as breakpoints for layouts or breakpoints for image sizing.{% endtrans %}</p>
  14. <h2>{% trans %}Managing breakpoints and breakpoint groups overview{% endtrans %}</h2>
  15. <p>{% trans %}The <em>Breakpoint</em> module allows you to define breakpoints and breakpoint groups in YAML files. Modules and themes can use the API provided by the <em>Breakpoint</em> module to define breakpoints and breakpoint groups, and to assign resolution multipliers to breakpoints.{% endtrans %}
  16. </p>
  17. <h2>{% trans %}Additional resources{% endtrans %}</h2>
  18. <ul>
  19. <li><a href="https://www.drupal.org/documentation/modules/breakpoint">{% trans %}Working with breakpoints in Drupal{% endtrans %}</a></li>
  20. <li><a href="https://www.w3.org/TR/css3-mediaqueries/">{% trans %}W3C standards for media queries{% endtrans %}</a></li>
  21. </ul>

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.