mediawiki.ui: checkbox: Fix gap between bevel and border
authorPrateek Saxena <prtksxna@gmail.com>
Wed, 5 Nov 2014 11:49:04 +0000 (17:19 +0530)
committerPrateek Saxena <prtksxna@gmail.com>
Wed, 5 Nov 2014 12:05:22 +0000 (17:35 +0530)
Use an inset box-shadow instead of adding another pseudo
element. This removes the gap and also keeps the look
consistent on different zoom levels.

Change-Id: Ibf75a09ef9955a5d1cb9d80bff2cce001b60d7c6

resources/src/mediawiki.ui/components/checkbox.less

index 35a44cb..913f901 100644 (file)
                &:active,
                &:focus {
                        + label {
-                               &::after {
-                                       content: '';
-                                       position: absolute;
-                                       width: @checkboxSize;
-                                       height: @checkboxSize - @focusBottomBorderSize + 0.08; // offset by bottom border
-                                       // offset from the checkbox by 1px to account for left border
-                                       left: 1px;
-                                       border-bottom: solid @focusBottomBorderSize lightgrey;
+                               &::before {
+                                       box-shadow: inset 0 -@focusBottomBorderSize 0 0 lightgrey;
                                }
                        }
                }