Automattic\WooCommerce\Blocks\BlockTypes
ProductFilters::get_responsive_styles
Generate viewport-aware Product Filters styles.
Метод класса: ProductFilters{}
Хуков нет.
Возвращает
string. Responsive CSS.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_responsive_styles();
Код ProductFilters::get_responsive_styles() ProductFilters::get responsive styles WC 11.3.0
private function get_responsive_styles() {
$overlay_breakpoint = $this->get_overlay_breakpoint();
return <<<CSS
@media (width > {$overlay_breakpoint}) {
:where(.wc-block-product-filters).is-mobile-overlay {
display: flex;
}
:where(.wc-block-product-filters).is-mobile-overlay .wc-block-product-filters__overlay-header,
:where(.wc-block-product-filters).is-mobile-overlay .wc-block-product-filters__overlay-footer,
:where(.wc-block-product-filters).is-mobile-overlay .wc-block-product-filters__open-overlay {
display: none;
}
:where(.wc-block-product-filters).is-mobile-overlay .wc-block-product-filters__overlay {
position: relative;
pointer-events: auto;
visibility: visible;
inset: 0;
z-index: auto;
background: inherit;
color: inherit;
transition: none;
flex-grow: 1;
}
:where(.wc-block-product-filters).is-mobile-overlay .wc-block-product-filters__overlay-wrapper {
width: auto;
height: auto;
background: inherit;
color: inherit;
}
:where(.wc-block-product-filters).is-mobile-overlay .wc-block-product-filters__overlay-dialog {
position: relative;
width: auto;
transform: none;
transition: none;
background: inherit;
color: inherit;
}
:where(.wc-block-product-filters).is-mobile-overlay .wc-block-product-filters__overlay-content {
padding: 0;
overflow: visible;
flex-grow: 1;
background: inherit;
color: inherit;
}
}
CSS;
}