10up / safe-svg

Enable SVG uploads and sanitize them to stop XML/SVG vulnerabilities in your WordPress website.
https://wordpress.org/plugins/safe-svg/
GNU General Public License v2.0
266 stars 31 forks source link

Update classname #161

Closed tobeycodes closed 10 months ago

tobeycodes commented 10 months ago

Description of the Change

Update the root class name to make theme.json changes possible.

If you add this to your theme.json the css is applied to the block classname wp-block-safe-svg-svg-icon so this does not get applied to the block.

      "safe-svg/svg-icon": {
        "border": {
          "color": "var(--wp--preset--color--gray-200)",
          "radius": "8px",
          "style": "solid",
          "width": "1px"
        },
      }

How to test the Change

Apply the theme.json change above against develop and this branch to see the difference

Changelog Entry

Added support theme.json block changes

Credits

@tobeycodes

Checklist:

tobycodes commented 10 months ago

Description of the Change

Update the root class name to make theme.json changes possible.

If you add this to your theme.json the css is applied to the block classname wp-block-safe-svg-svg-icon so this does not get applied to the block.

      "safe-svg/svg-icon": {
        "border": {
          "color": "var(--wp--preset--color--gray-200)",
          "radius": "8px",
          "style": "solid",
          "width": "1px"
        },
      }

How to test the Change

Apply the theme.json change above against develop and this branch to see the difference

Changelog Entry

Added support theme.json block changes

Credits

@tobycodes

Checklist:

  • [x] I agree to follow this project's Code of Conduct.
  • [x] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my change.
  • [ ] All new and existing tests pass.

I think I was wrongly tagged in this :)

Great work though.