Skip to content

Commit

Permalink
Fix preview styles in design library
Browse files Browse the repository at this point in the history
  • Loading branch information
kadencewp committed Jan 7, 2025
1 parent 1bcd6ef commit 08a9126
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
10 changes: 7 additions & 3 deletions src/blocks/progress-bar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,23 @@

.kb-progress-bar-container {
position: relative;
svg {
height: auto;
width: 100%;
}
}

.kb-progress-label-wrap {
display: flex;
flex-wrap: wrap;
gap:0.3em 0.5em;
gap: 0.3em 0.5em;
}

.kb-progress-bar-type-line .kt-progress-label-inside,
.kb-progress-bar-type-line-mask .kt-progress-label-inside {
position: absolute;
top: 50%;
transform: translateY(-55%)
transform: translateY(-55%);
}

.kb-progress-bar-type-circle .kt-progress-label-inside {
Expand All @@ -38,7 +42,7 @@
.kb-progress-bar {
height: 80px;
max-width: 100%;

& > svg {
height: 100%;
}
Expand Down
22 changes: 19 additions & 3 deletions src/plugins/prebuilt-library/page-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,7 @@ function PageList({
--global-palette6:${kadence_blocks_params.global_colors['--global-palette6']};
--global-palette7:${kadence_blocks_params.global_colors['--global-palette7']};
--global-palette8:${kadence_blocks_params.global_colors['--global-palette8']};
--global-palette9:${kadence_blocks_params.global_colors['--global-palette9']};
`;
--global-palette9:${kadence_blocks_params.global_colors['--global-palette9']};`;
colorClasses = `.single-iframe-content .has-theme-palette-1-color { color: var(--global-palette1); }
.single-iframe-content .has-theme-palette-2-color { color: var(--global-palette2); }
.single-iframe-content .has-theme-palette-3-color { color: var(--global-palette3); }
Expand Down Expand Up @@ -483,7 +482,6 @@ function PageList({
.single-iframe-content .has-theme-palette8-background-color { background-color: var(--global-palette8); }
.single-iframe-content .has-theme-palette9-background-color { background-color: var(--global-palette9); }`;
}

const normalizeStyles = `--global-content-edge-padding: 3rem;padding:0px !important;--global-vw:1200px !important;`;
if ('dark' === selectedStyle) {
styleColors = `.single-iframe-content {--global-palette1:${kadence_blocks_params.global_colors['--global-palette1']};
Expand All @@ -495,6 +493,15 @@ function PageList({
--global-palette7:${kadence_blocks_params.global_colors['--global-palette3']};
--global-palette8:${kadence_blocks_params.global_colors['--global-palette3']};
--global-palette9:${kadence_blocks_params.global_colors['--global-palette4']};
--wp--preset--color--theme-palette-1: var(--global-palette1);
--wp--preset--color--theme-palette-2: var(--global-palette2);
--wp--preset--color--theme-palette-3: var(--global-palette3);
--wp--preset--color--theme-palette-4: var(--global-palette4);
--wp--preset--color--theme-palette-5: var(--global-palette5);
--wp--preset--color--theme-palette-6: var(--global-palette6);
--wp--preset--color--theme-palette-7: var(--global-palette7);
--wp--preset--color--theme-palette-8: var(--global-palette8);
--wp--preset--color--theme-palette-9: var(--global-palette9);
--global-content-edge-padding: 3rem;
padding:0px !important;}
.single-iframe-content .kb-blocks-highlight-page-section { --global-palette1:${kadence_blocks_params.global_colors['--global-palette1']};
Expand All @@ -506,6 +513,15 @@ function PageList({
--global-palette7:${kadence_blocks_params.global_colors['--global-palette7']};
--global-palette8:${kadence_blocks_params.global_colors['--global-palette8']};
--global-palette9:${kadence_blocks_params.global_colors['--global-palette9']};
--wp--preset--color--theme-palette-1: var(--global-palette1);
--wp--preset--color--theme-palette-2: var(--global-palette2);
--wp--preset--color--theme-palette-3: var(--global-palette3);
--wp--preset--color--theme-palette-4: var(--global-palette4);
--wp--preset--color--theme-palette-5: var(--global-palette5);
--wp--preset--color--theme-palette-6: var(--global-palette6);
--wp--preset--color--theme-palette-7: var(--global-palette7);
--wp--preset--color--theme-palette-8: var(--global-palette8);
--wp--preset--color--theme-palette-9: var(--global-palette9);
}.kb-btns-outer-wrap {--global-palette9:${kadence_blocks_params.global_colors['--global-palette9']}} .kb-btn-custom-colors .kb-btns-outer-wrap {--global-palette9:${kadence_blocks_params.global_colors['--global-palette3']}} img[src^="https://patterns.startertemplatecloud.com/wp-content/uploads/2023/02/Logo-ploaceholder"] {filter: invert(1);}img[src^="https://patterns.startertemplatecloud.com/wp-content/uploads/2023/12/logo-placeholder"] {filter: invert(1);}.wp-block-kadence-tabs.kb-pattern-active-tab-highlight .kt-tabs-title-list li.kt-tab-title-active .kt-tab-title{ color:${kadence_blocks_params.global_colors['--global-palette9']} !important} .kb-pattern-light-color{--global-palette9:${kadence_blocks_params.global_colors['--global-palette9']}}.kb-divider-static.kb-row-layout-wrap.wp-block-kadence-rowlayout > .kt-row-layout-bottom-sep svg{fill:${kadence_blocks_params.global_colors['--global-palette4']}!important}.kb-divider-static.kb-row-layout-wrap.wp-block-kadence-rowlayout > .kt-row-layout-top-sep svg{fill:${kadence_blocks_params.global_colors['--global-palette4']}!important}.kb-divider-static.kb-divider-bottom-p8.kb-row-layout-wrap.wp-block-kadence-rowlayout > .kt-row-layout-bottom-sep svg{fill:${kadence_blocks_params.global_colors['--global-palette5']}!important}.kb-divider-static.kb-divider-top-p8.kb-row-layout-wrap.wp-block-kadence-rowlayout > .kt-row-layout-top-sep svg{fill:${kadence_blocks_params.global_colors['--global-palette5']}!important}`;
}
newStyles = [
Expand Down
12 changes: 12 additions & 0 deletions src/plugins/prebuilt-library/pattern-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,18 @@ function PatternList({
`.single-iframe-content {--global-content-edge-padding: 3rem;padding:0px !important;}`
);
}
tempStyles = tempStyles.concat(`.pattern-shadow-wrap .single-iframe-content {
--wp--preset--color--theme-palette-1: var(--global-palette1);
--wp--preset--color--theme-palette-2: var(--global-palette2);
--wp--preset--color--theme-palette-3: var(--global-palette3);
--wp--preset--color--theme-palette-4: var(--global-palette4);
--wp--preset--color--theme-palette-5: var(--global-palette5);
--wp--preset--color--theme-palette-6: var(--global-palette6);
--wp--preset--color--theme-palette-7: var(--global-palette7);
--wp--preset--color--theme-palette-8: var(--global-palette8);
--wp--preset--color--theme-palette-9: var(--global-palette9);
}`);

if (!kadence_blocks_params.isKadenceT) {
const colorClasses = `.single-iframe-content .has-theme-palette-1-color { color: var(--global-palette1); }
.single-iframe-content .has-theme-palette-2-color { color: var(--global-palette2); }
Expand Down

0 comments on commit 08a9126

Please sign in to comment.