Commit graph

7 commits

Author SHA1 Message Date
Jon Robson 0d8dcb2f4e InputBox uses Codex instead of mediawiki ui
Bug: T353371
Change-Id: Iedfe34accc0c3469c9391208a1898cb544e896cb
2024-06-25 23:00:32 +00:00
gerritbot 685ce2b154 styles: Replace 'mediawiki.ui/variables' call with skin variables
Replacing 'mediawiki.ui/variables.less' @import with
new skin-aware 'mediawiki.skin.variables.less' standard.
Also
- replacing several static values with new Codex design token featuring
  skin variables.
Bump to required MediaWiki core version >= v1.41.0.

Bug: T332541
Change-Id: I1ba1bed9b4f5d49014d2e51c116df8b0f320b949
2023-03-30 10:09:42 -07:00
Derk-Jan Hartman 8089db47fe Remove an !important and use classdoubling instead
!important creates unnecessarily high specificity

Change-Id: Ia7abc6847d9c77fe1e68277ed0246fde623d9336
2021-12-05 22:43:09 +01:00
Fomafix 3ee49b4cfc Use // comments in LESS
Change-Id: Ie0011ba2d4d280302613c2ebc8d9d34dde82a0fe
2021-10-16 19:48:31 +00:00
Fomafix 14a2d08712 Remove styles for cached old HTML
The cache is now expired.

This change is a follow-up to 93351fb7d9.

Change-Id: Ia42e081aa2f74bab72eef9227ba76057c15ba64f
2021-10-16 19:47:25 +00:00
Umherirrender cec79baa9d build: Run stylelint for less files
css was converted to less in I2c75e09dd3f89fa11fca311b4e1f8133946b01b1

Change-Id: I7a8a81b80c4b1b34416a3c2c7801e8f2dcca894a
2021-09-28 17:30:00 +02:00
Timo Tijhof 93351fb7d9 Use native <input required> instead of JS-based disabled toggling
Remove the JavaScript module and its logic to toggle the disabled
state on the submit button. Instead, let the browser handle this
natively by setting the `required` attribute, which naturally prevents
early submissions.

Retain the current styling for 99% of cases by using the
:required:invalid selector to target the submit button to make it
appear disabled. This slight duplication of styles is needed because,
despite the form effectively being disabled natively, the core
mediawiki-ui styles only account for :disabled on the button directly
and not e.g. inherited via form:invalid. It is also unclear whether
we would want that, since there is some value to be had from having
the form give a consistent look with a progressive button that can
be submitted even at the wrong time to yield an assistive message to
the required field, so hence handling this locally for now instead of
with a generalised approach.

In order to use the required true/false idiom, I have switched the
generating of the HTML string from the old Xml::element method
to Html::element. This means there is no need to store it in an array
first and conditionally set it since true/false will result in absence
or required="" as needed.

As side-effect from this, redundant attributes like value="" and
type="text" are ommitted from the output, just as MediaWiki core does
more generally.

Bug: T283303
Change-Id: I2c75e09dd3f89fa11fca311b4e1f8133946b01b1
2021-05-21 21:04:02 +01:00