FEATURE Refining color prop drealing

This commit is contained in:
Antoine M 2026-04-08 16:04:48 +02:00
parent 88bf8e4c64
commit d2d06f04e2
12 changed files with 35 additions and 907 deletions

View File

@ -4,3 +4,17 @@
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
}
.chapter-section--bg-light {
--cta-current-color: var(--wp--preset--color--carhop-green, inherit);
}
.chapter-section--bg-light .wp-block-carhop-blocks-cta {
--cta-current-color: var(--wp--preset--color--carhop-green, inherit);
}
.chapter-section--bg-light .wp-block-carhop-blocks-cta svg,
.chapter-section--bg-light .wp-block-carhop-blocks-cta path,
.chapter-section--bg-light .wp-block-carhop-blocks-cta circle {
stroke: var(--wp--preset--color--carhop-green, inherit);
}

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '9272ca653d58c468069b');
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '214b3911267e4d3bf438');

View File

@ -1,8 +1 @@
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/chapter-section/editor.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
}
/*# sourceMappingURL=index.css.map*/
.wp-block-carhop-blocks-chapter-section{margin:2rem calc(50% - 50vw)}.chapter-section--bg-light,.chapter-section--bg-light .wp-block-carhop-blocks-cta{--cta-current-color:var(--wp--preset--color--carhop-green,inherit)}.chapter-section--bg-light .wp-block-carhop-blocks-cta circle,.chapter-section--bg-light .wp-block-carhop-blocks-cta path,.chapter-section--bg-light .wp-block-carhop-blocks-cta svg{stroke:var(--wp--preset--color--carhop-green,inherit)}

View File

@ -1 +0,0 @@
{"version":3,"file":"chapter-section/index.css","mappings":";;;AAAA;EACC;AACD,C","sources":["webpack://carhop-blocks/./src/chapter-section/editor.scss"],"sourcesContent":[".wp-block-carhop-blocks-chapter-section {\n\tmargin: 2rem calc(50% - 50vw);\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1 @@
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/chapter-section/style.scss ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
}
/*# sourceMappingURL=style-index.css.map*/
.wp-block-carhop-blocks-chapter-section{margin:2rem calc(50% - 50vw)}

View File

@ -1 +0,0 @@
{"version":3,"file":"chapter-section/style-index.css","mappings":";;;AAAA;EACC;AACD,C","sources":["webpack://carhop-blocks/./src/chapter-section/style.scss"],"sourcesContent":[".wp-block-carhop-blocks-chapter-section {\r\n\tmargin: 2rem calc(50% - 50vw);\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1,7 +0,0 @@
/******/ (() => { // webpackBootstrap
/*!*************************************!*\
!*** ./src/chapter-section/view.js ***!
\*************************************/
/******/ })()
;

View File

@ -35,7 +35,6 @@ export default function Edit({ attributes, setAttributes, ...props }) {
coverId,
coverSize,
backgroundColor,
blockWidth,
textColor,
shapeType,

View File

@ -1,3 +1,16 @@
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
}
.chapter-section--bg-light {
--cta-current-color: var(--wp--preset--color--carhop-green, inherit);
.wp-block-carhop-blocks-cta {
--cta-current-color: var(--wp--preset--color--carhop-green, inherit);
svg,
path,
circle {
stroke: var(--wp--preset--color--carhop-green, inherit);
}
}
}

View File

@ -30,10 +30,12 @@ export default function save({ attributes }) {
${
hasLightBackground
? "chapter-section--bg-light"
: " "
: "chapter-section--bg-dark"
}`,
style: {
"--chapter-section-text-color": textColor ? textColor : "#136f63",
"--chapter-section-text-color": textColor
? textColor
: "var(--advised-text-color)",
"--cta-current-color":
blockVariant === "backgrounded"
? "inherit"