atrilabs-engine icon indicating copy to clipboard operation
atrilabs-engine copied to clipboard

🐞 Some CSS properties not updating across breakpoints

Open sanskarg348 opened this issue 3 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

So when I set property left, right, top, and bottom in desktop mode and remove/edit them in tablet/landscape mode the published version still has those desktop properties in the Tablet/landscape mode

Screenshots

https://www.loom.com/share/7fa703fe2a9f43adad0b9422b600ed89

Expected Behavior

The expected behaviour would be that the properties which were removed/ edited in tablet/landscape mode should not reflect in the published version

System configuration

No response

Steps To Reproduce

No response

Anything else?

No response

sanskarg348 avatar Oct 26 '22 19:10 sanskarg348

@sanskarg348 a great hunt! The generated app is actually working correctly. It's the editor that is not working correctly. The reason being when you set a CSS property in desktop mode and don't specify a value for that CSS property in other modes, the value provided in desktop mode will prevail. Leaving something empty in the editor should be equivalent to not providing a value.

In this particular example, you should specify top = 0 and right = 0 instead of removing them.

cruxcode avatar Oct 27 '22 04:10 cruxcode

Fix:

Introduce a new type of event that will unset a field. We may call this event UNSET. Whenever the value in an input box goes blank, we will emit an UNSET event instead of PATCH event.

cruxcode avatar Oct 27 '22 04:10 cruxcode