| @@ -173,25 +173,25 @@ | ||
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | if ( $spacing_baseline ) { |
| 177 | - $css .= 'body{--wp--custom--boldblocks--spacing--baseline:' . $spacing_baseline . ';}'; | |
| 177 | + $css .= 'body{--wp--custom--cbb--spacing--baseline:' . $spacing_baseline . ';}'; | |
| 178 | 178 | } else { |
| 179 | - $css .= 'body{--wp--custom--boldblocks--spacing--baseline: clamp(1.5rem, 5vw, 2.5rem);}'; | |
| 179 | + $css .= 'body{--wp--custom--cbb--spacing--baseline: clamp(1.5rem, 5vw, 2.5rem);}'; | |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | if ( ! $use_root_padding ) { |
| 183 | 183 | // Right and left padding are applied to the the block with alignfull class. |
| 184 | - $css .= '.wp-block-boldblocks-custom.alignfull { padding-right: var(--wp--custom--boldblocks--spacing--baseline); padding-left: var(--wp--custom--boldblocks--spacing--baseline); }'; | |
| 184 | + $css .= '.cbb-block.alignfull { padding-right: var(--wp--custom--cbb--spacing--baseline); padding-left: var(--wp--custom--cbb--spacing--baseline); }'; | |
| 185 | 185 | |
| 186 | 186 | // Alignfull descestors of the container with left and right padding have negative margins so they can still be full width. |
| 187 | - $css .= '.wp-site-blocks .wp-block-boldblocks-custom.alignfull .alignfull, .wp-block-boldblocks-custom.alignfull .alignfull { width: unset; margin-right: calc(var(--wp--custom--boldblocks--spacing--baseline) * -1) !important; margin-left: calc(var(--wp--custom--boldblocks--spacing--baseline) * -1) !important; }'; | |
| 187 | + $css .= '.wp-site-blocks .cbb-block.alignfull .alignfull, .cbb-block.alignfull .alignfull { width: unset; margin-right: calc(var(--wp--custom--cbb--spacing--baseline) * -1) !important; margin-left: calc(var(--wp--custom--cbb--spacing--baseline) * -1) !important; }'; | |
| 188 | 188 | } else { |
| 189 | 189 | // Force horizontal paddings to alignfull,has-global-padding blocks. |
| 190 | - $css .= '.wp-block-boldblocks-custom.alignfull.has-global-padding { padding-right: var(--wp--custom--boldblocks--spacing--baseline); padding-left: var(--wp--custom--boldblocks--spacing--baseline); }'; | |
| 190 | + $css .= '.cbb-block.alignfull.has-global-padding { padding-right: var(--wp--custom--cbb--spacing--baseline); padding-left: var(--wp--custom--cbb--spacing--baseline); }'; | |
| 191 | 191 | |
| 192 | 192 | // Make the nested alignfull blocks fullwidth. |
| 193 | - $css .= '.wp-block-boldblocks-custom.alignfull.has-global-padding > .alignfull { margin-right: calc(var(--wp--custom--boldblocks--spacing--baseline) * -1) !important; margin-left: calc(var(--wp--custom--boldblocks--spacing--baseline) * -1) !important; }'; | |
| 193 | + $css .= '.cbb-block.alignfull.has-global-padding > .alignfull { margin-right: calc(var(--wp--custom--cbb--spacing--baseline) * -1) !important; margin-left: calc(var(--wp--custom--cbb--spacing--baseline) * -1) !important; }'; | |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | return $css; |
| 197 | 197 | } |
| @@ -204,22 +204,22 @@ | ||
| 204 | 204 | */ |
| 205 | 205 | private function get_background_style( $use_root_padding ) { |
| 206 | 206 | $css = ''; |
| 207 | 207 | |
| 208 | - $background_padding = 'var(--wp--custom--boldblocks--spacing--background, clamp(1.25rem, 2.5vw, 2rem))'; | |
| 208 | + $background_padding = 'var(--wp--custom--cbb--spacing--background, clamp(1.25rem, 2.5vw, 2rem))'; | |
| 209 | 209 | |
| 210 | 210 | if ( ! $use_root_padding ) { |
| 211 | 211 | // Apply spacing for child blocks that have background. |
| 212 | - $css .= '.wp-block-boldblocks-custom:not(.alignfull).has-parent.has-background,.wp-block-boldblocks-custom:not(.alignfull).has-parent.bb\:has-background {padding: ' . $background_padding . ';}'; | |
| 212 | + $css .= '.cbb-block:not(.alignfull).has-parent.has-background,.cbb-block:not(.alignfull).has-parent.bb\:has-background {padding: ' . $background_padding . ';}'; | |
| 213 | 213 | |
| 214 | 214 | // Apply spacing for standalone blocks that have background. |
| 215 | - $css .= '.wp-block-boldblocks-custom:not(.alignfull):not(.has-parent).has-background,.wp-block-boldblocks-custom:not(.alignfull):not(.has-parent).bb\:has-background {padding-left: ' . $background_padding . ';padding-right: ' . $background_padding . ';}'; | |
| 215 | + $css .= '.cbb-block:not(.alignfull):not(.has-parent).has-background,.cbb-block:not(.alignfull):not(.has-parent).bb\:has-background {padding-left: ' . $background_padding . ';padding-right: ' . $background_padding . ';}'; | |
| 216 | 216 | } else { |
| 217 | 217 | // Apply horizontal spacing for cbb blocks that have background. |
| 218 | - $css .= '.wp-block-boldblocks-custom:not(.alignfull).has-background,.wp-block-boldblocks-custom:not(.alignfull).bb\:has-background {padding-left: ' . $background_padding . ';padding-right: ' . $background_padding . ';}'; | |
| 218 | + $css .= '.cbb-block:not(.alignfull).has-background,.cbb-block:not(.alignfull).bb\:has-background {padding-left: ' . $background_padding . ';padding-right: ' . $background_padding . ';}'; | |
| 219 | 219 | |
| 220 | 220 | // Apply vertical spacing for cbb child blocks that have background. |
| 221 | - $css .= '.wp-block-boldblocks-custom:not(.alignfull).has-parent.has-background,.wp-block-boldblocks-custom:not(.alignfull).has-parent.bb\:has-background {padding-top: ' . $background_padding . ';padding-bottom: ' . $background_padding . ';}'; | |
| 221 | + $css .= '.cbb-block:not(.alignfull).has-parent.has-background,.cbb-block:not(.alignfull).has-parent.bb\:has-background {padding-top: ' . $background_padding . ';padding-bottom: ' . $background_padding . ';}'; | |
| 222 | 222 | |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | return $css; |