Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

RTL issue in a Form Builder

Open dk-wordpress opened this issue 10 years ago • 6 comments

Hello!

I noticed one problem using Form Builder in RTL mode, for example:

i have a form with 4 rows, first 3 rows have 70% width, last row has 100%, in RTL mode these fields should be aligned to the right, but in fact, they aligned to the left, is there any way to resolve this, please

2016-10-29_14-47-09

dk-wordpress avatar Oct 29 '16 11:10 dk-wordpress

Hello,

Can you provide the fix as a pull request?

ghost avatar Oct 31 '16 07:10 ghost

Hi, @moldcraft

I though about the fix, but currently it is impossible to fix just via CSS, i'll try to explain why:

If i add following code:

body.rtl .form-builder-item {
  float: right;
}

it fixes first 3 rows but it also makes the last row not 100% width due to the float rule, and the last row doesn't have any unique CSS class that i can use to make it 100% in width (float: none)

2016-10-31_10-56-20

2016-10-31_10-56-54

dk-wordpress avatar Oct 31 '16 08:10 dk-wordpress

I have made a few fixes related to rtl. Please test latest Builder and Forms extensions

ghost avatar Nov 02 '16 12:11 ghost

Thank you so much, @moldcraft i have tested this and it works like a charm

dk-wordpress avatar Nov 02 '16 12:11 dk-wordpress

just one question: i'm not sure, in RTL mode, should columns swap their places? For example:

2016-11-02_14-58-45

2016-11-02_14-59-12

dk-wordpress avatar Nov 02 '16 13:11 dk-wordpress

Yes, float: right on rtl is float: left and vice versa.

ghost avatar Nov 02 '16 13:11 ghost