diff --git a/src/components/FixedLayout/FixedLayout.css b/src/components/FixedLayout/FixedLayout.css index 604ed765a4..b9e82e99a2 100644 --- a/src/components/FixedLayout/FixedLayout.css +++ b/src/components/FixedLayout/FixedLayout.css @@ -1,6 +1,16 @@ .FixedLayout { position: fixed; box-sizing: border-box; + /** + * ⚠️ WARNING ⚠️ + * `left: auto` решает следующие задачи: + * 1. При фиксированной ширине компонента позиционирует компонент по центру. + * 2. При использовании `SplitLayout` позиционирует компонент с права от ``. + * + * Подробности можно почитать здесь https://github.com/VKCOM/VKUI/pull/2472 + * + * Единственное, есть проблема при срабатывании insets в landscape ориентации экрана (https://github.com/VKCOM/VKUI/issues/2422). + */ left: auto; z-index: 3; padding-left: var(--safe-area-inset-left); @@ -14,12 +24,10 @@ .FixedLayout--top { width: 100%; top: 0; - left: 0; } .FixedLayout--bottom { width: 100%; - left: 0; bottom: 0; padding-bottom: var(--safe-area-inset-bottom); }