WordPress.org

Ready to get started?Download WordPress

Forums

Clean Yeti Basic
[resolved] Don't force height for textareas (6 posts)

  1. Daedalon
    Member
    Posted 1 year ago #

    Our site has plugins that create textareas with a defined number of rows (HTML attribute). These don't have any effect as cleanyetibasic.css defines on row 2971 that all textareas have a height of height: 2.3125rem;.

    Why is there a pre-defined height for textarea elements that overrides the row attribute? Could it be removed so that rows have an effect?

  2. Richard LaFranchi
    Member
    Theme Author

    Posted 1 year ago #

    Well, this is another default foundation setting. I think I found a work around though. I'm no expert with js and jquery but this seems to work:

    $('body').find('textarea').each(function () {
            if ($(this).attr('rows')) {
                $(this).css('height', 'auto');
            } else {
                // attribute does not exist
            }
        });

    I will add this to foundation.custom.js
    I guess another thing you could do is add the following to your css

    textarea {
         height:auto;
    }
  3. Daedalon
    Member
    Posted 1 year ago #

    To me it seems like the best way to fix this is to remove or override the default CSS with CSS. JS solutions are always slower and don't work for all users, so I'd use them only when pure CSS cannot do it.

    Could Clean Yeti Basic's CSS be updated to override the Foundation default?

  4. Richard LaFranchi
    Member
    Theme Author

    Posted 1 year ago #

    well, after looking into it some more it appears that the height of the textarea can't be dragged vertically when the height is set to auto, only horizontally. I may have seek a solution from foundation.

  5. Richard LaFranchi
    Member
    Theme Author

    Posted 12 months ago #

    Looks like a request has already been made:
    https://github.com/zurb/foundation/issues/4047

  6. Daedalon
    Member
    Posted 12 months ago #

    Great! Marking the issue as resolved here for now.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.