{"id":4581,"date":"2022-08-10T07:59:08","date_gmt":"2022-08-10T13:59:08","guid":{"rendered":"https:\/\/wpengine.com\/builders\/?p=4581"},"modified":"2023-04-14T09:57:39","modified_gmt":"2023-04-14T15:57:39","slug":"gradient-underline-block-style","status":"publish","type":"post","link":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/","title":{"rendered":"Create a Gradient Underline Block Style for Quotes"},"content":{"rendered":"\n<p>As WordPress continues to evolve and move toward a full site editing experience, builders have access to features such as custom block styles.<\/p>\n\n\n\n<p>Block styles can allow users to choose an alternative style for blocks&nbsp;<a target=\"_blank\" href=\"https:\/\/wpengine.com\/builders\/border-block-style\/\" rel=\"noreferrer noopener\">such as images<\/a>, buttons, groups, etc. Usually, these styles are minor and add a subtle effect such as a border or a shadow.<\/p>\n\n\n\n<p>The Quote block is one of the most commonly used blocks in WordPress. Quotes provide users with an appealing visual way to showcase excerpts of text, inspiring words, or positive client testimonials.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Bright Mode WordPress Theme<\/h2>\n\n\n\n<p><a href=\"https:\/\/bg.design\/bright-mode\/\">Bright Mode<\/a> is a block theme for those who love modern design and vibrant colors. It is an expression of the very best that WordPress has to offer\u2014including a sophisticated, bold <a href=\"https:\/\/bg.design\/bright-mode\/colors\/\">color palette<\/a> and <a href=\"https:\/\/bg.design\/bright-mode\/styles\/\">styles<\/a> that shine deeply.<\/p>\n\n\n\n<p>The theme includes four underline block styles which users can apply to quotes: Primary to Secondary, Secondary to Tertiary, Tertiary to Primary, and Primary to Secondary to Tertiary.<\/p>\n\n\n\n<p>Here is screenshot that shows each of the available block styles:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-border\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"2048\" src=\"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/quote-underline-block-styles.jpg\" alt=\"Gradient Underline Block Style for Quotes\" class=\"wp-image-4587\" srcset=\"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/quote-underline-block-styles.jpg 1280w, https:\/\/wpengine.com\/builders\/wp-content\/uploads\/quote-underline-block-styles-188x300.jpg 188w, https:\/\/wpengine.com\/builders\/wp-content\/uploads\/quote-underline-block-styles-640x1024.jpg 640w, https:\/\/wpengine.com\/builders\/wp-content\/uploads\/quote-underline-block-styles-768x1229.jpg 768w, https:\/\/wpengine.com\/builders\/wp-content\/uploads\/quote-underline-block-styles-960x1536.jpg 960w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">How to Create a Gradient Underline Block Style<\/h2>\n\n\n\n<p>The first step is to register the gradient underline block styles via the theme\u2019s <code>functions.php<\/code> file. Below is the code used in Bright Mode:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-code-table shcb-line-numbers\"><span class='shcb-loc'><span><span class=\"hljs-comment\">\/**<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-comment\"> * Register block styles.<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-comment\"> *<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-comment\"> * <span class=\"hljs-doctag\">@since<\/span> 1.0<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-comment\"> *\/<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">bright_mode_register_block_styles<\/span><span class=\"hljs-params\">()<\/span> <\/span>{\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span>\t$block_styles = <span class=\"hljs-keyword\">array<\/span>(\n<\/span><\/span><span class='shcb-loc'><span>\t\t<span class=\"hljs-string\">'core\/quote'<\/span>           =&gt; <span class=\"hljs-keyword\">array<\/span>(\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t<span class=\"hljs-string\">'underline-primary-secondary'<\/span>  =&gt; __( <span class=\"hljs-string\">'Underline #1'<\/span>, <span class=\"hljs-string\">'bright-mode'<\/span> ),\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t<span class=\"hljs-string\">'underline-secondary-tertiary'<\/span> =&gt; __( <span class=\"hljs-string\">'Underline #2'<\/span>, <span class=\"hljs-string\">'bright-mode'<\/span> ),\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t<span class=\"hljs-string\">'underline-tertiary-primary'<\/span>   =&gt; __( <span class=\"hljs-string\">'Underline #3'<\/span>, <span class=\"hljs-string\">'bright-mode'<\/span> ),\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t<span class=\"hljs-string\">'underline'<\/span>                    =&gt; __( <span class=\"hljs-string\">'Underline #4'<\/span>, <span class=\"hljs-string\">'bright-mode'<\/span> ),\n<\/span><\/span><span class='shcb-loc'><span>\t\t),\n<\/span><\/span><span class='shcb-loc'><span>\t);\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-keyword\">foreach<\/span> ( $block_styles <span class=\"hljs-keyword\">as<\/span> $block =&gt; $styles ) {\n<\/span><\/span><span class='shcb-loc'><span>\t\t<span class=\"hljs-keyword\">foreach<\/span> ( $styles <span class=\"hljs-keyword\">as<\/span> $style_name =&gt; $style_label ) {\n<\/span><\/span><span class='shcb-loc'><span>\t\t\tregister_block_style(\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t$block,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t<span class=\"hljs-keyword\">array<\/span>(\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-string\">'name'<\/span>  =&gt; $style_name,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-string\">'label'<\/span> =&gt; $style_label,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t)\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t);\n<\/span><\/span><span class='shcb-loc'><span>\t\t}\n<\/span><\/span><span class='shcb-loc'><span>\t}\n<\/span><\/span><span class='shcb-loc'><span>}\n<\/span><\/span><span class='shcb-loc'><span>add_action( <span class=\"hljs-string\">'init'<\/span>, <span class=\"hljs-string\">'bright_mode_register_block_styles'<\/span> );\n<\/span><\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>When custom block styles are created, WordPress creates a custom class, which is applied to that particular block: .is-style-XXXXXX.<\/p>\n\n\n\n<p>Next, we need to define the gradients which will be used for the custom style. This can be done via the theme\u2019s <code>theme.json<\/code> file:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JSON \/ JSON with Comments\" data-shcb-language-slug=\"json\"><span><code class=\"hljs language-json shcb-code-table shcb-line-numbers\"><span class='shcb-loc'><span>{\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attr\">\"settings\"<\/span>: {\n<\/span><\/span><span class='shcb-loc'><span>\t\t<span class=\"hljs-attr\">\"color\"<\/span>: {\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t<span class=\"hljs-attr\">\"gradients\"<\/span>: &#91;\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t{\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"gradient\"<\/span>: <span class=\"hljs-string\">\"linear-gradient(135deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--secondary) 100%)\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"name\"<\/span>: <span class=\"hljs-string\">\"Primary to Secondary\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"slug\"<\/span>: <span class=\"hljs-string\">\"primary-secondary\"<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t},\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t{\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"gradient\"<\/span>: <span class=\"hljs-string\">\"linear-gradient(135deg, var(--wp--preset--color--secondary) 0%, var(--wp--preset--color--tertiary) 100%)\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"name\"<\/span>: <span class=\"hljs-string\">\"Secondary to Tertiary\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"slug\"<\/span>: <span class=\"hljs-string\">\"secondary-tertiary\"<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t},\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t{\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"gradient\"<\/span>: <span class=\"hljs-string\">\"linear-gradient(135deg, var(--wp--preset--color--tertiary) 0%, var(--wp--preset--color--primary) 100%)\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"name\"<\/span>: <span class=\"hljs-string\">\"Tertiary to Primary\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"slug\"<\/span>: <span class=\"hljs-string\">\"tertiary-primary\"<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t},\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t{\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"gradient\"<\/span>: <span class=\"hljs-string\">\"linear-gradient(135deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--secondary) 50%, var(--wp--preset--color--tertiary) 100%)\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"name\"<\/span>: <span class=\"hljs-string\">\"Primary to Secondary to Tertiary\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"slug\"<\/span>: <span class=\"hljs-string\">\"primary-secondary-tertiary\"<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t}\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t]\n<\/span><\/span><span class='shcb-loc'><span>\t\t}\n<\/span><\/span><span class='shcb-loc'><span>\t}\n<\/span><\/span><span class='shcb-loc'><span>}\n<\/span><\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JSON \/ JSON with Comments<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">json<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The gradients are defined with CSS preset variables, which are also defined by the theme. In the case of Bright Mode, here is what they are:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JSON \/ JSON with Comments\" data-shcb-language-slug=\"json\"><span><code class=\"hljs language-json shcb-code-table shcb-line-numbers\"><span class='shcb-loc'><span>{\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attr\">\"settings\"<\/span>: {\n<\/span><\/span><span class='shcb-loc'><span>\t\t<span class=\"hljs-attr\">\"color\"<\/span>: {\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t<span class=\"hljs-attr\">\"palette\"<\/span>: &#91;\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t{\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"color\"<\/span>: <span class=\"hljs-string\">\"#ff33ff\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"name\"<\/span>: <span class=\"hljs-string\">\"Primary\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"slug\"<\/span>: <span class=\"hljs-string\">\"primary\"<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t},\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t{\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"color\"<\/span>: <span class=\"hljs-string\">\"#ffff33\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"name\"<\/span>: <span class=\"hljs-string\">\"Secondary\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"slug\"<\/span>: <span class=\"hljs-string\">\"secondary\"<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t},\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t{\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"color\"<\/span>: <span class=\"hljs-string\">\"#33ffff\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"name\"<\/span>: <span class=\"hljs-string\">\"Tertiary\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"slug\"<\/span>: <span class=\"hljs-string\">\"tertiary\"<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t},\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t{\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"color\"<\/span>: <span class=\"hljs-string\">\"#000\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"name\"<\/span>: <span class=\"hljs-string\">\"Main\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"slug\"<\/span>: <span class=\"hljs-string\">\"main\"<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t},\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t{\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"color\"<\/span>: <span class=\"hljs-string\">\"#fff\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"name\"<\/span>: <span class=\"hljs-string\">\"Base\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t\t<span class=\"hljs-attr\">\"slug\"<\/span>: <span class=\"hljs-string\">\"base\"<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t\t}\n<\/span><\/span><span class='shcb-loc'><span>\t\t\t]\n<\/span><\/span><span class='shcb-loc'><span>\t\t}\n<\/span><\/span><span class='shcb-loc'><span>\t}\n<\/span><\/span><span class='shcb-loc'><span>}\n<\/span><\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JSON \/ JSON with Comments<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">json<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Lastly, we need to style the gradient underlines, which can be done by adding the following CSS to the theme\u2019s <code>style.css<\/code> file:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css shcb-code-table shcb-line-numbers\"><span class='shcb-loc'><span><span class=\"hljs-comment\">\/* Quote<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-comment\">--------------------------------------------- *\/<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-selector-class\">.wp-block-quote<\/span><span class=\"hljs-selector-class\">.is-style-underline<\/span>,\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-selector-class\">.wp-block-quote<\/span><span class=\"hljs-selector-class\">.is-style-underline-primary-secondary<\/span>,\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-selector-class\">.wp-block-quote<\/span><span class=\"hljs-selector-class\">.is-style-underline-secondary-tertiary<\/span>,\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-selector-class\">.wp-block-quote<\/span><span class=\"hljs-selector-class\">.is-style-underline-tertiary-primary<\/span> {\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">border<\/span>: none;\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">box-shadow<\/span>: none;\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">padding<\/span>: <span class=\"hljs-number\">0<\/span>;\n<\/span><\/span><span class='shcb-loc'><span>}\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-selector-class\">.wp-block-quote<\/span><span class=\"hljs-selector-class\">.is-style-underline<\/span> <span class=\"hljs-selector-tag\">p<\/span> {\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">background<\/span>: <span class=\"hljs-built_in\">var<\/span>(--wp--preset--gradient--primary-secondary-tertiary);\n<\/span><\/span><span class='shcb-loc'><span>}\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-selector-class\">.wp-block-quote<\/span><span class=\"hljs-selector-class\">.is-style-underline-primary-secondary<\/span> <span class=\"hljs-selector-tag\">p<\/span> {\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">background<\/span>: <span class=\"hljs-built_in\">var<\/span>(--wp--preset--gradient--primary-secondary);\n<\/span><\/span><span class='shcb-loc'><span>}\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-selector-class\">.wp-block-quote<\/span><span class=\"hljs-selector-class\">.is-style-underline-secondary-tertiary<\/span> <span class=\"hljs-selector-tag\">p<\/span> {\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">background<\/span>: <span class=\"hljs-built_in\">var<\/span>(--wp--preset--gradient--secondary-tertiary);\n<\/span><\/span><span class='shcb-loc'><span>}\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-selector-class\">.wp-block-quote<\/span><span class=\"hljs-selector-class\">.is-style-underline-tertiary-primary<\/span> <span class=\"hljs-selector-tag\">p<\/span> {\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">background<\/span>: <span class=\"hljs-built_in\">var<\/span>(--wp--preset--gradient--tertiary-primary);\n<\/span><\/span><span class='shcb-loc'><span>}\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-selector-class\">.wp-block-quote<\/span><span class=\"hljs-selector-class\">.is-style-underline<\/span> <span class=\"hljs-selector-tag\">p<\/span>,\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-selector-class\">.wp-block-quote<\/span><span class=\"hljs-selector-class\">.is-style-underline-primary-secondary<\/span> <span class=\"hljs-selector-tag\">p<\/span>,\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-selector-class\">.wp-block-quote<\/span><span class=\"hljs-selector-class\">.is-style-underline-secondary-tertiary<\/span> <span class=\"hljs-selector-tag\">p<\/span>,\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-selector-class\">.wp-block-quote<\/span><span class=\"hljs-selector-class\">.is-style-underline-tertiary-primary<\/span> <span class=\"hljs-selector-tag\">p<\/span> {\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">background-position<\/span>: <span class=\"hljs-number\">0<\/span> <span class=\"hljs-number\">85%<\/span>;\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">background-repeat<\/span>: repeat-x;\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">background-size<\/span>: <span class=\"hljs-number\">100%<\/span> <span class=\"hljs-number\">10px<\/span>;\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">font-size<\/span>: <span class=\"hljs-built_in\">var<\/span>(--wp--preset--font-size--max-<span class=\"hljs-number\">48<\/span>);\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">font-weight<\/span>: <span class=\"hljs-built_in\">var<\/span>(--wp--custom--font-weight--medium);\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">line-height<\/span>: <span class=\"hljs-built_in\">var<\/span>(--wp--custom--line-height--one);\n<\/span><\/span><span class='shcb-loc'><span>\t<span class=\"hljs-attribute\">display<\/span>: inline;\n<\/span><\/span><span class='shcb-loc'><span>}\n<\/span><\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>. . .<\/p>\n\n\n\n<p><strong>Note:<\/strong> The code above is taken directly from the Bright Mode theme, which is available to <a href=\"https:\/\/wordpress.org\/themes\/bright-mode\/\">download for free<\/a>. Minor adjustments might be required  to create similar block styles with a different theme.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Showcase excerpts of text, inspiring words, or positive client testimonials.<\/p>\n","protected":false},"author":6,"featured_media":4584,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_EventAllDay":false,"_EventTimezone":"","_EventStartDate":"","_EventEndDate":"","_EventStartDateUTC":"","_EventEndDateUTC":"","_EventShowMap":false,"_EventShowMapLink":false,"_EventURL":"","_EventCost":"","_EventCostDescription":"","_EventCurrencySymbol":"","_EventCurrencyCode":"","_EventCurrencyPosition":"","_EventDateTimeSeparator":"","_EventTimeRangeSeparator":"","_EventOrganizerID":[],"_EventVenueID":[],"_OrganizerEmail":"","_OrganizerPhone":"","_OrganizerWebsite":"","_VenueAddress":"","_VenueCity":"","_VenueCountry":"","_VenueProvince":"","_VenueState":"","_VenueZip":"","_VenuePhone":"","_VenueURL":"","_VenueStateProvince":"","_VenueLat":"","_VenueLng":"","_VenueShowMap":false,"_VenueShowMapLink":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4581","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create a Gradient Underline Block Style for Quotes - Builders<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create a Gradient Underline Block Style for Quotes - Builders\" \/>\n<meta property=\"og:description\" content=\"Showcase excerpts of text, inspiring words, or positive client testimonials.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/\" \/>\n<meta property=\"og:site_name\" content=\"Builders\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-10T13:59:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-14T15:57:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/og-gradient-underline-block-style.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Brian Gardner\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/og-gradient-underline-block-style.jpg\" \/>\n<meta name=\"twitter:creator\" content=\"@wpebuilders\" \/>\n<meta name=\"twitter:site\" content=\"@wpebuilders\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brian Gardner\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/gradient-underline-block-style\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/gradient-underline-block-style\\\/\"},\"author\":{\"name\":\"Brian Gardner\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#\\\/schema\\\/person\\\/f582a2535c88e2c0b518703a29e82f7e\"},\"headline\":\"Create a Gradient Underline Block Style for Quotes\",\"datePublished\":\"2022-08-10T13:59:08+00:00\",\"dateModified\":\"2023-04-14T15:57:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/gradient-underline-block-style\\\/\"},\"wordCount\":337,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/gradient-underline-block-style\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wp-content\\\/uploads\\\/gradient-underline-style.jpg\",\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wpengine.com\\\/builders\\\/gradient-underline-block-style\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/gradient-underline-block-style\\\/\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/gradient-underline-block-style\\\/\",\"name\":\"Create a Gradient Underline Block Style for Quotes - Builders\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/gradient-underline-block-style\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/gradient-underline-block-style\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wp-content\\\/uploads\\\/gradient-underline-style.jpg\",\"datePublished\":\"2022-08-10T13:59:08+00:00\",\"dateModified\":\"2023-04-14T15:57:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/gradient-underline-block-style\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wpengine.com\\\/builders\\\/gradient-underline-block-style\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/gradient-underline-block-style\\\/#primaryimage\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wp-content\\\/uploads\\\/gradient-underline-style.jpg\",\"contentUrl\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wp-content\\\/uploads\\\/gradient-underline-style.jpg\",\"width\":1920,\"height\":1080,\"caption\":\"Gradient Underline Block Style for WordPress\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/gradient-underline-block-style\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a Gradient Underline Block Style for Quotes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#website\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/\",\"name\":\"Builders\",\"description\":\"Reimagining the way we build with WordPress.\",\"publisher\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#organization\",\"name\":\"WP Engine\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/WP-Engine-Horizontal@2x.png\",\"contentUrl\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/WP-Engine-Horizontal@2x.png\",\"width\":348,\"height\":68,\"caption\":\"WP Engine\"},\"image\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/wpebuilders\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCh1WuL54XFb9ZI6m6goFv1g\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#\\\/schema\\\/person\\\/f582a2535c88e2c0b518703a29e82f7e\",\"name\":\"Brian Gardner\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/25b2f9f3e3426c67d76320d27da3c32e9621a542a2c1d20d1db51139421e29f4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/25b2f9f3e3426c67d76320d27da3c32e9621a542a2c1d20d1db51139421e29f4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/25b2f9f3e3426c67d76320d27da3c32e9621a542a2c1d20d1db51139421e29f4?s=96&d=mm&r=g\",\"caption\":\"Brian Gardner\"},\"description\":\"Brian Gardner is a Principal WordPress Advocate at WP Engine. He has built on WordPress since 2006 and is the creator of Frost. Connect with him on LinkedIn and X.\",\"sameAs\":[\"https:\\\/\\\/briangardner.com\\\/\"],\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/author\\\/brian-gardner-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create a Gradient Underline Block Style for Quotes - Builders","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/","og_locale":"en_US","og_type":"article","og_title":"Create a Gradient Underline Block Style for Quotes - Builders","og_description":"Showcase excerpts of text, inspiring words, or positive client testimonials.","og_url":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/","og_site_name":"Builders","article_published_time":"2022-08-10T13:59:08+00:00","article_modified_time":"2023-04-14T15:57:39+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/og-gradient-underline-block-style.jpg","type":"image\/jpeg"}],"author":"Brian Gardner","twitter_card":"summary_large_image","twitter_image":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/og-gradient-underline-block-style.jpg","twitter_creator":"@wpebuilders","twitter_site":"@wpebuilders","twitter_misc":{"Written by":"Brian Gardner","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/#article","isPartOf":{"@id":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/"},"author":{"name":"Brian Gardner","@id":"https:\/\/wpengine.com\/builders\/#\/schema\/person\/f582a2535c88e2c0b518703a29e82f7e"},"headline":"Create a Gradient Underline Block Style for Quotes","datePublished":"2022-08-10T13:59:08+00:00","dateModified":"2023-04-14T15:57:39+00:00","mainEntityOfPage":{"@id":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/"},"wordCount":337,"commentCount":0,"publisher":{"@id":"https:\/\/wpengine.com\/builders\/#organization"},"image":{"@id":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/#primaryimage"},"thumbnailUrl":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/gradient-underline-style.jpg","articleSection":["WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/","url":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/","name":"Create a Gradient Underline Block Style for Quotes - Builders","isPartOf":{"@id":"https:\/\/wpengine.com\/builders\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/#primaryimage"},"image":{"@id":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/#primaryimage"},"thumbnailUrl":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/gradient-underline-style.jpg","datePublished":"2022-08-10T13:59:08+00:00","dateModified":"2023-04-14T15:57:39+00:00","breadcrumb":{"@id":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/#primaryimage","url":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/gradient-underline-style.jpg","contentUrl":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/gradient-underline-style.jpg","width":1920,"height":1080,"caption":"Gradient Underline Block Style for WordPress"},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/builders\/gradient-underline-block-style\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/builders\/"},{"@type":"ListItem","position":2,"name":"Create a Gradient Underline Block Style for Quotes"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/builders\/#website","url":"https:\/\/wpengine.com\/builders\/","name":"Builders","description":"Reimagining the way we build with WordPress.","publisher":{"@id":"https:\/\/wpengine.com\/builders\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/builders\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/wpengine.com\/builders\/#organization","name":"WP Engine","url":"https:\/\/wpengine.com\/builders\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/builders\/#\/schema\/logo\/image\/","url":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/2024\/05\/WP-Engine-Horizontal@2x.png","contentUrl":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/2024\/05\/WP-Engine-Horizontal@2x.png","width":348,"height":68,"caption":"WP Engine"},"image":{"@id":"https:\/\/wpengine.com\/builders\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/wpebuilders","https:\/\/www.youtube.com\/channel\/UCh1WuL54XFb9ZI6m6goFv1g"]},{"@type":"Person","@id":"https:\/\/wpengine.com\/builders\/#\/schema\/person\/f582a2535c88e2c0b518703a29e82f7e","name":"Brian Gardner","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/25b2f9f3e3426c67d76320d27da3c32e9621a542a2c1d20d1db51139421e29f4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/25b2f9f3e3426c67d76320d27da3c32e9621a542a2c1d20d1db51139421e29f4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/25b2f9f3e3426c67d76320d27da3c32e9621a542a2c1d20d1db51139421e29f4?s=96&d=mm&r=g","caption":"Brian Gardner"},"description":"Brian Gardner is a Principal WordPress Advocate at WP Engine. He has built on WordPress since 2006 and is the creator of Frost. Connect with him on LinkedIn and X.","sameAs":["https:\/\/briangardner.com\/"],"url":"https:\/\/wpengine.com\/builders\/author\/brian-gardner-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2\/"}]}},"_links":{"self":[{"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/posts\/4581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/comments?post=4581"}],"version-history":[{"count":0,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/posts\/4581\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/media\/4584"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/media?parent=4581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/categories?post=4581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/tags?post=4581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}