Field enter the recipient's email in gmail?

Good day!
Is it possible on css to make input that will change the width depending on the parent container? i.e. the same as the recipient field in gmail, messages - to enter the soap - box is getting less and email entered appears on the left.
If not, then aim at the solution of this problem using js.
Thank you!
July 8th 19 at 16:03
1 answer
July 8th 19 at 16:05
Solution
Well, something like that: https://jsfiddle.net/locky/a7zj9dwu/1/
Thank you, kind people) - Laila.Skil commented on July 8th 19 at 16:08

Find more questions by tags JavaScriptHTMLCSS