{"id":1414,"date":"2025-04-15T16:04:32","date_gmt":"2025-04-15T16:04:32","guid":{"rendered":"https:\/\/enblocks.com\/?post_type=docs&#038;p=1414"},"modified":"2025-04-15T16:16:44","modified_gmt":"2025-04-15T16:16:44","slug":"inherit-styles","status":"publish","type":"docs","link":"https:\/\/enblocks.com\/docs\/inherit-styles\/","title":{"rendered":"Inherit Styles"},"content":{"rendered":"\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\">\n<figure class=\"wp-block-enblocks-image size-full enb-efa84639\"><img decoding=\"async\" width=\"1423\" height=\"608\" loading=\"lazy\" src=\"https:\/\/enblocks.com\/wp-content\/uploads\/2025\/04\/block-extension-inherit-styles-screenshot.png\" alt=\"Block Extension Inherit Styles Screenshot\" class=\"wp-image-1415\" title=\"block-extension-inherit-styles-screenshot\" srcset=\"https:\/\/enblocks.com\/wp-content\/uploads\/2025\/04\/block-extension-inherit-styles-screenshot.png 1423w, https:\/\/enblocks.com\/wp-content\/uploads\/2025\/04\/block-extension-inherit-styles-screenshot-300x128.png 300w, https:\/\/enblocks.com\/wp-content\/uploads\/2025\/04\/block-extension-inherit-styles-screenshot-1024x438.png 1024w, https:\/\/enblocks.com\/wp-content\/uploads\/2025\/04\/block-extension-inherit-styles-screenshot-768x328.png 768w\" sizes=\"auto, (max-width: 1423px) 100vw, 1423px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-enblocks-spacer enb-5615a0ad\"><\/div>\n\n\n\n<p>We have a special block called <strong>&#8220;Styles&#8221;<\/strong>, which allows you to define reusable CSS styles. These styles can be <strong>inherited by other blocks<\/strong>, enabling consistent design across multiple elements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">To inherit styles from a <strong>Styles <\/strong>block:<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Add any block to the page.<\/li>\n\n\n\n<li>In the block settings bar, click the <strong>plus icon<\/strong> next to <strong>&#8220;Inherit Styles&#8221;<\/strong>.<\/li>\n\n\n\n<li>Choose a previously defined <strong>Styles <\/strong>block name from the list.<\/li>\n<\/ol>\n<\/div>\n<\/div>\n\n\n\n<p>Once selected, the block will inherit all<strong> CSS styles<\/strong> from the chosen <strong>Styles<\/strong> block. You can still customize the block further by adding <strong>individual styles<\/strong>, which will override the inherited ones.<\/p>\n","protected":false},"template":"","categories":[15],"class_list":["post-1414","docs","type-docs","status-publish","hentry","category-components"],"acf":[],"_links":{"self":[{"href":"https:\/\/enblocks.com\/wp-json\/wp\/v2\/docs\/1414","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enblocks.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/enblocks.com\/wp-json\/wp\/v2\/types\/docs"}],"wp:attachment":[{"href":"https:\/\/enblocks.com\/wp-json\/wp\/v2\/media?parent=1414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enblocks.com\/wp-json\/wp\/v2\/categories?post=1414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}