Remove default #size attribute from core

Created on 11 February 2014, almost 11 years ago
Updated 18 April 2023, over 1 year ago

Background: #2002336-86: Introduce a CSS class to hide borders of fieldset elements

Problem

  1. An input element with a 'size' attribute value does not respect a max-width applied via CSS, when the input element appears in a fieldset.

  2. http://stackoverflow.com/a/18039139/811306

    For some reason the size attribute over-rode the css widths.

  3. http://stackoverflow.com/a/1480592/811306

    HTML controls the semantic meaning of the elements. CSS controls the layout/style of the page. Use CSS when you are controlling your layout.

    In short, never use size=""

Proof

http://jsfiddle.net/sun/6gWA5/19/

Proposed solution

  1. Remove the default value for #size from all form input elements throughout core.

pre-patch field sizes

Click the following images to view full-size.

Demonstrations of post-patch field sizes

📌 Task
Status

Needs work

Version

10.1

Component
Theme 

Last updated about 20 hours ago

Created by

🇩🇪Germany sun Karlsruhe

Live updates comments and jobs are added and updated live.
  • html5

    Implements and supports the use of HTML5.

  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024