pico icon indicating copy to clipboard operation
pico copied to clipboard

No loading indicator on submit or reset input buttons

Open sonnyp opened this issue 6 months ago • 1 comments

Describe the issue

https://picocss.com/docs/loading says any button can have a loading indicator

but aria-busy="true" has no effect on a <input type="submit"/> or <input type="reset"/>

Current Behavior

<input type="submit" aria-busy="true"/>
<input type="reset" aria-busy="true"/>

Displays the buttons without a loading indicator.

Expected Behavior

I expect the same behavior as

<button aria-busy="true"/>

sonnyp avatar Aug 18 '25 09:08 sonnyp

Not to be pedantic, but the documentation states "any button", but what you've provided are two inputs.

The reason why your request is not feasible is because Pico uses the ::before pseudo-element to apply the --pico-icon-loading variable as the background image. However, the ::before psuedo-element cannot be applied to replaced elements and inputs are treated as replaced elements because of the potential for type="image".

Per MDN:

::before pseudo-elements can't be applied to replaced elements such as img, whose contents are determined by external resources and not affected by the current document's styles.

dday9 avatar Nov 03 '25 17:11 dday9