From e6148060aec1a2c5dd7dd9d4523c704419e96494 Mon Sep 17 00:00:00 2001 From: SEO Themes Date: Sat, 23 Dec 2023 23:45:34 +0800 Subject: [PATCH] icon block fixes --- assets/css/blocks/button.css | 2 +- assets/css/blocks/template-part.css | 2 +- assets/css/components/site-blocks.css | 2 +- assets/css/editor.css | 2 +- includes/blocks/paragraph.php | 4 ++++ includes/extensions/icon.php | 29 +++++++++++++++++++++++---- includes/extensions/template-tags.php | 2 ++ includes/utility/css.php | 7 +++++-- src/scss/blocks/button.scss | 7 +++++++ src/scss/blocks/template-part.scss | 2 +- src/scss/components/site-blocks.scss | 4 ++++ src/scss/editor.scss | 2 +- src/utility/types.tsx | 8 +++++++- 13 files changed, 60 insertions(+), 13 deletions(-) diff --git a/assets/css/blocks/button.css b/assets/css/blocks/button.css index 1cc6cbc..4f41c96 100644 --- a/assets/css/blocks/button.css +++ b/assets/css/blocks/button.css @@ -1 +1 @@ -.wp-block-button{--wp--style--block-gap: var(--wp--custom--button--gap, 6px);transition:var(--wp--custom--transition);line-height:1;border-style:none;padding:0 !important}.wp-block-button:active,.wp-block-button:hover,.wp-block-button:focus{opacity:var(--wp--custom--button--hover-opacity, 1)}.wp-block-button__link{display:inline-flex;gap:var(--wp--style--block-gap)}.is-content-justification-left .wp-block-button__width-100 .wp-block-button__link{justify-content:flex-start} +.wp-block-button{--wp--style--block-gap: var(--wp--custom--button--gap, 6px);transition:var(--wp--custom--transition);line-height:1;border-style:none;padding:0 !important}.wp-block-button:active,.wp-block-button:hover,.wp-block-button:focus{opacity:var(--wp--custom--button--hover-opacity, 1)}.wp-block-button__link{display:inline-flex;gap:var(--wp--style--block-gap)}.is-content-justification-left .wp-block-button__width-100 .wp-block-button__link{justify-content:flex-start}.wp-block-button[style*="font-weight:"] .wp-element-button{font-weight:inherit} diff --git a/assets/css/blocks/template-part.css b/assets/css/blocks/template-part.css index b562c22..f32669f 100644 --- a/assets/css/blocks/template-part.css +++ b/assets/css/blocks/template-part.css @@ -1 +1 @@ -.wp-block-template-part{width:100%}header.wp-block-template-part:not(.has-z-index){z-index:3}header.wp-block-template-part:not([class*="has-display-"]){display:initial}header.wp-block-template-part:not([class*="has-position-"]){position:var(--wp--custom--header--position, relative);top:var(--wp--custom--header--top, 0)}footer.wp-block-template-part{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:center}footer.wp-block-template-part>*{width:100%}@media (min-width: 600px){.wp-block-post-template.is-flex-container.is-flex-container.columns-2>li{width:calc(50% - (var(--wp--custom--spacing--gap) * 0.5))}} +.wp-block-template-part{width:100%}header.wp-block-template-part:not(.has-z-index){z-index:3}header.wp-block-template-part:not([class*="has-position-"]){position:var(--wp--custom--header--position, relative);top:var(--wp--custom--header--top, 0)}footer.wp-block-template-part{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:center}footer.wp-block-template-part>*{width:100%}@media (min-width: 600px){.wp-block-post-template.is-flex-container.is-flex-container.columns-2>li{width:calc(50% - (var(--wp--custom--spacing--gap) * 0.5))}} diff --git a/assets/css/components/site-blocks.css b/assets/css/components/site-blocks.css index 16cbd38..df7ece6 100644 --- a/assets/css/components/site-blocks.css +++ b/assets/css/components/site-blocks.css @@ -1 +1 @@ -.wp-site-blocks{display:var(--wp--custom--site-blocks--display, grid);grid-template-rows:auto 1fr auto;grid-template-columns:1fr;width:100%;min-height:var(--wp--custom--site-blocks--min-height, 100vh);overflow-x:var(--wp--custom--site-blocks--overflow-x)}.wp-site-blocks>*+*{margin-top:0 !important}.margin-auto{margin:auto !important}.margin-top-auto{margin-top:auto !important}.margin-left-auto{margin-left:auto !important}.margin-right-auto{margin-right:auto !important}.margin-bottom-auto{margin-bottom:auto !important}.no-margin{margin:0 !important}.nowrap{white-space:nowrap !important}@media (max-width: 599px){.nowrap [class*="columns-"]{display:grid;grid-template-columns:repeat(var(--columns), 1fr)}}.wrap{white-space:normal;flex-wrap:wrap}.flex{display:flex}.justify-center{justify-content:center}.justify-space-between{justify-content:space-between}.height-100{height:100% !important}.height-auto{height:auto !important}.isolate{isolation:isolate}[style*="border-"]{border-color:var(--wp--custom--border--color)}[onclick]{cursor:pointer}.align-content-center{align-content:center}.align-stretch{align-items:stretch !important;align-self:stretch}.object-fit{object-fit:cover;object-position:center;height:100%;width:100%}header>.alignfull,footer>.alignfull,main>.alignfull{width:var(--wp--custom--alignfull--width, 100dvw) !important;margin-left:var(--wp--custom--alignfull--margin-left, calc(50% - 50dvw)) !important;margin-right:var(--wp--custom--alignfull--margin-right, calc(50% - 50dvw)) !important}.cursor-pointer{cursor:pointer} +.wp-site-blocks{display:var(--wp--custom--site-blocks--display, grid);grid-template-rows:auto 1fr auto;grid-template-columns:1fr;width:100%;min-height:var(--wp--custom--site-blocks--min-height, 100vh);overflow-x:var(--wp--custom--site-blocks--overflow-x)}.wp-site-blocks>*+*{margin-top:0 !important}.margin-auto{margin:auto !important}.margin-top-auto{margin-top:auto !important}.margin-left-auto{margin-left:auto !important}.margin-right-auto{margin-right:auto !important}.margin-bottom-auto{margin-bottom:auto !important}.no-margin{margin:0 !important}.nowrap{white-space:nowrap !important}@media (max-width: 599px){.nowrap [class*="columns-"]{display:grid;grid-template-columns:repeat(var(--columns), 1fr)}}.wrap{white-space:normal;flex-wrap:wrap}.flex{display:flex}.justify-center{justify-content:center}.justify-space-between{justify-content:space-between}.height-100{height:100% !important}.height-auto{height:auto !important}.isolate{isolation:isolate}[style*="border-"]{border-color:var(--wp--custom--border--color)}[onclick]{cursor:pointer}.align-content-center{align-content:center}.align-stretch{align-items:stretch !important;align-self:stretch}.vertical-align-top{vertical-align:top}.object-fit{object-fit:cover;object-position:center;height:100%;width:100%}header>.alignfull,footer>.alignfull,main>.alignfull{width:var(--wp--custom--alignfull--width, 100dvw) !important;margin-left:var(--wp--custom--alignfull--margin-left, calc(50% - 50dvw)) !important;margin-right:var(--wp--custom--alignfull--margin-right, calc(50% - 50dvw)) !important}.cursor-pointer{cursor:pointer} diff --git a/assets/css/editor.css b/assets/css/editor.css index f83ecdb..2fc850c 100644 --- a/assets/css/editor.css +++ b/assets/css/editor.css @@ -1 +1 @@ -code[class*="language-"],pre[class*="language-"]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;color:#c3cee3;background:#263238;font-family:Roboto Mono, monospace;font-size:1em;line-height:1.5em;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*="language-"]::-moz-selection,pre[class*="language-"]::-moz-selection,code[class*="language-"] ::-moz-selection,pre[class*="language-"] ::-moz-selection{background:#363636}code[class*="language-"]::selection,pre[class*="language-"]::selection,code[class*="language-"] ::selection,pre[class*="language-"] ::selection{background:#363636}:not(pre)>code[class*="language-"]{white-space:normal;border-radius:0.2em;padding:0.1em}pre[class*="language-"]{overflow:auto;position:relative;margin:0.5em 0;padding:1.25em 1em}.language-css>code,.language-sass>code,.language-scss>code{color:#fd9170}[class*="language-"] .namespace{opacity:0.7}.token.atrule{color:#c792ea}.token.attr-name{color:#ffcb6b}.token.attr-value{color:#c3e88d}.token.attribute{color:#c3e88d}.token.boolean{color:#c792ea}.token.builtin{color:#ffcb6b}.token.cdata{color:#80cbc4}.token.char{color:#80cbc4}.token.class{color:#ffcb6b}.token.class-name{color:#f2ff00}.token.color{color:#f2ff00}.token.comment{color:#546e7a}.token.constant{color:#c792ea}.token.deleted{color:#f07178}.token.doctype{color:#546e7a}.token.entity{color:#f07178}.token.function{color:#c792ea}.token.hexcode{color:#f2ff00}.token.id{color:#c792ea;font-weight:bold}.token.important{color:#c792ea;font-weight:bold}.token.inserted{color:#80cbc4}.token.keyword{color:#c792ea;font-style:italic}.token.number{color:#fd9170}.token.operator{color:#89ddff}.token.prolog{color:#546e7a}.token.property{color:#80cbc4}.token.pseudo-class{color:#c3e88d}.token.pseudo-element{color:#c3e88d}.token.punctuation{color:#89ddff}.token.regex{color:#f2ff00}.token.selector{color:#f07178}.token.string{color:#c3e88d}.token.symbol{color:#c792ea}.token.tag{color:#f07178}.token.unit{color:#f07178}.token.url{color:#fd9170}.token.variable{color:#f07178}.edit-site-site-icon__image[src*=".svg"]{transform:scale(0.55);background:transparent}.npm__react-simple-code-editor__textarea:focus{outline:none;box-shadow:none}html .editor-styles-wrapper{--wp--custom--html--width: auto}html .editor-styles-wrapper .wp-site-blocks{display:flow-root}html .editor-styles-wrapper .wp-block-image img{max-width:100% !important}html .editor-styles-wrapper .wp-block-image[style*="--min-width:"]>div{min-width:100% !important}html .editor-styles-wrapper [src*=".svg"]{width:100%}html .editor-styles-wrapper .wp-block-button:not(.is-style-outline){border:0 !important}.edit-post-visual-editor__post-title-wrapper{text-align:center;margin-bottom:calc(var(--wp--style--block-gap) * 2);position:relative;z-index:99}.hide-title .edit-post-visual-editor__post-title-wrapper{display:none}.is-cover-template .edit-post-visual-editor__post-title-wrapper{margin-top:0;padding-top:4rem;padding-bottom:var(--wp--style--block-gap);background-color:red}.edit-post-post-schedule ~ .components-panel__row{flex-wrap:wrap}.edit-post-post-schedule ~ .components-panel__row .components-base-control{width:100%;margin:0.5em 0}.blockify-page-title-setting{width:100%}.editor-styles-wrapper.wp-embed-responsive>div,.editor-styles-wrapper.wp-embed-responsive>iframe{pointer-events:all !important}.blockify-template-parts .components-base-control{width:100%}.blockify-controls{order:2}.blockify-controls .components-panel__row,.blockify-controls .components-base-control{width:100%}.blockify-controls .components-panel__row label,.blockify-controls .components-base-control label{width:100% !important}.blockify-controls.is-opened .components-panel__body-title{margin-bottom:1em}.blockify-controls .block-editor-panel-color-gradient-settings{border:0;padding:0}.blockify-controls .block-editor-tools-panel-color-gradient-settings__item.first{margin-top:0}.blockify-gradient-text-control .components-popover__content{padding:0.5em}.block-editor-block-inspector>div:not([class*=""]){display:flex;flex-wrap:wrap}.block-editor-block-inspector>div:not([class*=""])>*{width:100%}.is-style-toggle input{display:none}.editor-styles-wrapper .is-style-toggle .wp-block-search__inside-wrapper{background:transparent !important;min-width:0 !important}header.wp-block-template-part{z-index:3}.is-transparent-header{position:absolute}.editor-styles-wrapper .is-layout-flow>p{margin-top:var(--wp--style--block-gap, 1em)}.blockify-min-height-control{border-top:0 !important}.block-editor-block-preview__live-content .components-placeholder{display:flex !important}[class*="has-aspect-ratio-"] .components-placeholder{min-height:1em}[class*="has-aspect-ratio-"] .components-placeholder__fieldset{height:0}.is-placeholder.is-selected .components-placeholder__fieldset,.is-placeholder.has-child-selected .components-placeholder__fieldset{height:auto}.blockify-settings .components-base-control__help{margin-top:8px}.blockify-settings .block-editor-panel-color-gradient-settings{padding:8px 0 0;border:0}div:has(>.blockify-icon-settings){display:flex;flex-wrap:wrap}div:has(>.blockify-icon-settings)>div{width:100%}div:has(>.blockify-icon-settings) .components-tools-panel{display:none}.blockify-icon-settings{order:-1}.blockify-icon-settings select{text-transform:capitalize}.blockify-icon-settings div[role="listbox"]{display:grid;grid-template-columns:repeat(5, minmax(0, 1fr))}.blockify-icon-setting .components-input-control__container{width:100%}.blockify-icon-setting svg{width:2em;height:2em}.blockify-icon-setting .components-custom-select-control__button{width:100%}.blockify-icon-setting .components-custom-select-control__menu[aria-hidden="false"]{display:flex;flex-wrap:wrap}.blockify-icon-setting .components-custom-select-control__item{width:42px}.blockify-icon-setting .components-custom-select-control__item-icon{display:none}.blockify-icon-preview{margin-top:27px;position:absolute;width:220px;display:flex;flex-wrap:wrap;align-items:center;text-transform:capitalize;z-index:9;pointer-events:none}.blockify-icon-preview svg{width:24px;margin:0 8px}.is-style-icon .components-placeholder__illustration,.is-style-icon .components-placeholder__instructions{display:none !important}.is-style-icon.wp-block-site-logo .components-placeholder{min-width:0;min-height:0}.editor-styles-wrapper div .is-style-icon{background:transparent !important;float:none !important;padding:0 !important;border:0 !important;margin-left:0 !important;margin-right:0 !important;box-shadow:none !important}.editor-styles-wrapper div .is-style-icon.wp-block-button [data-rich-text-placeholder]{display:none}.editor-styles-wrapper div .is-style-icon .components-placeholder__illustration,.editor-styles-wrapper div .is-style-icon img,.editor-styles-wrapper div .is-style-icon figcaption,.editor-styles-wrapper div .is-style-icon iframe,.editor-styles-wrapper div .is-style-icon fieldset,.editor-styles-wrapper div .is-style-icon .components-placeholder__label{display:none !important}.editor-styles-wrapper div .is-style-icon.alignleft>div:first-of-type{margin-left:0}.editor-styles-wrapper div .is-style-icon.alignright>div:first-of-type{margin-right:0}.editor-styles-wrapper div .is-style-icon>div:first-of-type:not(.wp-block-button__link){border-radius:inherit !important;border-width:var(--wp--custom--icon--border-width, 0) !important;border-style:var(--wp--custom--icon--border-style, solid) !important;border-color:var(--wp--custom--icon--border-color, currentColor) !important;background:var(--wp--custom--icon--background, transparent) !important;color:inherit !important;box-shadow:none;background-color:var(--wp--custom--icon--background, transparent) !important;padding:var(--wp--custom--icon--padding, 0)}.editor-styles-wrapper div .is-style-icon>div:first-of-type{display:inline-flex;position:relative;margin-left:auto;margin-right:auto;width:auto !important;height:auto !important;min-height:0;min-width:var(--wp--custom--icon--size, 30px)}.editor-styles-wrapper div .is-style-icon>div:first-of-type::after{content:"";display:inline-block;position:relative;background:var(--wp--custom--icon--color, currentColor);width:var(--wp--custom--icon--size, 1em);height:var(--wp--custom--icon--size, 1em);margin:auto;vertical-align:text-bottom;order:var(--wp--custom--icon--order, 0);-webkit-mask-image:var(--wp--custom--icon--url);-webkit-mask-position:center;-webkit-mask-repeat:no-repeat;-webkit-mask-size:cover !important}.wp-block-image.wp-block-image.is-selected .components-placeholder{box-shadow:none;background-color:transparent}.blockify-icon-popover>div>div{padding:16px;width:260px}.blockify-icon-color.is-opened{padding:0;border:0}.blockify-icon-color.is-opened .components-panel__body-title{margin:0}.blockify-icon-color.is-opened .components-panel__body-title button{padding:0 0 10px}.blockify-icon-color.is-opened .components-panel__body-title svg{display:none}.blockify-overflow-control{align-content:flex-start;align-items:flex-start;gap:8px}.blockify-icon-color{padding:0 !important;border-top:0 !important}.blockify-icon-color h2,.blockify-icon-color .components-dropdown-menu{display:none}.wp-block-video>div,.components-placeholder{border-radius:inherit !important}.is-layout-constrained>.wp-block-video:not([class*="align"]){max-width:100%}.blockify-animation-format>div,.blockify-underline-format>div{padding:1em;display:flex;flex-wrap:wrap;width:20em;gap:1em}.blockify-animation-format>div>div,.blockify-animation-format>div select,.blockify-underline-format>div>div,.blockify-underline-format>div select{width:100%}.blockify-conic-gradient-settings{padding:1.5em 0 0 !important;border:0 !important}.blockify-conic-gradient-settings h2{margin-bottom:1em !important}.blockify-conic-gradient-settings .components-dropdown-menu__toggle{display:none}.blockify-conic-gradient-settings>div{margin-top:0 !important}[aria-label="Gradient: Conic"]{background:var(--wp--preset--gradient--conic) !important}div .wp-block-navigation__responsive-close{max-width:none}.block-editor-block-preview__container{background:var(--wp--custom--body--background, var(--wp--preset--color--white, #fff))}.edit-site-global-styles-preview__iframe{pointer-events:none}.editor-styles-wrapper .wp-block-navigation.is-vertical{margin-top:var(--wp--style--block-gap, 1em)}.wp-block-navigation:not(.is-vertical) .wp-block-navigation-item__content{white-space:nowrap}.is-dark-theme .components-placeholder.has-illustration,.components-placeholder.has-illustration::before{opacity:1;background:transparent}.is-style-icon .is-dark-theme .components-placeholder.has-illustration,.is-style-icon .components-placeholder.has-illustration::before{display:none}.components-placeholder__illustration{stroke-width:var(--wp--custom--border--width);stroke-opacity:1;border-width:var(--wp--custom--border--width, 1px);border-style:var(--wp--custom--placeholder--border-style, dashed);stroke-dasharray:3;border-color:var(--wp--custom--border--color, currentColor);stroke:var(--wp--custom--border--color, currentColor);border-radius:var(--wp--custom--border--radius, 0);color:var(--wp--preset--color--outline);opacity:0}.components-placeholder.has-illustration{backdrop-filter:none;border:0;overflow:inherit;background:var(--wp--custom--placeholder--background, var(--wp--custom--surface--background))}.has-background>.components-placeholder.has-illustration{background:transparent}.blockify-width-control .components-flex-item{width:50%}.blockify-width-control .components-flex-item .components-flex-item{width:100%}.blockify-font-size-control>div,.blockify-font-family-control>div{width:240px;padding:1em}.blockify-controls-tabs .components-tab-panel__tabs{margin:-16px -16px 16px;box-shadow:inset 0 -1px 0 0 #e0e0e0}.blockify-controls-tabs svg{height:24px}.blockify-controls-tabs small{display:block;font-size:12px;font-style:normal;color:#757575}.blockify-svg-control>div{padding:16px}.blockify-svg-controls{order:-1}.is-style-svg>div{display:flex}.blockify-control-label{font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase;display:inline-flex;align-items:center;gap:4px;margin:8px 0;padding:0}.blockify-control-label+.components-button-group{display:flex}.blockify-animate-controls .components-flex-item:last-of-type>div{margin-bottom:0}.blockify-controls hr+.components-panel__row{margin-top:-6px}.is-selected.is-marquee>*,.has-child-selected.is-marquee>*{animation:0 !important;animation-direction:normal !important;transform:none !important}.is-marquee.wp-block{flex-direction:row !important}@media (prefers-reduced-motion){.is-marquee.wp-block>*{animation-direction:normal !important}}.is-marquee.is-selected,.is-marquee.has-child-selected{animation:0 !important;animation-direction:normal !important;transform:none !important}body .is-marquee{min-width:100%}img[style*="toggle-switch"]{position:absolute;left:4px}.inherit-layout>*:not(.alignfull,.alignwide){max-width:var(--wp--custom--layout--content-size)}.is-layout-constrained>.alignwide{max-width:100%}.wp-block-post-content:not(.is-root-container)>.alignwide{width:100%;min-width:var(--wp--style--global--wide-size) !important;margin-left:50%;transform:translateX(-50%)}.is-style-accordion{list-style:none;padding:0;margin:0}.is-style-accordion ul{list-style:none}.is-style-accordion li{width:100%;position:relative}.is-style-accordion li div{position:relative}.is-style-accordion li div::after,.is-style-accordion li div::before{content:"";margin:0.75em 0 0 0;width:12px;height:1.5px;display:inline-block !important;background:currentcolor;position:absolute;right:0;top:0}.is-style-accordion li div::after{transform:rotate(90deg)}.blockify-filter-settings{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px 8px}.blockify-filter-settings .components-input-control{margin-bottom:0 !important}.blockify-flex-controls{margin-bottom:16px !important}.blockify-flex-controls:last-of-type{margin-bottom:0 !important}.blockify-flex-controls .components-flex-item{flex:1;max-width:100%}.blockify-flex-controls .components-flex-item label{display:flex !important}.blockify-animate-controls .blockify-flex-controls{align-items:flex-start}.blockify-flex-controls .block-editor-panel-color-gradient-settings{padding:0}.blockify-flex-controls .block-editor-tools-panel-color-gradient-settings__item{margin:0 !important;padding:0 !important;border-top:0}.blockify-filter-settings .components-flex-item{max-width:100%}.blockify-filter-settings .components-flex-item label{display:flex !important}.blockify-tools-panel .components-button-group{display:flex}.blockify-tools-panel input[type="number"]::-webkit-inner-spin-button,.blockify-tools-panel input[type="number"]::-webkit-outer-spin-button{opacity:1}.blockify-tools-panel .components-button{min-width:30px !important}.blockify-tools-panel .components-tools-panel-item{padding-top:16px;margin-top:8px;position:relative}.blockify-tools-panel .components-tools-panel-item::before{content:"";display:block;position:absolute;top:0;left:-16px;right:-16px;border-top:1px solid #e0e0e0}.blockify-tools-panel .components-tools-panel-item:first-of-type::before{display:none}.blockify-tools-panel .components-tools-panel-header+.components-tools-panel-item{padding-top:0;margin-top:0}.blockify-tools-panel .components-tools-panel-header+.components-tools-panel-item::before{display:none}.blockify-display-controls,.blockify-animate-controls{flex-wrap:wrap}.entities-saved-states__text-prompt+.is-opened strong{text-transform:capitalize}.blockify-shadow-presets{display:grid;grid-template-columns:repeat(4, 1fr);justify-content:space-between;gap:12px;width:100%;margin-bottom:16px}.blockify-shadow-presets .components-button{display:flex;justify-content:center;height:54px;width:54px;border-radius:60px !important;font-size:10px !important;box-shadow:var(--wp--custom--button--box-shadow)}.blockify-shadow-presets .has-xxs-shadow,.blockify-shadow-presets .has-xxs-shadow-hover{box-shadow:var(--wp--preset--shadow--xxs)}.blockify-shadow-presets .has-xxs-shadow-hover:hover,.blockify-shadow-presets .has-xxs-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--xxs)}.blockify-shadow-presets .has-xs-shadow,.blockify-shadow-presets .has-xs-shadow-hover{box-shadow:var(--wp--preset--shadow--xs)}.blockify-shadow-presets .has-xs-shadow-hover:hover,.blockify-shadow-presets .has-xs-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--xs)}.blockify-shadow-presets .has-sm-shadow,.blockify-shadow-presets .has-sm-shadow-hover{box-shadow:var(--wp--preset--shadow--sm)}.blockify-shadow-presets .has-sm-shadow-hover:hover,.blockify-shadow-presets .has-sm-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--sm)}.blockify-shadow-presets .has-md-shadow,.blockify-shadow-presets .has-md-shadow-hover{box-shadow:var(--wp--preset--shadow--md)}.blockify-shadow-presets .has-md-shadow-hover:hover,.blockify-shadow-presets .has-md-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--md)}.blockify-shadow-presets .has-lg-shadow,.blockify-shadow-presets .has-lg-shadow-hover{box-shadow:var(--wp--preset--shadow--lg)}.blockify-shadow-presets .has-lg-shadow-hover:hover,.blockify-shadow-presets .has-lg-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--lg)}.blockify-shadow-presets .has-xl-shadow,.blockify-shadow-presets .has-xl-shadow-hover{box-shadow:var(--wp--preset--shadow--xl)}.blockify-shadow-presets .has-xl-shadow-hover:hover,.blockify-shadow-presets .has-xl-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--xl)}.blockify-shadow-presets .has-xxl-shadow,.blockify-shadow-presets .has-xxl-shadow-hover{box-shadow:var(--wp--preset--shadow--xxl)}.blockify-shadow-presets .has-xxl-shadow-hover:hover,.blockify-shadow-presets .has-xxl-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--xxl)}.block-editor-link-control__search-item-top{flex-wrap:wrap}.block-editor-link-control__search-item-action.block-editor-link-control__unlink{margin-left:0}.post-type-download .is-root-container.wp-block-post-content{max-width:var(--wp--style--global--content-size, 90%);margin-bottom:var(--wp--style--block-gap, 1em)}.edit-site-visual-editor>.components-resizable-box__container{height:100% !important}.is-selected.is-style-surface::after{backdrop-filter:none !important;pointer-events:none}.post-type-wp_block .alignfull .alignfull{max-width:100%;margin-left:auto !important;margin-right:auto !important} +code[class*="language-"],pre[class*="language-"]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;color:#c3cee3;background:#263238;font-family:Roboto Mono, monospace;font-size:1em;line-height:1.5em;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*="language-"]::-moz-selection,pre[class*="language-"]::-moz-selection,code[class*="language-"] ::-moz-selection,pre[class*="language-"] ::-moz-selection{background:#363636}code[class*="language-"]::selection,pre[class*="language-"]::selection,code[class*="language-"] ::selection,pre[class*="language-"] ::selection{background:#363636}:not(pre)>code[class*="language-"]{white-space:normal;border-radius:0.2em;padding:0.1em}pre[class*="language-"]{overflow:auto;position:relative;margin:0.5em 0;padding:1.25em 1em}.language-css>code,.language-sass>code,.language-scss>code{color:#fd9170}[class*="language-"] .namespace{opacity:0.7}.token.atrule{color:#c792ea}.token.attr-name{color:#ffcb6b}.token.attr-value{color:#c3e88d}.token.attribute{color:#c3e88d}.token.boolean{color:#c792ea}.token.builtin{color:#ffcb6b}.token.cdata{color:#80cbc4}.token.char{color:#80cbc4}.token.class{color:#ffcb6b}.token.class-name{color:#f2ff00}.token.color{color:#f2ff00}.token.comment{color:#546e7a}.token.constant{color:#c792ea}.token.deleted{color:#f07178}.token.doctype{color:#546e7a}.token.entity{color:#f07178}.token.function{color:#c792ea}.token.hexcode{color:#f2ff00}.token.id{color:#c792ea;font-weight:bold}.token.important{color:#c792ea;font-weight:bold}.token.inserted{color:#80cbc4}.token.keyword{color:#c792ea;font-style:italic}.token.number{color:#fd9170}.token.operator{color:#89ddff}.token.prolog{color:#546e7a}.token.property{color:#80cbc4}.token.pseudo-class{color:#c3e88d}.token.pseudo-element{color:#c3e88d}.token.punctuation{color:#89ddff}.token.regex{color:#f2ff00}.token.selector{color:#f07178}.token.string{color:#c3e88d}.token.symbol{color:#c792ea}.token.tag{color:#f07178}.token.unit{color:#f07178}.token.url{color:#fd9170}.token.variable{color:#f07178}.edit-site-site-icon__image[src*=".svg"]{transform:scale(0.55);background:transparent}.npm__react-simple-code-editor__textarea:focus{outline:none;box-shadow:none}html .editor-styles-wrapper{--wp--custom--html--width: auto}html .editor-styles-wrapper .wp-site-blocks{display:flow-root}html .editor-styles-wrapper .wp-block-image img{max-width:100% !important}html .editor-styles-wrapper .wp-block-image[style*="--min-width:"]>div{min-width:100% !important}html .editor-styles-wrapper [src*=".svg"]{width:100%}html .editor-styles-wrapper .wp-block-button:not(.is-style-outline){border:0 !important}.edit-post-visual-editor__post-title-wrapper{text-align:center;margin-bottom:calc(var(--wp--style--block-gap) * 2);position:relative;z-index:99}.hide-title .edit-post-visual-editor__post-title-wrapper{display:none}.is-cover-template .edit-post-visual-editor__post-title-wrapper{margin-top:0;padding-top:4rem;padding-bottom:var(--wp--style--block-gap);background-color:red}.edit-post-post-schedule ~ .components-panel__row{flex-wrap:wrap}.edit-post-post-schedule ~ .components-panel__row .components-base-control{width:100%;margin:0.5em 0}.blockify-page-title-setting{width:100%}.editor-styles-wrapper.wp-embed-responsive>div,.editor-styles-wrapper.wp-embed-responsive>iframe{pointer-events:all !important}.blockify-template-parts .components-base-control{width:100%}.blockify-controls{order:2}.blockify-controls .components-panel__row,.blockify-controls .components-base-control{width:100%}.blockify-controls .components-panel__row label,.blockify-controls .components-base-control label{width:100% !important}.blockify-controls.is-opened .components-panel__body-title{margin-bottom:1em}.blockify-controls .block-editor-panel-color-gradient-settings{border:0;padding:0}.blockify-controls .block-editor-tools-panel-color-gradient-settings__item.first{margin-top:0}.blockify-gradient-text-control .components-popover__content{padding:0.5em}.block-editor-block-inspector>div:not([class*=""]){display:flex;flex-wrap:wrap}.block-editor-block-inspector>div:not([class*=""])>*{width:100%}.is-style-toggle input{display:none}.editor-styles-wrapper .is-style-toggle .wp-block-search__inside-wrapper{background:transparent !important;min-width:0 !important}header.wp-block-template-part{z-index:3}.is-transparent-header{position:absolute}.editor-styles-wrapper .is-layout-flow>p{margin-top:var(--wp--style--block-gap, 1em)}.blockify-min-height-control{border-top:0 !important}.block-editor-block-preview__live-content .components-placeholder{display:flex !important}[class*="has-aspect-ratio-"] .components-placeholder{min-height:1em}[class*="has-aspect-ratio-"] .components-placeholder__fieldset{height:0}.is-placeholder.is-selected .components-placeholder__fieldset,.is-placeholder.has-child-selected .components-placeholder__fieldset{height:auto}.blockify-settings .components-base-control__help{margin-top:8px}.blockify-settings .block-editor-panel-color-gradient-settings{padding:8px 0 0;border:0}div:has(>.blockify-icon-settings){display:flex;flex-wrap:wrap}div:has(>.blockify-icon-settings)>div{width:100%}div:has(>.blockify-icon-settings) .components-tools-panel{display:none}.blockify-icon-settings{order:-1}.blockify-icon-settings select{text-transform:capitalize}.blockify-icon-settings div[role="listbox"]{display:grid;grid-template-columns:repeat(5, minmax(0, 1fr))}.blockify-icon-setting .components-input-control__container{width:100%}.blockify-icon-setting svg{width:2em;height:2em}.blockify-icon-setting .components-custom-select-control__button{width:100%}.blockify-icon-setting .components-custom-select-control__menu[aria-hidden="false"]{display:flex;flex-wrap:wrap}.blockify-icon-setting .components-custom-select-control__item{width:42px}.blockify-icon-setting .components-custom-select-control__item-icon{display:none}.blockify-icon-preview{margin-top:27px;position:absolute;width:220px;display:flex;flex-wrap:wrap;align-items:center;text-transform:capitalize;z-index:9;pointer-events:none}.blockify-icon-preview svg{width:24px;margin:0 8px}.is-style-icon .components-placeholder__illustration,.is-style-icon .components-placeholder__instructions{display:none !important}.is-style-icon.wp-block-site-logo .components-placeholder{min-width:0;min-height:0}.editor-styles-wrapper div [style*="--wp--custom--icon--url:"]{background:transparent !important;float:none !important;padding:0 !important;border:0 !important;margin-left:0 !important;margin-right:0 !important;box-shadow:none !important}.editor-styles-wrapper div [style*="--wp--custom--icon--url:"].wp-block-button [data-rich-text-placeholder]{display:none}.editor-styles-wrapper div [style*="--wp--custom--icon--url:"] .components-placeholder__illustration,.editor-styles-wrapper div [style*="--wp--custom--icon--url:"] img,.editor-styles-wrapper div [style*="--wp--custom--icon--url:"] figcaption,.editor-styles-wrapper div [style*="--wp--custom--icon--url:"] iframe,.editor-styles-wrapper div [style*="--wp--custom--icon--url:"] fieldset,.editor-styles-wrapper div [style*="--wp--custom--icon--url:"] .components-placeholder__label{display:none !important}.editor-styles-wrapper div [style*="--wp--custom--icon--url:"].alignleft>div:first-of-type{margin-left:0}.editor-styles-wrapper div [style*="--wp--custom--icon--url:"].alignright>div:first-of-type{margin-right:0}.editor-styles-wrapper div [style*="--wp--custom--icon--url:"]>div:first-of-type:not(.wp-block-button__link){border-radius:inherit !important;border-width:var(--wp--custom--icon--border-width, 0) !important;border-style:var(--wp--custom--icon--border-style, solid) !important;border-color:var(--wp--custom--icon--border-color, currentColor) !important;background:var(--wp--custom--icon--background, transparent) !important;color:inherit !important;box-shadow:none;background-color:var(--wp--custom--icon--background, transparent) !important;padding:var(--wp--custom--icon--padding, 0)}.editor-styles-wrapper div [style*="--wp--custom--icon--url:"]>div:first-of-type{display:inline-flex;position:relative;margin-left:auto;margin-right:auto;width:auto !important;height:auto !important;min-height:0;min-width:var(--wp--custom--icon--size, 30px)}.editor-styles-wrapper div [style*="--wp--custom--icon--url:"]>div:first-of-type::after{content:"";display:inline-block;position:relative;background:var(--wp--custom--icon--color, currentColor);width:var(--wp--custom--icon--size, 1em);height:var(--wp--custom--icon--size, 1em);margin:auto;vertical-align:text-bottom;order:var(--wp--custom--icon--order, 0);-webkit-mask-image:var(--wp--custom--icon--url);-webkit-mask-position:center;-webkit-mask-repeat:no-repeat;-webkit-mask-size:cover !important}.wp-block-image.wp-block-image.is-selected .components-placeholder{box-shadow:none;background-color:transparent}.blockify-icon-popover>div>div{padding:16px;width:260px}.blockify-icon-color.is-opened{padding:0;border:0}.blockify-icon-color.is-opened .components-panel__body-title{margin:0}.blockify-icon-color.is-opened .components-panel__body-title button{padding:0 0 10px}.blockify-icon-color.is-opened .components-panel__body-title svg{display:none}.blockify-overflow-control{align-content:flex-start;align-items:flex-start;gap:8px}.blockify-icon-color{padding:0 !important;border-top:0 !important}.blockify-icon-color h2,.blockify-icon-color .components-dropdown-menu{display:none}.wp-block-video>div,.components-placeholder{border-radius:inherit !important}.is-layout-constrained>.wp-block-video:not([class*="align"]){max-width:100%}.blockify-animation-format>div,.blockify-underline-format>div{padding:1em;display:flex;flex-wrap:wrap;width:20em;gap:1em}.blockify-animation-format>div>div,.blockify-animation-format>div select,.blockify-underline-format>div>div,.blockify-underline-format>div select{width:100%}.blockify-conic-gradient-settings{padding:1.5em 0 0 !important;border:0 !important}.blockify-conic-gradient-settings h2{margin-bottom:1em !important}.blockify-conic-gradient-settings .components-dropdown-menu__toggle{display:none}.blockify-conic-gradient-settings>div{margin-top:0 !important}[aria-label="Gradient: Conic"]{background:var(--wp--preset--gradient--conic) !important}div .wp-block-navigation__responsive-close{max-width:none}.block-editor-block-preview__container{background:var(--wp--custom--body--background, var(--wp--preset--color--white, #fff))}.edit-site-global-styles-preview__iframe{pointer-events:none}.editor-styles-wrapper .wp-block-navigation.is-vertical{margin-top:var(--wp--style--block-gap, 1em)}.wp-block-navigation:not(.is-vertical) .wp-block-navigation-item__content{white-space:nowrap}.is-dark-theme .components-placeholder.has-illustration,.components-placeholder.has-illustration::before{opacity:1;background:transparent}.is-style-icon .is-dark-theme .components-placeholder.has-illustration,.is-style-icon .components-placeholder.has-illustration::before{display:none}.components-placeholder__illustration{stroke-width:var(--wp--custom--border--width);stroke-opacity:1;border-width:var(--wp--custom--border--width, 1px);border-style:var(--wp--custom--placeholder--border-style, dashed);stroke-dasharray:3;border-color:var(--wp--custom--border--color, currentColor);stroke:var(--wp--custom--border--color, currentColor);border-radius:var(--wp--custom--border--radius, 0);color:var(--wp--preset--color--outline);opacity:0}.components-placeholder.has-illustration{backdrop-filter:none;border:0;overflow:inherit;background:var(--wp--custom--placeholder--background, var(--wp--custom--surface--background))}.has-background>.components-placeholder.has-illustration{background:transparent}.blockify-width-control .components-flex-item{width:50%}.blockify-width-control .components-flex-item .components-flex-item{width:100%}.blockify-font-size-control>div,.blockify-font-family-control>div{width:240px;padding:1em}.blockify-controls-tabs .components-tab-panel__tabs{margin:-16px -16px 16px;box-shadow:inset 0 -1px 0 0 #e0e0e0}.blockify-controls-tabs svg{height:24px}.blockify-controls-tabs small{display:block;font-size:12px;font-style:normal;color:#757575}.blockify-svg-control>div{padding:16px}.blockify-svg-controls{order:-1}.is-style-svg>div{display:flex}.blockify-control-label{font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase;display:inline-flex;align-items:center;gap:4px;margin:8px 0;padding:0}.blockify-control-label+.components-button-group{display:flex}.blockify-animate-controls .components-flex-item:last-of-type>div{margin-bottom:0}.blockify-controls hr+.components-panel__row{margin-top:-6px}.is-selected.is-marquee>*,.has-child-selected.is-marquee>*{animation:0 !important;animation-direction:normal !important;transform:none !important}.is-marquee.wp-block{flex-direction:row !important}@media (prefers-reduced-motion){.is-marquee.wp-block>*{animation-direction:normal !important}}.is-marquee.is-selected,.is-marquee.has-child-selected{animation:0 !important;animation-direction:normal !important;transform:none !important}body .is-marquee{min-width:100%}img[style*="toggle-switch"]{position:absolute;left:4px}.inherit-layout>*:not(.alignfull,.alignwide){max-width:var(--wp--custom--layout--content-size)}.is-layout-constrained>.alignwide{max-width:100%}.wp-block-post-content:not(.is-root-container)>.alignwide{width:100%;min-width:var(--wp--style--global--wide-size) !important;margin-left:50%;transform:translateX(-50%)}.is-style-accordion{list-style:none;padding:0;margin:0}.is-style-accordion ul{list-style:none}.is-style-accordion li{width:100%;position:relative}.is-style-accordion li div{position:relative}.is-style-accordion li div::after,.is-style-accordion li div::before{content:"";margin:0.75em 0 0 0;width:12px;height:1.5px;display:inline-block !important;background:currentcolor;position:absolute;right:0;top:0}.is-style-accordion li div::after{transform:rotate(90deg)}.blockify-filter-settings{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px 8px}.blockify-filter-settings .components-input-control{margin-bottom:0 !important}.blockify-flex-controls{margin-bottom:16px !important}.blockify-flex-controls:last-of-type{margin-bottom:0 !important}.blockify-flex-controls .components-flex-item{flex:1;max-width:100%}.blockify-flex-controls .components-flex-item label{display:flex !important}.blockify-animate-controls .blockify-flex-controls{align-items:flex-start}.blockify-flex-controls .block-editor-panel-color-gradient-settings{padding:0}.blockify-flex-controls .block-editor-tools-panel-color-gradient-settings__item{margin:0 !important;padding:0 !important;border-top:0}.blockify-filter-settings .components-flex-item{max-width:100%}.blockify-filter-settings .components-flex-item label{display:flex !important}.blockify-tools-panel .components-button-group{display:flex}.blockify-tools-panel input[type="number"]::-webkit-inner-spin-button,.blockify-tools-panel input[type="number"]::-webkit-outer-spin-button{opacity:1}.blockify-tools-panel .components-button{min-width:30px !important}.blockify-tools-panel .components-tools-panel-item{padding-top:16px;margin-top:8px;position:relative}.blockify-tools-panel .components-tools-panel-item::before{content:"";display:block;position:absolute;top:0;left:-16px;right:-16px;border-top:1px solid #e0e0e0}.blockify-tools-panel .components-tools-panel-item:first-of-type::before{display:none}.blockify-tools-panel .components-tools-panel-header+.components-tools-panel-item{padding-top:0;margin-top:0}.blockify-tools-panel .components-tools-panel-header+.components-tools-panel-item::before{display:none}.blockify-display-controls,.blockify-animate-controls{flex-wrap:wrap}.entities-saved-states__text-prompt+.is-opened strong{text-transform:capitalize}.blockify-shadow-presets{display:grid;grid-template-columns:repeat(4, 1fr);justify-content:space-between;gap:12px;width:100%;margin-bottom:16px}.blockify-shadow-presets .components-button{display:flex;justify-content:center;height:54px;width:54px;border-radius:60px !important;font-size:10px !important;box-shadow:var(--wp--custom--button--box-shadow)}.blockify-shadow-presets .has-xxs-shadow,.blockify-shadow-presets .has-xxs-shadow-hover{box-shadow:var(--wp--preset--shadow--xxs)}.blockify-shadow-presets .has-xxs-shadow-hover:hover,.blockify-shadow-presets .has-xxs-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--xxs)}.blockify-shadow-presets .has-xs-shadow,.blockify-shadow-presets .has-xs-shadow-hover{box-shadow:var(--wp--preset--shadow--xs)}.blockify-shadow-presets .has-xs-shadow-hover:hover,.blockify-shadow-presets .has-xs-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--xs)}.blockify-shadow-presets .has-sm-shadow,.blockify-shadow-presets .has-sm-shadow-hover{box-shadow:var(--wp--preset--shadow--sm)}.blockify-shadow-presets .has-sm-shadow-hover:hover,.blockify-shadow-presets .has-sm-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--sm)}.blockify-shadow-presets .has-md-shadow,.blockify-shadow-presets .has-md-shadow-hover{box-shadow:var(--wp--preset--shadow--md)}.blockify-shadow-presets .has-md-shadow-hover:hover,.blockify-shadow-presets .has-md-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--md)}.blockify-shadow-presets .has-lg-shadow,.blockify-shadow-presets .has-lg-shadow-hover{box-shadow:var(--wp--preset--shadow--lg)}.blockify-shadow-presets .has-lg-shadow-hover:hover,.blockify-shadow-presets .has-lg-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--lg)}.blockify-shadow-presets .has-xl-shadow,.blockify-shadow-presets .has-xl-shadow-hover{box-shadow:var(--wp--preset--shadow--xl)}.blockify-shadow-presets .has-xl-shadow-hover:hover,.blockify-shadow-presets .has-xl-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--xl)}.blockify-shadow-presets .has-xxl-shadow,.blockify-shadow-presets .has-xxl-shadow-hover{box-shadow:var(--wp--preset--shadow--xxl)}.blockify-shadow-presets .has-xxl-shadow-hover:hover,.blockify-shadow-presets .has-xxl-shadow-hover:focus{box-shadow:var(--wp--preset--shadow--xxl)}.block-editor-link-control__search-item-top{flex-wrap:wrap}.block-editor-link-control__search-item-action.block-editor-link-control__unlink{margin-left:0}.post-type-download .is-root-container.wp-block-post-content{max-width:var(--wp--style--global--content-size, 90%);margin-bottom:var(--wp--style--block-gap, 1em)}.edit-site-visual-editor>.components-resizable-box__container{height:100% !important}.is-selected.is-style-surface::after{backdrop-filter:none !important;pointer-events:none}.post-type-wp_block .alignfull .alignfull{max-width:100%;margin-left:auto !important;margin-right:auto !important} diff --git a/includes/blocks/paragraph.php b/includes/blocks/paragraph.php index a40511b..c08757f 100644 --- a/includes/blocks/paragraph.php +++ b/includes/blocks/paragraph.php @@ -48,6 +48,10 @@ function render_paragraph_block( string $html, array $block ): string { $html = render_curved_text( $html, $block, $svg_string ); } + if ( str_contains( $html, 'http://http' ) ) { + $html = str_replace( 'http://http', 'http', $html ); + } + return $html; } diff --git a/includes/extensions/icon.php b/includes/extensions/icon.php index 05d6545..69c5c6c 100644 --- a/includes/extensions/icon.php +++ b/includes/extensions/icon.php @@ -127,9 +127,6 @@ function get_icon_html( string $content, array $block ): string { $figure_classes[] = "has-{$text_color}-color"; } - $figure->setAttribute( 'class', implode( ' ', $figure_classes ) ); - $span->setAttribute( 'class', implode( ' ', $span_classes ) ); - $aria_label = $img->getAttribute( 'alt' ) ? $img->getAttribute( 'alt' ) : str_replace( '-', ' ', $icon_name ) . __( ' icon', 'blockify' ); $span->setAttribute( 'title', $attrs['title'] ?? $aria_label ); @@ -189,10 +186,28 @@ function get_icon_html( string $content, array $block ): string { $figure_styles['--wp--custom--icon--color'] = $custom_text_color; } + $background_color = $attrs['backgroundColor'] ?? null; + + if ( $background_color ) { + $figure_styles['--wp--custom--icon--background'] = "var(--wp--preset--color--{$background_color})"; + } + if ( $gradient ) { $figure_styles['--wp--custom--icon--color'] = "var(--wp--preset--gradient--{$gradient})"; } + $border_radius = $attrs['style']['border']['radius'] ?? null; + + if ( $border_radius ) { + $span_styles['border-radius'] = $border_radius; + } + + $padding = $attrs['style']['spacing']['padding'] ?? null; + + if ( $padding ) { + $span_styles = add_shorthand_property( $span_styles, 'padding', $padding ); + } + $transform = $attrs['style']['transform'] ?? []; $transform_units = [ 'rotate' => 'deg', @@ -214,6 +229,8 @@ function get_icon_html( string $content, array $block ): string { } } + $figure->setAttribute( 'class', implode( ' ', $figure_classes ) ); + $span->setAttribute( 'class', implode( ' ', $span_classes ) ); $figure->setAttribute( 'style', css_array_to_string( $figure_styles ) ); $span->setAttribute( 'style', css_array_to_string( $span_styles ) ); @@ -236,7 +253,11 @@ function get_icon_html( string $content, array $block ): string { } } - return $dom->saveHTML(); + $html = $dom->saveHTML(); + $html = add_position_classes( $html, $block ); + $html = add_position_styles( $html, $block ); + + return $html; } /** diff --git a/includes/extensions/template-tags.php b/includes/extensions/template-tags.php index 7aa4eb5..342fc90 100644 --- a/includes/extensions/template-tags.php +++ b/includes/extensions/template-tags.php @@ -28,6 +28,7 @@ use function shortcode_exists; use function str_contains; use function str_replace; +use function strtolower; add_filter( 'render_block', NS . 'render_template_tags', 8, 3 ); /** @@ -82,6 +83,7 @@ function render_template_tags( string $html, array $block, WP_Block $object ): s $replacements = []; foreach ( $without_brackets as $tag ) { + $tag = strtolower( $tag ); $replacement = ''; if ( shortcode_exists( $tag ) ) { diff --git a/includes/utility/css.php b/includes/utility/css.php index 749fa9a..d9aa5db 100644 --- a/includes/utility/css.php +++ b/includes/utility/css.php @@ -108,8 +108,11 @@ function format_custom_property( string $custom_property ): string { (array) ( $global_settings['color']['palette']['theme'] ?? [] ), (array) $theme_json->settings->color->palette ); - - $color_slugs = wp_list_pluck( $colors, 'slug' ); + + $color_slugs = array_diff( + wp_list_pluck( $colors, 'slug' ), + get_system_colors() + ); if ( in_array( $custom_property, $color_slugs, true ) ) { return "var(--wp--preset--color--{$custom_property})"; diff --git a/src/scss/blocks/button.scss b/src/scss/blocks/button.scss index cc2dfd9..a0d8613 100644 --- a/src/scss/blocks/button.scss +++ b/src/scss/blocks/button.scss @@ -20,5 +20,12 @@ justify-content: flex-start; } } + + &[style*="font-weight:"] { + + .wp-element-button { + font-weight: inherit; + } + } } diff --git a/src/scss/blocks/template-part.scss b/src/scss/blocks/template-part.scss index f1d2ef0..51c0fc8 100644 --- a/src/scss/blocks/template-part.scss +++ b/src/scss/blocks/template-part.scss @@ -9,7 +9,7 @@ header.wp-block-template-part { } &:not([class*="has-display-"]) { - display: initial; // Required for nested sticky elements to work. + // display: initial; // Required for nested sticky elements to work. } &:not([class*="has-position-"]) { diff --git a/src/scss/components/site-blocks.scss b/src/scss/components/site-blocks.scss index 5dd5573..ce80803 100644 --- a/src/scss/components/site-blocks.scss +++ b/src/scss/components/site-blocks.scss @@ -98,6 +98,10 @@ align-self: stretch; } +.vertical-align-top { + vertical-align: top; +} + .object-fit { object-fit: cover; object-position: center; diff --git a/src/scss/editor.scss b/src/scss/editor.scss index 54fe35b..a0fdb12 100644 --- a/src/scss/editor.scss +++ b/src/scss/editor.scss @@ -303,7 +303,7 @@ div:has(> .blockify-icon-settings) { min-height: 0; } -.editor-styles-wrapper div .is-style-icon { +.editor-styles-wrapper div [style*="--wp--custom--icon--url:"] { background: transparent !important; float: none !important; padding: 0 !important; diff --git a/src/utility/types.tsx b/src/utility/types.tsx index 0e4fcb2..56bdaea 100644 --- a/src/utility/types.tsx +++ b/src/utility/types.tsx @@ -1,10 +1,11 @@ import { CustomSelectControl } from '@wordpress/components'; import { CSSProperties } from 'react'; -import { BlockAttributes } from '@wordpress/blocks'; +import { BlockAttributes, TemplateArray } from '@wordpress/blocks'; import { AlignmentToolbar, BlockAlignmentToolbar, BlockControls, + EditorTemplateLock, } from '@wordpress/block-editor'; import { Value } from '@wordpress/rich-text'; import Option = CustomSelectControl.Option; @@ -59,6 +60,8 @@ declare global { post_types?: string[]; uses_context?: string[]; enabled?: boolean; + template?: TemplateArray | undefined; + template_lock?: EditorTemplateLock | undefined; } interface CustomField { @@ -70,6 +73,9 @@ declare global { default?: string | number | boolean | object | null | undefined; subfields?: CustomField[]; placeholder?: string; + columns?: number; + control?: string; // Used by blocks. + onChange?: ( newValue: string | number | boolean | object | null | undefined ) => void; // Used by blocks. } interface blockify {