Be able to type -- after value to set unitless value for property

Currently when setting any value you can type the unit (e.g. px, em, rem %) directly after the value and this correctly changes the unit for that property.

The exception to this is for unitless values (e.g. 0 or if specifying a unitless line-height for example).

Ideally this will work by type a single or double dash after the value.

Hopefully this is a straightforward addition and will aid in consistency and completeness, thank you for considering it.

Excellent suggestion :+1:

@Louis, I have just tested this in the latest Cwicly version and now typing β€œ0–” does trigger the display of the unitless value in the UI.

Unfortunately, it also adds β€œβ€“β€ to the output CSS (e.g. row-gap: 0--;).

When this is fixed, it will be perfect.

@Louis, I am just following up about this, as it has come up again this week.

Because the editor now behaves as you would expect when typing β€œβ€“β€ after the value, the fact that it outputs incorrect CSS can result in wasted time debugging for anyone not familiar with this current behaviour.

An example of where this occurred for our team was when specifying a unitless line-height in global typography.

We will really appreciate it if the last part of this is fixed as it will be one less thing to think about for new developers using Cwicly.

Hello @StrangeTech,

Thanks for bringing this up again.

Moving to Bugs so that we can properly follow this up.

Cheers,

@Louis Tested line-height field and confirmed to work seamlessly with both Tailwind and non-Tailwind mode in 1.4.1:

Thank you @Louis, really appreciate this.

2 Likes

Hello @StrangeTech,

Thanks for your persistence on this one, and sorry it took some time to finally get there.

Cheers,