: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
return generateRule(style, options, ['typography', 'textColumns'], 'columnCount');
generate: (style, options) => {
return generateRule(style, options, ['typography', 'textDecoration'], 'textDecoration');
generate: (style, options) => {
return generateRule(style, options, ['typography', 'textTransform'], 'textTransform');
generate: (style, options) => {
return generateRule(style, options, ['typography', 'writingMode'], 'writingMode');
/* harmony default export */ const typography = ([fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textColumns, textDecoration, textTransform, writingMode]);
;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/index.js
const styleDefinitions = [...border, ...styles_color, ...dimensions, ...outline, ...spacing, ...typography, ...styles_shadow, ...styles_background];
;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/index.js
* Generates a stylesheet for a given style object and selector.
* @since 6.1.0 Introduced in WordPress core.
* @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json
* @param options Options object with settings to adjust how the styles are generated.
* @return A generated stylesheet or inline style declarations.
function compileCSS(style, options = {}) {
const rules = getCSSRules(style, options);
// If no selector is provided, treat generated rules as inline styles to be returned as a single string.
if (!options?.selector) {
inlineRules.push(`${paramCase(rule.key)}: ${rule.value};`);
return inlineRules.join(' ');
const groupedRules = rules.reduce((acc, rule) => {
acc[selector].push(rule);
const selectorRules = Object.keys(groupedRules).reduce((acc, subSelector) => {
acc.push(`${subSelector} { ${groupedRules[subSelector].map(rule => `${paramCase(rule.key)}: ${rule.value};`).join(' ')} }`);
return selectorRules.join('\n');
* Returns a JSON representation of the generated CSS rules.
* @since 6.1.0 Introduced in WordPress core.
* @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json
* @param options Options object with settings to adjust how the styles are generated.
* @return A collection of objects containing the selector, if any, the CSS property key (camelcase) and parsed CSS value.
function getCSSRules(style, options = {}) {
styleDefinitions.forEach(definition => {
if (typeof definition.generate === 'function') {
rules.push(...definition.generate(style, options));
(window.wp = window.wp || {}).styleEngine = __webpack_exports__;