<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>234731</bug_id>
          
          <creation_ts>2021-12-28 14:18:49 -0800</creation_ts>
          <short_desc>[CSS] input with transform scale and height property ruins vertical text alignment</short_desc>
          <delta_ts>2022-01-04 14:20:24 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>Other</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Pedro Paulo">pedropaulosuzuki1</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>koivisto</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1827124</commentid>
    <comment_count>0</comment_count>
      <attachid>448056</attachid>
    <who name="Pedro Paulo">pedropaulosuzuki1</who>
    <bug_when>2021-12-28 14:18:49 -0800</bug_when>
    <thetext>Created attachment 448056
Example of input type text with alignment problems after transform/scale

Hello everyone! Hope y&apos;all doing fine this tuesday!

I came to report a bug on input fields (&lt;input type=&quot;text&quot;&gt;). When they have a defined height (such as `input { height: 30px; }`), and they have a transform/scale property applied (such as `input { transform: scale(1.1); }`), the text vertical alignment gets ruined for some reason, usually being dragged down. When one uses vertical padding (such as `input.padding { padding: 15px 0; }`) and border-box sizing { box-sizing: border-box; }, it goes up instead, as can be seen in the example below (also attached to the bug report). I put placeholders in the examples so that the problem becomes clear faster.

NOTE: The bug only happens if the transform is also under a transition. Example: input { transition: transform 100ms ease-in-out; }. Without the transition, everything seems fine.

```html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
	&lt;head&gt;
	    &lt;title&gt;[CSS] input with transform scale and height property ruins text alignment.&lt;/title&gt;
		&lt;style&gt;
			body {
				width: 100vw;
				height: 100vh;
				display: flex;
				align-items: center;
				justify-content: center;
				gap: 20px;
			}
			
			input {
				width: 300px;
				height: 30px;
				transition: transform 100ms ease-in-out;
				background-color: #eee;
				border: 0;
				border-radius: 20px;
				text-align: center;
			}
			
			input:hover {
				transform: scale(1.1);
			}
			
			input.padding {
				padding: 15px 0;
				box-sizing: border-box;
			}
		&lt;/style&gt;
	&lt;/head&gt;
	&lt;body&gt;
		&lt;input placeholder=&quot;Input without padding goes down&quot;&gt;
		&lt;input class=&quot;padding&quot; placeholder=&quot;Input with padding goes up&quot;&gt;
		&lt;input type=&quot;search&quot; placeholder=&quot;Search is not styled in WebkitGTK (separate issue)&quot;&gt;
	&lt;/body&gt;
&lt;/html&gt;
```html

Tested on GNOME Web 41.3 Flatpak (WebKitGTK 2.34.2) and on a friend&apos;s iPhone and both presented the same issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1828095</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-01-04 14:19:20 -0800</bug_when>
    <thetext>&lt;rdar://problem/87114664&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>448056</attachid>
            <date>2021-12-28 14:18:49 -0800</date>
            <delta_ts>2021-12-28 14:18:49 -0800</delta_ts>
            <desc>Example of input type text with alignment problems after transform/scale</desc>
            <filename>[CSS] input with transform scale and height property ruins text alignment.html</filename>
            <type>text/html</type>
            <size>839</size>
            <attacher name="Pedro Paulo">pedropaulosuzuki1</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgoJPGhlYWQ+CgkgICAgPHRpdGxlPltDU1NdIGlucHV0IHdp
dGggdHJhbnNmb3JtIHNjYWxlIGFuZCBoZWlnaHQgcHJvcGVydHkgcnVpbnMgdGV4dCBhbGlnbm1l
bnQuPC90aXRsZT4KCQk8c3R5bGU+CgkJCWJvZHkgewoJCQkJd2lkdGg6IDEwMHZ3OwoJCQkJaGVp
Z2h0OiAxMDB2aDsKCQkJCWRpc3BsYXk6IGZsZXg7CgkJCQlhbGlnbi1pdGVtczogY2VudGVyOwoJ
CQkJanVzdGlmeS1jb250ZW50OiBjZW50ZXI7CgkJCQlnYXA6IDIwcHg7CgkJCX0KCQkJCgkJCWlu
cHV0IHsKCQkJCXdpZHRoOiAyNTBweDsKCQkJCWhlaWdodDogMzBweDsKCQkJCXRyYW5zaXRpb246
IHRyYW5zZm9ybSAxMDBtcyBlYXNlLWluLW91dDsKCQkJCWJhY2tncm91bmQtY29sb3I6ICNlZWU7
CgkJCQlib3JkZXI6IDA7CgkJCQlib3JkZXItcmFkaXVzOiAyMHB4OwoJCQkJdGV4dC1hbGlnbjog
Y2VudGVyOwoJCQl9CgkJCQoJCQlpbnB1dDpob3ZlciB7CgkJCQl0cmFuc2Zvcm06IHNjYWxlKDEu
MSk7CgkJCX0KCQkJCgkJCWlucHV0LnBhZGRpbmcgewoJCQkJcGFkZGluZzogMTVweCAwOwoJCQkJ
Ym94LXNpemluZzogYm9yZGVyLWJveDsKCQkJfQoJCTwvc3R5bGU+Cgk8L2hlYWQ+Cgk8Ym9keT4K
CQk8aW5wdXQgcGxhY2Vob2xkZXI9IklucHV0IHdpdGhvdXQgcGFkZGluZyBnb2VzIGRvd24iPgoJ
CTxpbnB1dCBjbGFzcz0icGFkZGluZyIgcGxhY2Vob2xkZXI9IklucHV0IHdpdGggcGFkZGluZyBn
b2VzIHVwIj4KCQk8aW5wdXQgdHlwZT0ic2VhcmNoIiBwbGFjZWhvbGRlcj0iU2VhcmNoIGlzIG5v
dCBzdHlsZWQgaW4gV2Via2l0R1RLIj4KCTwvYm9keT4KPC9odG1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>