2014-03-18 20:52:39 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor MediaWiki UserInterface MWParameterResultWidget styles.
|
|
|
|
*
|
2020-01-08 17:13:04 +00:00
|
|
|
* @copyright 2011-2020 VisualEditor Team and others; see AUTHORS.txt
|
2014-03-18 20:52:39 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
.ve-ui-mwParameterResultWidget {
|
|
|
|
padding-right: 0.25em;
|
|
|
|
}
|
|
|
|
|
2020-05-26 17:22:29 +00:00
|
|
|
.ve-ui-mwParameterResultWidget.oo-ui-optionWidget-highlighted {
|
|
|
|
background-color: #e1f3ff;
|
|
|
|
}
|
|
|
|
|
2014-03-18 20:52:39 +00:00
|
|
|
.ve-ui-mwParameterResultWidget .oo-ui-optionWidget-icon {
|
|
|
|
top: 0.25em;
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ve-ui-mwParameterResultWidget-label,
|
|
|
|
.ve-ui-mwParameterResultWidget-names,
|
|
|
|
.ve-ui-mwParameterResultWidget-description {
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
2018-12-03 18:20:02 +00:00
|
|
|
/* HACK: Based on the expected width of this widget, using % produces unreliable results */
|
2014-03-18 20:52:39 +00:00
|
|
|
max-width: 33em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ve-ui-mwParameterResultWidget-label {
|
|
|
|
font-weight: bold;
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ve-ui-mwParameterResultWidget-names {
|
|
|
|
float: right;
|
|
|
|
font-size: 0.9em;
|
2018-11-05 11:50:12 +00:00
|
|
|
padding: 0.2em 0;
|
2014-03-18 20:52:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.ve-ui-mwParameterResultWidget-name {
|
2018-11-05 11:50:12 +00:00
|
|
|
padding: 0.1em 0.25em;
|
2014-03-18 20:52:39 +00:00
|
|
|
margin-left: 0.5em;
|
2017-08-16 20:42:24 +00:00
|
|
|
color: #54595d;
|
Reduce duplication/clutter in MWParameterResultWidget
The MWParameterSearchWidget that shows a list of all available
template parameters displays the (human-readable) label and
description of each parameter (both given via <templatedata>), as
well as the parameter's internal name and aliases, if there are
any.
This turns out to be non-helpful in the majority of situations:
* When there is no <templatedata> yet, there are no labels.
Instead, the names are used as labels, which means they are
*all* identical and everything is shown twice.
* The same happens when manually adding an "unknown field". Simply
start typing, and you can add parameters with any name. What you
type is shown twice (actually 3 times, 1 time in the input
field, 2 times in the result widget).
* Many template parameters are already nice, human-readable. Even
if <templatedata> exists and specifies labels, these labels are
often identical to the names. There is no need to come up with
something else if the name is already good enough. (Exception:
Localizations, but these are rare.)
Furthermore, this is a *search* result widget. The pretty much
only reason the names and aliases are shown is because the user
can search for them, and needs to understand why a parameter was
found. This still works fine.
For comparison, when a parameter is required you will *never* see
it's name, because the parameter is always there, and never shows
up as a search result.
Change-Id: I6b1dca1c94b2c496930b5bfdfe1c6f76898faa2a
2020-08-20 10:04:48 +00:00
|
|
|
background-color: #fff;
|
2017-08-16 21:03:49 +00:00
|
|
|
border: 1px solid #c8ccd1;
|
|
|
|
border-radius: 2px;
|
2014-03-18 20:52:39 +00:00
|
|
|
}
|
|
|
|
|
Reduce duplication/clutter in MWParameterResultWidget
The MWParameterSearchWidget that shows a list of all available
template parameters displays the (human-readable) label and
description of each parameter (both given via <templatedata>), as
well as the parameter's internal name and aliases, if there are
any.
This turns out to be non-helpful in the majority of situations:
* When there is no <templatedata> yet, there are no labels.
Instead, the names are used as labels, which means they are
*all* identical and everything is shown twice.
* The same happens when manually adding an "unknown field". Simply
start typing, and you can add parameters with any name. What you
type is shown twice (actually 3 times, 1 time in the input
field, 2 times in the result widget).
* Many template parameters are already nice, human-readable. Even
if <templatedata> exists and specifies labels, these labels are
often identical to the names. There is no need to come up with
something else if the name is already good enough. (Exception:
Localizations, but these are rare.)
Furthermore, this is a *search* result widget. The pretty much
only reason the names and aliases are shown is because the user
can search for them, and needs to understand why a parameter was
found. This still works fine.
For comparison, when a parameter is required you will *never* see
it's name, because the parameter is always there, and never shows
up as a search result.
Change-Id: I6b1dca1c94b2c496930b5bfdfe1c6f76898faa2a
2020-08-20 10:04:48 +00:00
|
|
|
.ve-ui-mwParameterResultWidget-name.ve-ui-mwParameterResultWidget-alias {
|
|
|
|
background-color: #eaecf0;
|
2014-03-18 20:52:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.ve-ui-mwParameterResultWidget-description {
|
|
|
|
clear: both;
|
2017-08-16 20:42:24 +00:00
|
|
|
color: #54595d;
|
2014-04-08 19:15:15 +00:00
|
|
|
}
|