{"id":92908,"date":"2021-06-16T15:38:42","date_gmt":"2021-06-16T10:08:42","guid":{"rendered":"https:\/\/git-staging.wpastra.com\/?post_type=docs&#038;p=92908"},"modified":"2021-10-13T16:18:47","modified_gmt":"2021-10-13T10:48:47","slug":"improve-cls-for-svg-logo","status":"publish","type":"docs","link":"https:\/\/git-staging.wpastra.com\/es\/docs\/improve-cls-for-svg-logo\/","title":{"rendered":"\u00bfC\u00f3mo mejorar CLS para el logotipo SVG?"},"content":{"rendered":"<p>El cambio de dise\u00f1o acumulativo (CLS) es una m\u00e9trica importante relacionada con la estabilidad visual del sitio web. M\u00e1s concretamente, esta m\u00e9trica registra los cambios de dise\u00f1o inesperados que experimentan los usuarios en su sitio web. Este documento le mostrar\u00e1 c\u00f3mo mejorar la puntuaci\u00f3n CLS si utiliza el logotipo SVG en su sitio web.<\/p>\n\n\n\n<p>Cuando a\u00f1ada una imagen de logotipo en los formatos .png y .jpg a su sitio web, la altura del logotipo se a\u00f1adir\u00e1 autom\u00e1ticamente en funci\u00f3n de la anchura del logotipo. Por el contrario, si carga una imagen SVG, WordPress solo establecer\u00e1 la anchura del logotipo, pero no la altura. <\/p>\n\n\n\n<p>Como resultado, es posible que el logotipo se reduzca, lo que puede provocar un desplazamiento inesperado del dise\u00f1o en la secci\u00f3n de cabecera. La versi\u00f3n 3.6.0 de Astra Theme ha mejorado la forma en que se gestionan las im\u00e1genes SVG del logotipo, lo que evita desplazamientos inesperados. Por lo tanto, este cambio puede ayudar a mejorar la puntuaci\u00f3n general de CLS.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u00bfC\u00f3mo lo mejoramos?<\/h2>\n\n\n\n<p>Para mejorar esto, hemos a\u00f1adido un c\u00f3digo JavaScript que calcular\u00e1 autom\u00e1ticamente la altura del logotipo SVG una vez importado a su sitio web. Despu\u00e9s, la altura se calcular\u00e1 en funci\u00f3n de la anchura del logotipo que establezca en el personalizador. Puede encontrar m\u00e1s detalles sobre esto en nuestro <a href=\"https:\/\/git-staging.wpastra.com\/es\/updates\/astra-3-6\/\">Art\u00edculo de blog<\/a>.<\/p>\n\n\n\n<p>Esta mejora del logotipo SVG se reflejar\u00e1 en una cabecera est\u00e1ndar y transparente. Este problema no se presentaba con el logotipo de cabecera adhesivo.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u00bfC\u00f3mo solucionarlo?<\/h2>\n\n\n\n<p>Para todos los sitios web nuevos, la mejora del logotipo SVG se aplicar\u00e1 autom\u00e1ticamente. Una vez que cargue el logotipo SVG y establezca la anchura del logotipo, la altura se calcular\u00e1 y guardar\u00e1 autom\u00e1ticamente. Por otro lado, si ya tiene un sitio web con un logotipo SVG, tendr\u00e1 que realizar algunos cambios menores. <\/p>\n\n\n\n<p>No hemos aplicado esta mejora a sitios web existentes para evitar posibles problemas que pudieran haber aparecido. En algunos casos, aplicar esta mejora autom\u00e1ticamente a logotipos ya en uso podr\u00eda dar lugar a cambios no deseados.<\/p>\n\n\n\n<p>Para aplicar esta mejora a su sitio web, siga estos pasos:<\/p>\n\n\n\n<p><strong>Primer paso<\/strong> - Vaya a Personalizador &gt; Cabecera &gt; widget \"Identidad y logotipo del sitio\";<\/p>\n\n\n\n<p><strong>Paso 2<\/strong> - Actualizar\/editar el valor de la anchura del logotipo<\/p>\n\n\n\n<p><strong>Paso 3<\/strong> - Pulse el bot\u00f3n \"Publicar\" para guardar los cambios.&nbsp;<\/p>\n\n\n\n<p>En funci\u00f3n de la anchura que acaba de actualizar, la altura del logotipo se calcular\u00e1 autom\u00e1ticamente y se guardar\u00e1 en la configuraci\u00f3n del personalizador. Esto aplicar\u00e1 mejoras al logotipo SVG utilizado en su sitio web.<\/p>","protected":false},"excerpt":{"rendered":"<p>El cambio de dise\u00f1o acumulativo (CLS) es una m\u00e9trica importante relacionada con la estabilidad visual del sitio web. M\u00e1s concretamente, esta m\u00e9trica registra los cambios de dise\u00f1o inesperados que experimentan los usuarios en su sitio web. Este documento le mostrar\u00e1 c\u00f3mo mejorar la puntuaci\u00f3n CLS si utiliza el logotipo SVG en su sitio web. Al a\u00f1adir una imagen de logotipo en [...]<\/p>","protected":false},"author":70,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"docs_category":[1598],"docs_tag":[2082,2083,2084,2037],"class_list":{"0":"post-92908","1":"docs","2":"type-docs","3":"status-publish","5":"docs_category-troubleshooting","6":"docs_tag-svg","7":"docs_tag-improvement","8":"docs_tag-cls","9":"docs_tag-astra-theme"},"spectra_custom_meta":{"wp_last_modified_info":["October 13, 2021 @ 4:18 PM"],"wplmi_shortcode":["[lmt-post-modified-info]"],"_edit_lock":["1662930740:86"],"_edit_last":["25"],"tap_disable_autolinker":["no"],"tap_autolink_inside_heading":["global"],"tap_autolink_random_placement":["global"],"tap_post_autolinker_limit":["0"],"site-sidebar-layout":["default"],"site-content-layout":["default"],"theme-transparent-header-meta":["default"],"_yoast_wpseo_estimated-reading-time-minutes":["2"],"_wp_old_slug":["fix-svg-logo-cls-issue","svg-logo-cls-improvement"],"_yoast_wpseo_content_score":["60"],"_yoast_wpseo_primary_docs_category":["1598"],"_yoast_wpseo_focuskw":["improve cls"],"_yoast_wpseo_linkdex":["71"],"_yoast_wpseo_title":["%%title%% - Astra Theme"],"_yoast_wpseo_metadesc":["Is your SVG logo negatively affecting your websites CLS score? Learn how you can improve CLS for SVG logo with the Astra Theme."],"views":["6332"],"helpful":["3"],"unhelpful":["12"],"redirects":["8"],"rank_math_primary_docs_category":["1598"],"rank_math_title":["%title% - Astra Theme"],"rank_math_description":["Is your SVG logo negatively affecting your websites CLS score? Learn how you can improve CLS for SVG logo with the Astra Theme."],"rank_math_focus_keyword":["improve cls"],"rank_math_news_sitemap_robots":["index"],"rank_math_robots":["a:1:{i:0;s:5:\"index\";}"],"rank_math_analytic_object_id":["248"],"rank_math_internal_links_processed":["1"],"_trp_automatically_translated_slug_es_ES":["mejorar-cls-para-logotipo-svg"],"_uag_page_assets":["a:9:{s:3:\"css\";s:2495:\".wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape-top svg{width: calc( 100% + 1.3px );}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape.uagb-container__shape-top .uagb-container__shape-fill{fill: rgba(51,51,51,1);}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape-bottom svg{width: calc( 100% + 1.3px );}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape.uagb-container__shape-bottom .uagb-container__shape-fill{fill: rgba(51,51,51,1);}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__video-wrap video{opacity: 1;}.wp-block-uagb-container.uagb-is-root-container .uagb-block-debf2792{max-width: 100%;width: 100%;}.wp-block-uagb-container.uagb-is-root-container.alignfull.uagb-block-debf2792 > .uagb-container-inner-blocks-wrap{--inner-content-custom-width: min( 100%, 1200px);max-width: var(--inner-content-custom-width);width: 100%;flex-direction: column;align-items: center;justify-content: center;flex-wrap: nowrap;row-gap: 0px;column-gap: 0px;}.wp-block-uagb-container.uagb-block-debf2792{box-shadow: 0px 0px   #00000070 ;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;margin-top: 0px !important;margin-bottom: 0px !important;margin-left: 0px;margin-right: 0px;overflow: visible;border-color: inherit;row-gap: 0px;column-gap: 0px;}@media only screen and (max-width: 976px) {.wp-block-uagb-container.uagb-is-root-container .uagb-block-debf2792{width: 100%;}.wp-block-uagb-container.uagb-is-root-container.alignfull.uagb-block-debf2792 > .uagb-container-inner-blocks-wrap{--inner-content-custom-width: min( 100%, 1024px);max-width: var(--inner-content-custom-width);width: 100%;}.wp-block-uagb-container.uagb-block-debf2792{padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;margin-top: 0px !important;margin-bottom: 0px !important;margin-left: 0px;margin-right: 0px;}}@media only screen and (max-width: 767px) {.wp-block-uagb-container.uagb-is-root-container .uagb-block-debf2792{max-width: 100%;width: 100%;}.wp-block-uagb-container.uagb-is-root-container.alignfull.uagb-block-debf2792 > .uagb-container-inner-blocks-wrap{--inner-content-custom-width: min( 100%, 767px);max-width: var(--inner-content-custom-width);width: 100%;flex-wrap: wrap;}.wp-block-uagb-container.uagb-block-debf2792{padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;margin-top: 0px !important;margin-bottom: 0px !important;margin-left: 0px;margin-right: 0px;}}\";s:2:\"js\";s:0:\"\";s:18:\"current_block_list\";a:4:{i:0;s:14:\"core\/paragraph\";i:1;s:12:\"core\/heading\";i:2;s:14:\"uagb\/container\";i:3;s:14:\"core\/shortcode\";}s:8:\"uag_flag\";b:1;s:11:\"uag_version\";s:10:\"1780105100\";s:6:\"gfonts\";a:0:{}s:10:\"gfonts_url\";s:0:\"\";s:12:\"gfonts_files\";a:0:{}s:14:\"uag_faq_layout\";b:0;}"]},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"trp-custom-language-flag":false},"uagb_author_info":{"display_name":"Nikola Mihajlovic","author_link":"https:\/\/git-staging.wpastra.com\/es\/author\/nikolam\/"},"uagb_comment_info":0,"uagb_excerpt":"Cumulative Layout Shift (CLS) is an important metric related to the website&#8217;s visual stability. More precisely, this metric tracks unexpected layout shifts that users experience on your website. This document will show you how to improve the CLS score if you&#8217;re using the SVG logo for your website. When you add a logo image in&hellip;","_links":{"self":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/92908"}],"collection":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/users\/70"}],"replies":[{"embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/comments?post=92908"}],"version-history":[{"count":0,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/92908\/revisions"}],"wp:attachment":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/media?parent=92908"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_category?post=92908"},{"taxonomy":"docs_tag","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_tag?post=92908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}