jenkins-bot has submitted this change and it was merged.
Change subject: MediaWiki Theme: Drop unnecessary pseudo-element of
RadioInputWidget
......................................................................
MediaWiki Theme: Drop unnecessary pseudo-element of RadioInputWidget
Follows I5cc5e5acd, which did this for CheckboxInputWidget.
Change-Id: I9461e157f45ed56bd38baee33d4a9e581a8fc348
---
M src/themes/mediawiki/widgets.less
1 file changed, 20 insertions(+), 20 deletions(-)
Approvals:
Bartosz Dziewoński: Looks good to me, approved
jenkins-bot: Verified
Objections:
Krinkle: There's a problem with this change, please improve
diff --git a/src/themes/mediawiki/widgets.less
b/src/themes/mediawiki/widgets.less
index 0b16a18..8df9b33 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -287,38 +287,38 @@
// Prevent the fake span from jumping to the next line of text
white-space: nowrap;
+ // Keep margin between the widget and its label. (Undoes
oo-ui-inline-spacing.)
+ &:last-child {
+ margin-right: 0.5em;
+ }
+
* {
font: inherit;
vertical-align: middle;
}
+ // This input element is visually replaced by the the span that follows
input[type="radio"] {
- // we hide the input element as instead we will style the span
that follows
- // we use opacity so that VoiceOver software can still identify
it
+ // Use opacity so that VoiceOver software can still identify it
opacity: 0;
- // render "on top of" the span, so that it's still clickable
- position: relative;
+ // Render "on top of" the span, so that it's still clickable
z-index: 1;
+ position: relative;
- // having a margin might offset the checkbox from the pseudo
element
- // making only the overlap region react to events
+ // Having margin would offset the input from where the span is
absolutely positioned,
+ // making only the overlap region receive events
margin: 0;
- // ensure the invisible checkbox takes up the required width
+ // Ensure the invisible input takes up the required width
width: @input-size;
height: @input-size;
- // This is needed for Firefox mobile (See bug 71750 to
workaround default Firefox stylesheet)
+ // Needed for Firefox mobile (See bug 71750 to workaround
default Firefox stylesheet)
max-width: none;
& + span {
cursor: pointer;
- margin: 0 0.2em;
- }
-
- & + span::before {
.oo-ui-transition(background-size 0.2s
cubic-bezier(0.175, 0.885, 0.32, 1.275));
- content: '';
.oo-ui-box-sizing(border-box);
position: absolute;
left: 0;
@@ -335,31 +335,31 @@
background-size: 0 0;
}
- &:checked + span::before {
+ &:checked + span {
background-size: 100% 100%;
}
- &:active + span::before {
+ &:active + span {
background-color: @input-active-color;
border-color: @input-active-color;
}
- &:focus + span::before {
+ &:focus + span {
border-width: @input-focus-border-width;
}
- &:focus:hover + span::before,
- &:hover + span::before {
+ &:focus:hover + span,
+ &:hover + span {
border-bottom-width: @input-hover-border-bottom-width;
}
- &:disabled + span::before {
+ &:disabled + span {
cursor: default;
background-color: @input-disabled-color;
border-color: @input-disabled-color;
}
- &:disabled:checked + span::before {
+ &:disabled:checked + span {
.oo-ui-background-image-svg('@{oo-ui-default-image-path}/icons/circle-invert');
.oo-ui-background-image-safari('@{oo-ui-default-image-path}/icons/circle-invert');
}
--
To view, visit https://gerrit.wikimedia.org/r/191539
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9461e157f45ed56bd38baee33d4a9e581a8fc348
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits