diff --git a/modules/core/ui/theme/css/regions.css b/modules/core/ui/theme/css/regions.css new file mode 100644 index 000000000..31b941d91 --- /dev/null +++ b/modules/core/ui/theme/css/regions.css @@ -0,0 +1,16 @@ +/* Decrease the horizontal margin on medium to large screens. Gin uses xxl. */ +@media (min-width: 48em) { + .toolbar-tray-open:not(.toolbar-vertical) .layout-container, + body:not(.toolbar-tray-open) .layout-container { + margin-left: var(--gin-spacing-m) !important; + margin-right: var(--gin-spacing-m) !important; + } +} + +/* + Override gin style that moves user toolbar icon to the right. + With our narrower margins this overflows and adds a horizontal scroll bar. + */ +.toolbar-id--toolbar-icon-user { + margin-right: 0 !important; +} diff --git a/modules/core/ui/theme/farm_ui_theme.libraries.yml b/modules/core/ui/theme/farm_ui_theme.libraries.yml index 7f54ebf56..907ce8dfc 100644 --- a/modules/core/ui/theme/farm_ui_theme.libraries.yml +++ b/modules/core/ui/theme/farm_ui_theme.libraries.yml @@ -36,6 +36,10 @@ quick: css: theme: css/quick.css: { } +regions: + css: + theme: + css/regions.css: { } toolbar: css: theme: diff --git a/modules/core/ui/theme/farm_ui_theme.module b/modules/core/ui/theme/farm_ui_theme.module index 5d01d0da1..a09dfaf6e 100644 --- a/modules/core/ui/theme/farm_ui_theme.module +++ b/modules/core/ui/theme/farm_ui_theme.module @@ -109,6 +109,13 @@ function farm_ui_theme_preprocess_log__full(&$variables) { $variables['#attached']['library'][] = 'farm_ui_theme/layout'; } +/** + * Implements hook_preprocess_HOOK(). + */ +function farm_ui_theme_preprocess_page(&$variables) { + $variables['#attached']['library'][] = 'farm_ui_theme/regions'; +} + /** * Implements hook_preprocess_HOOK(). */