title: How can I style readonly selects to appear disabled?
body: <p>I have a select field:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;select class=&quot;form-control&quot; data-admin--reports-form-target=&quot;sendFrequencySelect&quot; name=&quot;automated_digest_task[send_frequency]&quot; id=&quot;automated_digest_task_send_frequency&quot;&gt;&lt;option value=&quot;86400&quot;&gt;1 day&lt;/option&gt;
  &lt;option value=&quot;259200&quot;&gt;3 days&lt;/option&gt;
  &lt;option value=&quot;604800&quot;&gt;7 days&lt;/option&gt;
  &lt;option value=&quot;1209600&quot;&gt;14 days&lt;/option&gt;
  &lt;option value=&quot;2629746&quot;&gt;1 month&lt;/option&gt;
  &lt;option value=&quot;7889238&quot;&gt;3 months&lt;/option&gt;
  &lt;option value=&quot;15778476&quot;&gt;6 months&lt;/option&gt;
  &lt;option value=&quot;31556952&quot;&gt;1 year&lt;/option&gt;&lt;/select&gt;
  </code></pre>
  <p>...which I am setting to readonly via JS (I use Stimulus):</p>
  <pre class="lang-js prettyprint-override"><code>this.sendFrequencySelectTarget.readOnly = true;
  </code></pre>
  <p>I want to use readonly instead of disabled because disabled causes the select to not be submitted with a form, and I want it submitted.</p>
  <p>Setting to readonly does indeed make the field readonly, but it doesn't cause the select to appear any different.</p>
  <p>What I want is the field to be readonly, but its appearance to be that of a disabled select. That is, the background color dims to a gray and the cursor changes to <code>not-allowed</code> on mouseover.</p>
  <p>I have tried applying styles to selectors like <code>select[readonly]</code>, <code>select:read-only</code>, <code>select[readonly=&quot;readonly&quot;]</code>, <code>input[type=&quot;select&quot;]:read-only</code>, but none of these selectors seem to work.</p>
  <p>For example...</p>
  <pre class="lang-css prettyprint-override"><code>select[readonly] {
    cursor: not-allowed;
  }
  </code></pre>
  <p>... has no effect.</p>
  <p>How can I style readonly selects to appear disabled?</p>