Merge remote-tracking branch 'upstream/develop' into category-widget

This commit is contained in:
IanDelMar 2022-09-08 22:05:39 +02:00
commit 2b320140a9
11 changed files with 37 additions and 23 deletions

View File

@ -11186,11 +11186,6 @@ article img,
margin-left: 0;
}
@media (max-width: 991.98px) {
body.admin-bar .offcanvas-end {
margin-top: 46px;
}
}
.jumbotron {
margin-bottom: 0;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -11928,11 +11928,6 @@ article img,
margin-left: 0;
}
@media (max-width: 767.98px) {
body.admin-bar .offcanvas-end {
margin-top: 46px;
}
}
.has-blue-color,
.has-blue-color:visited {
color: #0d6efd;

File diff suppressed because one or more lines are too long

2
css/theme.min.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,11 @@ if ( ! function_exists( 'understrap_scripts' ) ) {
$css_version = $theme_version . '.' . filemtime( get_template_directory() . $theme_styles );
wp_enqueue_style( 'understrap-styles', get_template_directory_uri() . $theme_styles, array(), $css_version );
// Fix that the offcanvas close icon is hidden behind the admin bar.
if ( 'bootstrap4' !== $bootstrap_version && is_admin_bar_showing() ) {
understrap_offcanvas_admin_bar_inline_styles();
}
wp_enqueue_script( 'jquery' );
$js_version = $theme_version . '.' . filemtime( get_template_directory() . $theme_scripts );
@ -41,3 +46,28 @@ if ( ! function_exists( 'understrap_scripts' ) ) {
} // End of if function_exists( 'understrap_scripts' ).
add_action( 'wp_enqueue_scripts', 'understrap_scripts' );
if ( ! function_exists( 'understrap_offcanvas_admin_bar_inline_styles' ) ) {
/**
* Add inline styles for the offcanvas component if the admin bar is visibile.
*
* Fixes that the offcanvas close icon is hidden behind the admin bar.
*/
function understrap_offcanvas_admin_bar_inline_styles() {
$navbar_type = get_theme_mod( 'understrap_navbar_type', 'collapse' );
if ( 'offcanvas' !== $navbar_type ) {
return;
}
$css = '
body.admin-bar .offcanvas.show {
margin-top: 32px;
}
@media screen and ( max-width: 782px ) {
body.admin-bar .offcanvas.show {
margin-top: 46px;
}
}';
wp_add_inline_style( 'understrap-styles', $css );
}
}

View File

@ -54,3 +54,4 @@ parameters:
- '#Function understrap_categories_list\(\) has no return type specified.#'
- '#Function understrap_tags_list\(\) has no return type specified.#'
- '#Function understrap_comments_popup_link\(\) has no return type specified.#'
- '#Function understrap_offcanvas_admin_bar_inline_styles\(\) has no return type specified.#'

View File

@ -269,13 +269,6 @@ a.skip-link {
}
}
// Fixing Off-canvas close icon is hidden behind admin bar
@include media-breakpoint-down(md) {
body.admin-bar .offcanvas-end {
margin-top: 46px;
}
}
@if variable-exists('bootstrap4') {
// Reset Jumbotron default margin