From: Roan Kattouw Date: Fri, 19 Oct 2018 19:18:35 +0000 (-0700) Subject: RCFilters: Fix completely broken highlight circles X-Git-Tag: 1.34.0-rc.0~3726 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=970eda65db74071290d8517b9bbc15fd85ddde09;p=lhc%2Fweb%2Fwiklou.git RCFilters: Fix completely broken highlight circles - Correct highlights class name (mw-rcfilters-ui-highlights, not mw-rcfilters-ui-changesListWrapperWidget-highlights) - Remove -circle class suffix that the circles don't actually have - Go back to using float: right; instead of text-align: right; (you can't use text-align for things that aren't inline) - For seen/unseen watched items, apply circle mixin to the actual circles themselves, not their parents Bug: T207472 Change-Id: Iade1af4299826a4e8a2108425ace9a406f0aa8cb Follows-Up: I76fec57ff237ba02afefcea28916d8348bac9b0e --- diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.highlightCircles.seenunseen.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.highlightCircles.seenunseen.less index e90ce96477..49537f4903 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.highlightCircles.seenunseen.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.highlightCircles.seenunseen.less @@ -19,12 +19,12 @@ div.mw-rcfilters-ui-highlights { body.mw-rcfilters-ui-initialized & { display: inline-block; - .mw-rcfilters-circle( @size-circle-result, @size-circle-result, 0 ); } &-color { &-none { display: inline-block; + .mw-rcfilters-circle( @size-circle-result, @size-circle-result, 0 ); .mw-changeslist-watchedseen & { .mw-rcfilters-ui-changesListWrapperWidget.mw-rcfilters-ui-changesListWrapperWidget-highlighted & { diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less index 324c90073b..94306cabf5 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less @@ -79,53 +79,53 @@ width: 100%; } } +} - &-highlights { - display: none; - padding: 0 @margin-circle 0 0; - text-align: right; - // The width is 5 circles times their diameter + individual margin - // and then plus the general margin - width: ~'calc( ( @{size-circle-result} + @{margin-circle-result} ) * 5 )'; - // And we want to shift the entire block to the left of the li - position: relative; - // Negative left margin of width + padding - margin-left: ~'calc( ( @{size-circle-result} + @{margin-circle-result} ) * -5 - @{margin-circle} )'; - - .mw-rcfilters-ui-changesListWrapperWidget-highlighted & { - display: inline-block; - } +.mw-rcfilters-ui-highlights { + display: none; + padding: 0 @margin-circle 0 0; + // The width is 5 circles times their diameter + individual margin + // and then plus the general margin + width: ~'calc( ( @{size-circle-result} + @{margin-circle-result} ) * 5 )'; + // And we want to shift the entire block to the left of the li + position: relative; + // Negative left margin of width + padding + margin-left: ~'calc( ( @{size-circle-result} + @{margin-circle-result} ) * -5 - @{margin-circle} )'; - // This needs to be very specific, since these are - // position rules that should apply to all overrides - .mw-rcfilters-ui-changesListWrapperWidget .mw-rcfilters-ui-changesListWrapperWidget-highlights > div&-circle { - vertical-align: middle; - .mw-rcfilters-circle( @size-circle-result, @size-circle-result, 0 ); - // This is to make the dots appear at the center of the - // text itself; it's a horrendous hack and blame JamesF for it. - margin-top: -2px; - margin-right: @margin-circle-result; - } + .mw-rcfilters-ui-changesListWrapperWidget-highlighted & { + display: inline-block; + } + + // This needs to be very specific, since these are + // position rules that should apply to all overrides + .mw-rcfilters-ui-changesListWrapperWidget & > div { + vertical-align: middle; + .mw-rcfilters-circle( @size-circle-result, @size-circle-result, 0 ); + // This is to make the dots appear at the center of the + // text itself; it's a horrendous hack and blame JamesF for it. + margin-top: -2px; + margin-right: @margin-circle-result; + float: right; + } + + &-color { + &-none { + .mw-rcfilters-circle-color( @highlight-none, true ); + display: inline-block; - &-color { - &-none { - .mw-rcfilters-circle-color( @highlight-none, true ); - display: inline-block; - - .mw-rcfilters-highlight-color-c1 &, - .mw-rcfilters-highlight-color-c2 &, - .mw-rcfilters-highlight-color-c3 &, - .mw-rcfilters-highlight-color-c4 &, - .mw-rcfilters-highlight-color-c5 & { - display: none; - } + .mw-rcfilters-highlight-color-c1 &, + .mw-rcfilters-highlight-color-c2 &, + .mw-rcfilters-highlight-color-c3 &, + .mw-rcfilters-highlight-color-c4 &, + .mw-rcfilters-highlight-color-c5 & { + display: none; } - .result-circle( c1 ); - .result-circle( c2 ); - .result-circle( c3 ); - .result-circle( c4 ); - .result-circle( c5 ); } + .result-circle( c1 ); + .result-circle( c2 ); + .result-circle( c3 ); + .result-circle( c4 ); + .result-circle( c5 ); } }