Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-66395

select class="form-select" shows double caret in Firefox 78.13.0esr (plugin built without autoprefixer)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • bootstrap5-api-plugin
    • None
    • Jenkins 2.289.3
      Mozilla Firefox 78.13.0esr
      Bootstrap 5 API Plugin 5.1.0-1
      DataTables.net API Plugin 1.10.25-3
      Warnings Next Generation Plugin 9.5.0

      In the warnings list shown by Warnings NG, the select field for choosing the number of entries per page looks funny in Mozilla Firefox 78.13.0esr:

      The same looks nicer in Microsoft Edge 92.0.902.73 (based on Chromium):

      HTML:

      <div class="row"><div class="col-sm-12 col-md-6"><div class="dataTables_length" id="packageName_length"><label>Show <select name="packageName_length" aria-controls="packageName" class="form-select form-select-sm"><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select> entries</label></div></div><div class="col-sm-12 col-md-6"><div id="packageName_filter" class="dataTables_filter"><label>Search:<input type="search" class="form-control form-control-sm" placeholder="" aria-controls="packageName"></label></div></div></div>
      

      The relevant CSS rule in https://REDACTED/jenkins/static/a5c31c86/plugin/bootstrap5-api/css/bootstrap-custom-build.css:

      .form-select {
        display: block;
        width: 100%;
        padding: 0.375rem 2.25rem 0.375rem 0.75rem;
        -moz-padding-start: calc(0.75rem - 3px);
        font-size: 1rem;
        font-weight: 400;
        line-height: 1.5;
        color: #212529;
        background-color: #fff;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        background-size: 16px 12px;
        border: 1px solid #ced4da;
        border-radius: 0.25rem;
        transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
        appearance: none;
      }
      

      Firefox does not seem to respect the appearance property. If I change that to -moz-appearance, then it looks nicer:

      Maybe the CSS rule should set both appearance and -moz-appearance properties.

          [JENKINS-66395] select class="form-select" shows double caret in Firefox 78.13.0esr (plugin built without autoprefixer)

          1620467 - Support standard 'appearance' CSS property unprefixed has milestone "mozilla80". I figure that means Mozilla Firefox 78.13.0esr does not include the change yet.

          Kalle Niemitalo added a comment - 1620467 - Support standard 'appearance' CSS property unprefixed has milestone "mozilla80". I figure that means Mozilla Firefox 78.13.0esr does not include the change yet.

          _form-select.scss in the Bootstrap 5.1.0 source tree just uses appearance: none;. However, in several GitHub issues, it is mentioned that the build system should use "an autoprefixer" to add vendor prefixes to the property name:

          I checked https://github.com/twbs/bootstrap/releases/download/v5.1.0/bootstrap-5.1.0-dist.zip, and the bootstrap-5.1.0-dist/css/bootstrap.css file in that does set all three properties:

            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
          

          So, does the build process of bootstrap5-api-plugin for Jenkins skip running the autoprefixer?

          Kalle Niemitalo added a comment - _form-select.scss in the Bootstrap 5.1.0 source tree just uses appearance: none; . However, in several GitHub issues, it is mentioned that the build system should use "an autoprefixer" to add vendor prefixes to the property name: https://github.com/twbs/bootstrap/issues/32522#issuecomment-747810039 https://github.com/twbs/bootstrap/issues/31819#issuecomment-702688329 https://github.com/twbs/bootstrap/issues/28145#issuecomment-466011404 https://github.com/twbs/bootstrap/issues/27181#issuecomment-458595093 https://github.com/twbs/bootstrap/issues/26472#issuecomment-387735542 https://github.com/twbs/bootstrap/issues/25901#issuecomment-374840646 https://github.com/twbs/bootstrap/issues/25878#issuecomment-373893132 https://github.com/twbs/bootstrap/issues/25731#issuecomment-368956159 https://github.com/twbs/bootstrap/issues/25550#issuecomment-435668426 https://github.com/twbs/bootstrap/issues/25381#issuecomment-359194381 https://github.com/twbs/bootstrap/issues/24372#issuecomment-336677989 – mentions "caniuse" too https://github.com/twbs/bootstrap/issues/22002#issuecomment-372053402 https://v5.getbootstrap.com/docs/5.0/getting-started/build-tools/#autoprefixer I checked https://github.com/twbs/bootstrap/releases/download/v5.1.0/bootstrap-5.1.0-dist.zip , and the bootstrap-5.1.0-dist/css/bootstrap.css file in that does set all three properties: -webkit-appearance: none; -moz-appearance: none; appearance: none; So, does the build process of bootstrap5-api-plugin for Jenkins skip running the autoprefixer?

          package.json of bootstrap runs postcss, but I don't see anything similar in package.json of bootstrap5-api-plugin.

          Kalle Niemitalo added a comment - package.json of bootstrap runs postcss , but I don't see anything similar in package.json of bootstrap5-api-plugin .

          Ulli Hafner added a comment -

          Yes, that part seems to be missing in our simplified version of the build script. 

          Ulli Hafner added a comment - Yes, that part seems to be missing in our simplified version of the build script. 

          Ulli Hafner added a comment -

          Interested in trying to fix this via a PR? This build script is something I am not very familiar with...

          Ulli Hafner added a comment - Interested in trying to fix this via a PR? This build script is something I am not very familiar with...

          No, I have very little experience with NPM builds.

          Kalle Niemitalo added a comment - No, I have very little experience with NPM builds.

            drulli Ulli Hafner
            kon Kalle Niemitalo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: