<?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>224746</bug_id>
          
          <creation_ts>2021-04-19 03:36:35 -0700</creation_ts>
          <short_desc>font-size property doesn&apos;t apply to file upload button</short_desc>
          <delta_ts>2023-01-10 17:38:12 -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>Safari 14</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>macOS 10.15</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>238803</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=238803</see_also>
          <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="Vanita Barrett-Smith">vanita.barrett</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>cdumez</cc>
    
    <cc>ntim</cc>
    
    <cc>oliver.byford</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>1751724</commentid>
    <comment_count>0</comment_count>
      <attachid>426404</attachid>
    <who name="Vanita Barrett-Smith">vanita.barrett</who>
    <bug_when>2021-04-19 03:36:35 -0700</bug_when>
    <thetext>Created attachment 426404
HTML example (alternative to CodePen)

## What

When applying the `font-size` property to a file upload input, the font-size of the file upload button does not change. This happens even when applying the font-size property using the ::-webkit-file-upload-button selector.

Strangely, the font-size does change when the file upload has a background-color applied using ::-webkit-file-upload-button.

## Steps to reproduce

1. Open https://codepen.io/vanitabarrett/pen/qBRMPQw (or attached file) in Safari
2. The first file upload has the &apos;no file selected&apos; text mis-aligned with the input button
3. The second file upload has the &apos;no file selected&apos; correctly aligned and the file upload button font-size matches</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1752404</commentid>
    <comment_count>1</comment_count>
    <who name="Aditya Keerthi">akeerthi</who>
    <bug_when>2021-04-20 13:29:22 -0700</bug_when>
    <thetext>Thanks for the report!

I&apos;m also able to reproduce using an &lt;input type=button&gt;.

We&apos;ve had this behavior for a long time, since the native rounded button style does not support variable sizes. It works when you specify a &quot;background-color&quot;, since that drops us out of the native appearance. 

A workaround, if you do not require a native appearance, would be to specify &quot;-webkit-appearance: none&quot;.

However, we could probably fix this by transitioning to the native square button style for larger font sizes (as we already do for &lt;button&gt;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1754149</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-04-26 03:37:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/77146163&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1923914</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-01-07 23:28:03 -0800</bug_when>
    <thetext>Bug 238803 would fix this, among with other issues!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1924664</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-01-10 17:38:12 -0800</bug_when>
    <thetext>Bug 238803 fixes it.

*** This bug has been marked as a duplicate of bug 238803 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>426404</attachid>
            <date>2021-04-19 03:36:35 -0700</date>
            <delta_ts>2021-04-19 03:36:35 -0700</delta_ts>
            <desc>HTML example (alternative to CodePen)</desc>
            <filename>file-upload.html</filename>
            <type>text/html</type>
            <size>653</size>
            <attacher name="Vanita Barrett-Smith">vanita.barrett</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+Cgo8aHRtbCBsYW5nPSJlbiI+CjxoZWFkPgogIDxtZXRhIGNoYXJzZXQ9
InV0Zi04Ij4KCiAgPHRpdGxlPkZpbGUgVXBsb2FkIGZvbnQtc2l6ZTwvdGl0bGU+CjwvaGVhZD4K
Cjxib2R5PgogIDxzdHlsZT4KICAgIC5teS1maWxlLXVwbG9hZCB7CiAgICAgIGZvbnQtc2l6ZTog
MzBweDsKICAgIH0KCiAgICAubXktZmlsZS11cGxvYWQ6Oi13ZWJraXQtZmlsZS11cGxvYWQtYnV0
dG9uIHsKICAgICAgZm9udC1zaXplOiAzMHB4OwogICAgfQoKICAgIC5teS1maWxlLXVwbG9hZC0y
IHsKICAgICAgZm9udC1zaXplOiAzMHB4OwogICAgfQoKICAgIC5teS1maWxlLXVwbG9hZC0yOjot
d2Via2l0LWZpbGUtdXBsb2FkLWJ1dHRvbiB7CiAgICAgIGJhY2tncm91bmQtY29sb3I6IHJlZDsK
ICAgIH0KICA8L3N0eWxlPgoKICA8aDI+V2l0aCBmb250LXNpemUgb25seTwvaDI+CiAgPGlucHV0
IHR5cGU9ImZpbGUiIGNsYXNzPSJteS1maWxlLXVwbG9hZCIgaWQ9Im15RmlsZSIgbmFtZT0iZmls
ZW5hbWUiPgoKICA8aDI+V2l0aCBiYWNrZ3JvdW5kIGNvbG9yIGFwcGxpZWQ8aDI+CiAgPGlucHV0
IHR5cGU9ImZpbGUiIGNsYXNzPSJteS1maWxlLXVwbG9hZC0yIiBpZD0ibXlGaWxlIiBuYW1lPSJm
aWxlbmFtZSI+CjwvYm9keT4KPC9odG1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>