Adding white-space: nowrap to textarea

0 Answers 91 Views
TextArea
Scott
Top achievements
Rank 1
Scott asked on 08 Nov 2023, 03:47 PM
I am having an issue applying a white-space: nowrap style to a kendo-textarea.  The parent kendo-textarea has the nowrap style, the textarea inside the kendo-textarea inherites the nowrap but the user agent stylesheet then overrides the nowrap and giving it a pre-wrap.

Is there a way to add styling to a textarea directly without it being inherited through kendo-textarea?
Georgi
Telerik team
commented on 13 Nov 2023, 01:13 PM

Hello Scott,

Thank you very much for the screenshot provided.

Indeed, you are correct that modifying the white-space CSS property of the Kendo UI for Angular TextArea would not translate to the native textarea element that the component utilizes. 

One possible approach to achieve the desired modification would be for the developer to utilize the k-input-inner CSS selector and set the white-space property to nowrap:

.k-input-inner{
    white-space: nowrap;
}

To better illustrate the suggested approach, I am sending you a StackBlitz demo that implements it:

https://stackblitz.com/edit/angular-tibsec

I hope the suggested approach helps. Please, let me know if I am missing out on something.

Regards,
Georgi
Progress Telerik

No answers yet. Maybe you can help?

Tags
TextArea
Asked by
Scott
Top achievements
Rank 1
Share this question
or