Closed Joe-Rouse closed 1 year ago
@g-elwell This issue should be resolved now.
I've changed the isCssLengthUnit
helper so that it can accept an optional -
at the start of the string. I'm also checking the UnitControl
for an empty string rather than a falsy value before defaulting it back to 0px
.
I've added a min
value to the width
UnitControl component so that you can't add a negative value into it.
Video of negative value for offset & non-negative value for width working: http://bigbite.im/v/X82COK
@g-elwell I've also just pushed another commit which adds i18n
to the select control labels as I just noticed that was missing.
@Joe-Rouse @g-elwell Do you think the BorderControl
component would streamline this up a bit in terms of the UI? It has an input for the width but also includes the colour palette within that.
@spbuckle I like the UI improvement, if it's straight up compatible then I'd be up for switching over, if there are any complications (I don't think there will be?) I'd push til later
@spbuckle The only concern I have with this is that there's no prop to control the units available to select. By default you can select %
as a unit but this isn't valid CSS.
Description
Completes BBT-93 - This PR adds a reusable outline component to the plugin. The component allows you to set 4 outline properties:
Similar to #22, I've limited the available units you can use for width & offset as some commonly used units aren't supported (e.g. %). If an unsupported unit is used, it defaults to
px
.Change Log
Steps to test
theme.json
for one of the blocks. For example:theme.json
. Check your changes have been exported correctly into the newtheme.json
.Screenshots/Videos
Importing from
theme.json
https://github.com/bigbite/themer/assets/45216035/4e2dc49d-be1b-436c-a321-0a4aed5b29ed
Changing values
https://github.com/bigbite/themer/assets/45216035/14af22e7-10b6-4eec-9662-b86644b3e757
Exporting changes
https://github.com/bigbite/themer/assets/45216035/98094b1c-5c48-4cc6-8f31-9d636964b374
Checklist: