-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Describe the bug
The feature to change the color is not working if the user selects a custom color instead of a preset color. In the frontend a broken custom property is rendered instead of the custom color code: background-color: var(--wp--preset--color--);. Further the inline attibutes for padding are always rendered, evenn if no value is selected. Therefore it renderes en empty css rule: padding-top: ; padding-right: ; padding-bottom: ; padding-left: ; margin-top: ; margin-right: ; margin-bottom: ; margin-left: ;.
Steps to Reproduce
- insert svg icon
- go to style tab in right editor sidebar
- in the color section click on background
- pick custom color insteat of preset color from swatches
- save post
In the backend everything looks fine. The following markup is renderes in the frontend:
<div class="safe-svg-inside safe-svg-inline" style="width: 24px; height: 24px; background-color: var(--wp--preset--color--); color: var(--wp--preset--color--); padding-top: ; padding-right: ; padding-bottom: ; padding-left: ; margin-top: ; margin-right: ; margin-bottom: ; margin-left: ;">
Screenshots, screen recording, code snippet
No response
Environment information
No response
WordPress information
`
wp-core
version: 6.9
site_language: de_DE
user_language: de_DE
timezone: Europe/Berlin
permalink: /%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 1
dotorg_communication: true
wp-paths-sizes
wordpress_path: /Users/user/Websites/wordpress
wordpress_size: 318,20 MB (333652661 bytes)
uploads_path: /Users/user/Websites/wordpress/wp-content/uploads
uploads_size: 50,71 MB (53175665 bytes)
themes_path: /Users/user/Websites/wordpress/wp-content/themes
themes_size: 79,84 MB (83723419 bytes)
plugins_path: /Users/user/Websites/wordpress/wp-content/plugins
plugins_size: 61,61 MB (64607804 bytes)
fonts_path: /Users/user/Websites/wordpress/wp-content/uploads/fonts
fonts_size: 2,05 MB (2146072 bytes)
database_size: 6,31 MB (6619136 bytes)
total_size: 518,73 MB (543924757 bytes)
wp-active-theme
name: mycustomtheme (mycustomtheme)
version: 1.0.0
author: user
author_website: https://mycustomtheme.de
parent_theme: none
theme_features: menus, post-thumbnails, responsive-embeds, editor-styles, html5, automatic-feed-links, widgets-block-editor, block-templates
theme_path: /Users/user/Websites/wordpress/wp-content/themes/mycustomtheme
auto_update: Deaktiviert
wp-themes-inactive (1)
Twenty Twenty-Five: version: 1.4, author: Das WordPress-Team, Automatische Aktualisierungen deaktiviert
wp-plugins-active (7)
Create Block Theme: version: 2.8.0, author: WordPress.org, Automatische Aktualisierungen deaktiviert
Duplicator Pro: version: 4.5.24.3, author: Duplicator (latest version: 4.5.24.4), Automatische Aktualisierungen deaktiviert
EWWW Image Optimizer: version: 8.3.1, author: Exactly WWW, Automatische Aktualisierungen deaktiviert
Gravity Forms: version: 2.9.26, author: Gravity Forms, Automatische Aktualisierungen aktiviert
Gravity Forms CleverReach Add-On: version: 1.9.0, author: Gravity Forms, Automatische Aktualisierungen deaktiviert
Gravity SMTP: version: 2.1.3, author: Gravity Forms, Automatische Aktualisierungen deaktiviert
Safe SVG: version: 2.4.0, author: 10up, Automatische Aktualisierungen deaktiviert
wp-media
image_editor: EWWWIO_GD_Editor
imagick_module_version: Nicht verfügbar
imagemagick_version: Nicht verfügbar
imagick_version: Nicht verfügbar
file_uploads: 1
post_max_size: 4G
upload_max_filesize: 4G
max_effective_size: 4 GB
max_file_uploads: 20
image_format_transforms: image/heic → image/jpeg, image/heif → image/jpeg, image/heic-sequence → image/jpeg, image/heif-sequence → image/jpeg
gd_version: 2.3.3
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF
ghostscript_version: not available
wp-server
server_architecture: Darwin 24.6.0 arm64
httpd_software: nginx/1.27.5
php_version: 8.3.21 64bit
php_sapi: fpm-fcgi
max_input_variables: 1000
time_limit: 600
memory_limit: 512M
max_input_time: 2400
upload_max_filesize: 4G
php_post_max_size: 4G
curl_version: 8.13.0 OpenSSL/3.5.0 (SecureTransport)
suhosin: false
imagick_availability: false
pretty_permalinks: true
static_robotstxt_file: false
current: 2026-01-29T14:07:19+00:00
utc-time: Thursday, 29-Jan-26 14:07:19 UTC
server-time: 2026-01-29T15:07:18+01:00
wp-database
extension: mysqli
server_version: 11.7.2-MariaDB
client_version: mysqlnd 8.3.21
max_allowed_packet: 268435456
max_connections: 151
wp-constants
WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /Users/user/Websites/wordpress/wp-content
WP_PLUGIN_DIR: /Users/user/Websites/wordpress/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 512M
WP_DEBUG: false
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: undefined
WP_DEVELOPMENT_MODE: all
DB_CHARSET: utf8mb4
DB_COLLATE: undefined
wp-filesystem
wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
fonts: writable
`
Code of Conduct
- I agree to follow this project's Code of Conduct