Topic: RightToLeft input

Reza Assar free asked 6 years ago


I have some trouble with RightToLeft for input. consider following:

<div class="md-form">
<i class="fa fa-lock prefix"></i>
<input mdbInputDirective
data-error=" "
data-success=" "
class="form-control"
type="text"
id="username" 
formControlName="Username">
<label for="username">someTextLabel</label>
</div>

-------------------------------------------------------------------------------

Scss: 
*{
direction: rtl;
text-align: right;
font-family: ...;
}

What i get is: misplace of "fa-lock" and "someTextLabel".

How can i fix this?

 

-----EDIT------

I have find a solution but don't know if this is the best solution or not.

For instance, It could be better to use $variable instead of "2.5rem", but neither scss files (including "_input.scss") used any $variable for that.

Start your code hereccc
.md-form label{
  left: inherit;
}
.md-form .prefix{
  margin-left: 2.5rem;
  left:0;
}

Damian Gemza staff commented 6 years ago

If you need to set your icons on the right side of your input, you can use right: 0 and some margin-right values. Best Regards, Damian


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags