Decrease horizontal and top margins on pages #719

This commit is contained in:
Michael Stenta 2023-10-06 14:46:23 -04:00
commit 4049ca5198
5 changed files with 37 additions and 2 deletions

View File

@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [Dashboard improvements #712](https://github.com/farmOS/farmOS/pull/712)
- [Condense metrics UI #711](https://github.com/farmOS/farmOS/pull/711)
- [Condense views table UI #713](https://github.com/farmOS/farmOS/pull/713)
- [Decrease horizontal and top margins on pages #719](https://github.com/farmOS/farmOS/pull/719)
- [Misc quick form code and documentation improvements #703](https://github.com/farmOS/farmOS/pull/703)
### Deprecated

View File

@ -1,3 +1,3 @@
.help .block-help-block p {
margin-bottom: 1em;
.help .block-help-block p:not(:last-child) {
margin-bottom: var(--gin-spacing-xs);
}

View File

@ -0,0 +1,23 @@
/* 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;
}
/* Decrease top margin from elements below page title. */
.layout-container .page-content > .help,
.layout-container .page-content > .region-highlighted,
.layout-container .page-content > .region-content {
margin-top: var(--gin-spacing-s);
}

View File

@ -36,6 +36,10 @@ quick:
css:
theme:
css/quick.css: { }
regions:
css:
theme:
css/regions.css: { }
toolbar:
css:
theme:

View File

@ -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().
*/