fix(geom7): убрана верхняя граница max-width — SVG растягиваются на всю ширину контейнера
Когда я добавил max-width:Wpx, SVG в одиночных карточках перестали заполнять контейнер: в карточке шириной 800px SVG ограничивался своим intrinsic размером (например 320px для §6), и казался мелким. Правильная responsive-стратегия — width:100% БЕЗ верхней границы. viewBox + preserveAspectRatio сами правильно отмасштабируют содержимое. Теперь в одиночных карточках SVG занимает всю ширину, в flex-сетке — свою долю. Cache-bust ?v=6. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,7 +36,7 @@ G.svgBox = function(w, h, opts){
|
||||
+'</pattern></defs>'
|
||||
+'<rect width="'+w+'" height="'+h+'" fill="url(#g7-grid-'+(opts.id||'def')+')"/>';
|
||||
}
|
||||
return { open:'<svg viewBox="0 0 '+w+' '+h+'" preserveAspectRatio="xMidYMid meet" style="width:100%;max-width:'+(opts.maxWidth||(w+'px'))+';height:auto;display:block;margin:'+(opts.margin||'0 auto')+';background:'+bg+';border-radius:10px;border:1px solid #e2e8f0">'+gridSvg, close:'</svg>' };
|
||||
return { open:'<svg viewBox="0 0 '+w+' '+h+'" preserveAspectRatio="xMidYMid meet" style="width:100%;height:auto;display:block;margin:'+(opts.margin||'0 auto')+';background:'+bg+';border-radius:10px;border:1px solid #e2e8f0">'+gridSvg, close:'</svg>' };
|
||||
};
|
||||
|
||||
/* === Точка === */
|
||||
|
||||
Reference in New Issue
Block a user