Files
mediawiki-extensions-Univer…/resources/css/ext.uls.pt.less
Isarra 3ef282de00 Set a relative size for the pt-uls icon and padding so it scales properly
Instead of background-size:containing to the relative font size, but with
fixed horizontal space for it due to the padding, set both the padding and
background-size to use ems instead of px so both scale properly.

Tested in modern, cologneblue, monobook, and vector with no visible issues.
Resolves issue with icon being too large on timeless. Does not appear to
affect minerva, as that just handles it all another way.

Change-Id: Ibcea827fe15ee50c947e9c0de1e6cf053e299033
2019-09-07 11:36:34 +00:00

45 lines
1.3 KiB
Plaintext

@import 'mediawiki.mixins';
/* stylelint-disable selector-max-id */
/*
* The trigger can be placed in the personal toolbar near the username
* or near the interlanguage links.
*/
/*
* A hack to load the icon before the rest of the module is lazy-loaded.
* Copied from jquery.uls.css with the path changed.
*/
.uls-trigger {
background: transparent no-repeat scroll left center;
.background-image-svg( '../../lib/jquery.uls/images/language.svg', '../../lib/jquery.uls/images/language.png' );
// Let the SVG image fit without cropping or stretch
background-size: contain;
padding-left: 24px;
}
#pt-uls a.uls-trigger {
padding-left: 1.25em;
// Let the SVG image fit without cropping or stretch
background-size: 1.15em;
/* Fix alignment in vector: https://phabricator.wikimedia.org/T61239 */
line-height: 1;
}
/* Opera for some inexplicable reason confuses right and left padding with */
/* RTL text direction here (bug T47142). x:-o-prefocus won't match anything, */
/* but will make other browsers ignore this rule. */
/* stylelint-disable selector-type-no-unknown */
x:-o-prefocus,
body.rtl li#pt-uls {
/* @noflip */
direction: ltr;
}
/* stylelint-enable selector-type-no-unknown */
/* Don't show it to users who disabled JS */
.client-nojs #pt-uls {
display: none;
}