Box-shadow custom & default units

Allow custom units for the box-shadow property.
Currently, only numbers are allowed as values for the input which then translates into pixels.

Possibility to set a default unit for the box-shadow property (Global Styles settings).

The box-shadow properties now accept custom values.
We will hopefully be including a unit control in the coming updates.

Thanks for the request, @Marius.


Hey there @Louis.

I’m facing some issues with this but I’m not sure whether these are bugs or not.

Is there a reason the box-shadow default units are duplicated inside the border area?

This is also what I have seen in the tutorial on YouTube, is this intended this way?

Also, the default units won’t get applied to the box-shadow property.

As you can see, all fields are also pre-populated with 0 value.
Not sure about the situation since it is still tagged as in-progress.

Any input is appreciated.

1 Like

Confirmed - I am seeing the exact same behaviour.

1 Like

Thanks for confirming @StrangeTech.
I want to add that this is unrelated to the latest update.

Hello @Marius,

Thank you for bringing this one up.

I’m not sure how this went unnoticed :see_no_evil:
We initially did plan to add the box-shadow defaults inside the Border area, before moving it to its own category. Apologies for the confusion here.

This does sound unusual.
They are pre-populated with 0 as this has been the case since we introduced this format, but if you reset that property, you will notice the default unit being applied.

We decided to add the unit control without modifying the default values, as I was unsure of the best suited format for most needs. This is something we’re still exploring and it would be great to have your suggestions or remarks on the subject.


1 Like

Thanks for the clarification @Louis.

You are right, the 0 values were there before. I can’t say that I like(d) them, but I got used to it for the fact that it’s required to have all inputs filled out anyway.
Also, resetting a value indeed reveals the default unit.

I think in terms of default units it would make more sense if the box-shadow’s interface/behaviour would be consistent with the border and outline ones (and any other applicable properties).
That at least was what I expected and got me a bit confused.
In the current state, I have a hard time finding any value in default unit here.

Why are there default values pre-populated? I think that would be important to know before being able to make specific suggestions.
Is this a leftover from the early days? Or rather something to guide the user?

Anyway, what would speak against:

  • removing the pre-populated values
  • displaying the default units by default
  • making all values optional (or at least blur and spread radius)

Point #1 and #3 are connected in some way, maybe that’s why it works the current way?
As always, I might miss some crucial aspects here and this won’t make sense. But these were my initial thoughts to unify, simplify and improve the workflow and overall experience.

In any case, resetting a value should generally auto-focus the corresponding input field. Currently it only remains focused when an input is already selected. That would already resolve >50% of the issues I currently have here.