@import "mediawiki.mixins"; @import "mediawiki.ui/variables"; @import "mediawiki.ui/mixins"; // Helpers .mixin-mw-ui-anchor-styles( @mainColor ) { color: @mainColor; // Hover state &:hover { color: lighten( @mainColor, @colorLightenPercentage ); } // Focus and active states &:focus, &:active { color: darken( @mainColor, @colorDarkenPercentage ); outline: none; // outline fix } // Quiet mode is gray at first &.mw-ui-quiet { .mixin-mw-ui-anchor-styles-quiet( @mainColor ); } } .mixin-mw-ui-anchor-styles-quiet( @mainColor ) { color: @colorTextLight; text-decoration: none; &:hover { color: @mainColor; } &:focus, &:active { color: darken( @mainColor, @colorDarkenPercentage ); } } /* Anchors The anchor base type can be applied to A elements when a basic context styling needs to be given to a link, without having to assign it as a button type. mw-ui-anchor only changes the text color, and should not be used in combination with other base classes, such as mw-ui-button. Markup: Progressive Constructive Destructive .mw-ui-quiet - Quiet until interaction. Styleguide 6.2. */ // Setup compound anchor selectors (such as .mw-ui-anchor.my-ui-progressive) .mw-ui-anchor { &.mw-ui-progressive { .mixin-mw-ui-anchor-styles( @colorProgressive ); } &.mw-ui-constructive { .mixin-mw-ui-anchor-styles( @colorConstructive ); } &.mw-ui-destructive { .mixin-mw-ui-anchor-styles( @colorDestructive ); } }