diff --git a/assets/css/frontend/header-components.css b/assets/css/frontend/header-components.css index c77493d3..a779178c 100644 --- a/assets/css/frontend/header-components.css +++ b/assets/css/frontend/header-components.css @@ -56,11 +56,6 @@ padding-right: 15px; box-sizing: border-box; } -.header-slider-card .aksrt-icon-cover-card-grid { - display: grid; - grid-template-columns: repeat(var(--aksrt-icon-card-cols, 1), minmax(0, 1fr)); - gap: 15px; -} .filter-blur .header-slider-card .zib-widget, .filter-blur .header-components-card .zib-widget { -webkit-backdrop-filter: saturate(5) blur(20px); diff --git a/assets/css/frontend/header-components/search-keywords-row.css b/assets/css/frontend/header-components/search-keywords-row.css index e5304073..cf3ef36b 100644 --- a/assets/css/frontend/header-components/search-keywords-row.css +++ b/assets/css/frontend/header-components/search-keywords-row.css @@ -59,11 +59,6 @@ /* zibll mobile (max-width: 767px) search / card offsets */ @media (max-width: 767px) { - .header-slider-card .aksrt-icon-cover-card-grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 10px; - } - .header-slider-container .new-swiper.slide-header .swiper-wrapper, .new-swiper.slide-index.slide-header .swiper-wrapper { height: var(--m-height); diff --git a/inc/helpers/homepage/header-components.php b/inc/helpers/homepage/header-components.php index a2a4efb7..12875c7f 100644 --- a/inc/helpers/homepage/header-components.php +++ b/inc/helpers/homepage/header-components.php @@ -428,17 +428,14 @@ if (!function_exists('aksrt_header_slide')) { if ($inner === '') { continue; } - $items .= !empty($card_options['show_widget_bg']) ? '
' . $inner . '
' : $inner; + $items .= !empty($card_options['show_widget_bg']) ? '
' : '
'; + $items .= $inner . '
'; $card_count++; } if ($items !== '') { - $cards_html = '
'; - if (!empty($card_options['show_widget_bg'])) { - $cards_html .= '
' . $items . '
'; - } else { - $cards_html .= '
' . $items . '
'; - } - $cards_html .= '
'; + $cards_html = '
' + . (!empty($card_options['show_widget_bg']) ? '
' : '
') + . '
' . $items . '
'; } } diff --git a/tests/widget-system/icon-card-contract.test.cjs b/tests/widget-system/icon-card-contract.test.cjs index 6ab9bfea..108850ab 100644 --- a/tests/widget-system/icon-card-contract.test.cjs +++ b/tests/widget-system/icon-card-contract.test.cjs @@ -26,9 +26,6 @@ test('icon card renderers keep vertical and horizontal Zibll DOM contracts separ test('homepage horizontal cards only use Zibll surface and responsive padding rules', () => { const css = read('assets/css/frontend/header-components/dark-theme.css'); - const headerCss = read('assets/css/frontend/header-components.css'); - const mobileCss = read('assets/css/frontend/header-components/search-keywords-row.css'); - const header = read('inc/helpers/homepage/header-components.php'); const widgetCss = read('assets/widgets/frontend.css'); assert.match(css, /\.header-slider-card \.icon-cover-card\.zib-widget \{\s*padding: 10px;/); @@ -36,7 +33,4 @@ test('homepage horizontal cards only use Zibll surface and responsive padding ru assert.doesNotMatch(css, /\.header-slider-card \.icon-cover-icon\.badg\.cir/); assert.doesNotMatch(css, /\.header-slider-card \.icon-cover-icon img/); assert.doesNotMatch(widgetCss, /aksrt-widget-icon-cards \.icon-cover-card/); - assert.match(header, /aksrt-icon-cover-card-grid/); - assert.match(headerCss, /\.header-slider-card \.aksrt-icon-cover-card-grid \{[\s\S]*?grid-template-columns: repeat\(var\(--aksrt-icon-card-cols, 1\), minmax\(0, 1fr\)\);[\s\S]*?gap: 15px;/); - assert.match(mobileCss, /\.header-slider-card \.aksrt-icon-cover-card-grid \{[\s\S]*?grid-template-columns: repeat\(2, minmax\(0, 1fr\)\);[\s\S]*?gap: 10px;/); });