{"id":153582,"date":"2023-07-04T15:56:36","date_gmt":"2023-07-04T10:26:36","guid":{"rendered":"https:\/\/git-staging.wpastra.com\/?post_type=docs&#038;p=153582"},"modified":"2023-07-12T16:36:44","modified_gmt":"2023-07-12T11:06:44","slug":"how-to-fix-the-line-height-unit-being-converted-to-em","status":"publish","type":"docs","link":"https:\/\/git-staging.wpastra.com\/es\/docs\/how-to-fix-the-line-height-unit-being-converted-to-em\/","title":{"rendered":"\u00bfC\u00f3mo corregir la unidad de altura de l\u00ednea convertida a \"EM\"?"},"content":{"rendered":"<p>Antes del lanzamiento de la versi\u00f3n 4.0.0 del tema Astra, la altura de l\u00ednea se establec\u00eda sin unidades. Esto significa que el valor de la altura de l\u00ednea aparec\u00eda sin ninguna unidad de medida en particular.<\/p>\n\n\n\n<p>Sin embargo, con la actualizaci\u00f3n a la versi\u00f3n 4.0.0, se produjo un cambio en la forma de gestionar la altura de l\u00ednea. Se estableci\u00f3 expl\u00edcitamente en \"em\" por defecto. \"em\" es una unidad de medida relativa al tama\u00f1o de la fuente. Este cambio puede haber causado problemas de compatibilidad a los usuarios que estaban acostumbrados al anterior enfoque sin unidades.<\/p>\n\n\n\n<p>Para resolver este problema y ofrecer una soluci\u00f3n a los usuarios, nuestros desarrolladores han introducido un nuevo filtro. Este filtro permite a los usuarios ajustar la altura de l\u00ednea a la unidad que deseen. Al utilizar el filtro, los usuarios pueden especificar la unidad que prefieran para la altura de l\u00ednea, como px, em, rem o especificar un valor vac\u00edo (\"\") para aplicar el enfoque \"sin unidad\". M\u00e1s informaci\u00f3n sobre la unidad de altura de l\u00ednea <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/line-height\">aqu\u00ed<\/a>.<\/p>\n\n\n\n<p>Para solucionar este problema, copie el c\u00f3digo siguiente y p\u00e9guelo en el archivo function.php del tema hijo de su sitio web.<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\" data-no-auto-translation=\"\"><code>add_filter( 'astra_font_line_height_unit', 'my_custom_font_extras_unit' );\nfunction my_custom_font_extras_unit( $unit ) {\n\t\/\/ Set to empty string for a unit-less value or \"em\" or \"px\".\n\t$modified_unit = '';\n\treturn $modified_unit;\n}\n<\/code><\/pre>\n\n\n\n<p>Si no est\u00e1 seguro del tema hijo del tema Astra, aqu\u00ed tiene un <a href=\"https:\/\/git-staging.wpastra.com\/es\/docs\/install-astra-child-theme\/\">art\u00edculo<\/a> que le guiar\u00e1n. He aqu\u00ed otra <a href=\"https:\/\/git-staging.wpastra.com\/es\/docs\/add-custom-php-code\/#3.-in-child-theme\">art\u00edculo<\/a> que le indicar\u00e1 c\u00f3mo insertar este c\u00f3digo en el archivo function.php de su tema hijo.<\/p>\n\n\n\n<p>Le recomendamos encarecidamente que haga una copia de seguridad de su sitio web antes de editar el archivo function.php de su sitio web. Aqu\u00ed tiene otra <a href=\"https:\/\/git-staging.wpastra.com\/es\/docs\/backup-your-website-in-less-than-10-minutes\/\">art\u00edculo<\/a> que le guiar\u00e1 en el proceso de hacer una copia de seguridad de su sitio web.<\/p>","protected":false},"excerpt":{"rendered":"<p>Antes del lanzamiento de la versi\u00f3n 4.0.0 del tema Astra, la altura de l\u00ednea se establec\u00eda sin unidades. Esto significa que el valor de la altura de l\u00ednea aparec\u00eda sin ninguna unidad de medida en particular. Sin embargo, con la actualizaci\u00f3n a la versi\u00f3n 4.0.0, se produjo un cambio en la forma de gestionar la altura de l\u00ednea. Se estableci\u00f3 expl\u00edcitamente en \"em\" por defecto. \"em\" [...]<\/p>","protected":false},"author":86,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","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":"","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":[103],"docs_tag":[],"class_list":{"0":"post-153582","1":"docs","2":"type-docs","3":"status-publish","5":"docs_category-custom-code-snippets"},"spectra_custom_meta":{"wp_last_modified_info":["July 12, 2023 @ 4:36 PM"],"wplmi_shortcode":["[lmt-post-modified-info]"],"_edit_lock":["1689538775:86"],"rank_math_seo_score":["15"],"_wplmi_last_modified":["2023-07-12 16:36:44"],"rank_math_internal_links_processed":["1"],"_edit_last":["86"],"tap_disable_autolinker":["no"],"tap_autolink_inside_heading":["global"],"tap_autolink_random_placement":["global"],"tap_post_autolinker_limit":["0"],"rank_math_primary_docs_category":["103"],"rank_math_analytic_object_id":["2478"],"views":["20772"],"helpful":["2"],"unhelpful":["1"],"redirects":["0"],"pfd_related_docs":[""],"_trp_automatically_translated_slug_es_ES":["como-arreglar-la-unidad-de-altura-de-linea-que-se-convierte-a-em"]},"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":"Arindam","author_link":"https:\/\/git-staging.wpastra.com\/es\/author\/arindamm\/"},"uagb_comment_info":0,"uagb_excerpt":"Before the release of Astra theme version 4.0.0, the line-height, was set using a unit-less approach. This means that the line-height value appeared without any particular unit of measurement. However, with the update to version 4.0.0, there was a change in how the line-height was handled. It was explicitly set to &#8220;em&#8221; by default. &#8220;em&#8221;&hellip;","_links":{"self":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/153582"}],"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\/86"}],"replies":[{"embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/comments?post=153582"}],"version-history":[{"count":0,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/153582\/revisions"}],"wp:attachment":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/media?parent=153582"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_category?post=153582"},{"taxonomy":"docs_tag","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_tag?post=153582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}