diff options
author | catch <catch@35733.no-reply.drupal.org> | 2022-03-22 11:31:39 +0000 |
---|---|---|
committer | catch <catch@35733.no-reply.drupal.org> | 2022-03-22 11:31:39 +0000 |
commit | 5c0c49a712c79c626911a4d2d0f57c31a0035c5b (patch) | |
tree | 5a233c81a92df679d36d5ce323395c3e762c9244 /core/modules/breakpoint | |
parent | 6b2eabf4714416ad4d7f46d37c0d49172f27390c (diff) | |
download | drupal-5c0c49a712c79c626911a4d2d0f57c31a0035c5b.tar.gz drupal-5c0c49a712c79c626911a4d2d0f57c31a0035c5b.zip |
Issue #3267870 by heddn, Fabianx: Order image mappings by breakpoint ID and numeric multiplier
Diffstat (limited to 'core/modules/breakpoint')
-rw-r--r-- | core/modules/breakpoint/src/BreakpointManager.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/modules/breakpoint/src/BreakpointManager.php b/core/modules/breakpoint/src/BreakpointManager.php index 2e70062a856..6db88219a29 100644 --- a/core/modules/breakpoint/src/BreakpointManager.php +++ b/core/modules/breakpoint/src/BreakpointManager.php @@ -133,8 +133,9 @@ class BreakpointManager extends DefaultPluginManager implements BreakpointManage if (!in_array('1x', $definition['multipliers'])) { $definition['multipliers'][] = '1x'; } - // Ensure that multipliers are sorted correctly. - sort($definition['multipliers']); + // Ensure that multipliers are sorted numerically so 1x, 1.5x and 2x + // come out in that order instead of 1.5x, 1x, 2x. + sort($definition['multipliers'], SORT_NUMERIC); } /** |