RCFilters: Center the checkmark in the highlight menu
authorMoriel Schottlender <moriel@gmail.com>
Mon, 5 Jun 2017 14:16:36 +0000 (17:16 +0300)
committerMoriel Schottlender <moriel@gmail.com>
Mon, 5 Jun 2017 14:30:46 +0000 (17:30 +0300)
Bug: T166874
Change-Id: Ia1a8e992f8cd6a2c7c56c71a19ff40b407bec059

resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.HighlightColorPickerWidget.less

index 88f1195..4a7c3f8 100644 (file)
@@ -9,12 +9,24 @@
 
        &-buttonSelect {
                &-color {
-                       .oo-ui-iconElement-icon {
-                               width: 2em;
-                               height: 2em;
+                       // Make the rule much more specific to override OOUI
+                       .oo-ui-iconElement-icon.oo-ui-icon-check {
+                               // Override OOUI icon dimensions
+                               // The parent is 2em with 0.5em margin
+                               // (see mw-rcfilters-mixin-circle below)
+                               // so here we want 2em - 0.5em = 1.5em
+                               width: 1.5em;
+                               height: 1.5em;
+                               // By eye, this is centered horizontally for the color circle
+                               margin-left: -0.1em;
                        }
 
                        &-none {
+                               .oo-ui-iconElement-icon.oo-ui-icon-check {
+                                       // By eye, this is centered horizontally for the white circle
+                                       margin-left: -0.2em;
+                               }
+
                                .mw-rcfilters-mixin-circle( @highlight-none, 2em, 0.5em, true );
                                // Override border to dashed
                                border: 1px dashed #565656;