Applying calculation measurments to have full pixel equivalent to
`em` based properties that are necessary for user font scaling
preference ability.
Also:
* Changing watchlist icon to `em` based sizing and remodulate positioning
by putting it on `:before` elements.
* Changing calculation of `.vectorMenu h3` to acommodate down arrow indicator.
TODO:
* Remove the extra <span> (in separate commit, to make it easier
to rest cache compat during code review).
Bug: T236410
Change-Id: I8237976e05870378be3430e3e14c3e6993de3dc1
Removing
- `clear` when used with `position: absolute`
- `float` when used with `position: absolute`
Change-Id: I14661c4078e4d5f776596842674cef7e7ddcf708
With these optimisations applied, there is no longer any need for
the width value during most page views, and even for most resize
operations. As such, eagerly computing it ahead of time, even from an
idle callback, no longer makes sense.
It is still memoised because it's worth avoiding a recalc during
some of the code paths that need it. Also because this way the
logic stays compatible. I don't know for sure if all involved logic
would be able to handle the value changing over time.
Optimisations:
* Where possible, don't depend on jQuery width() working on invisible
elements. Specifically, don't depend on it giving you the width of the
element *as if* it were visible when it is invisible. When logged-out and,
when navigating special pages (e.g. Special:Blankpage), the #p-cactions
element is an emptyPortlet with `display: none;` set.
The animation logic was depending on initialCactionsWidth() providing
the width the element would have if it were visible. This is because
jQuery width(), will actually change 'display: none' to 'display: block',
force render virtually, compute the width, and then change back.
Instead of depending on this discouraged feature [1], move this calculation
to the code dealing with the animation and calculating it there, ourselves,
right after making it visible for real (but before shrinking it for the
hidden-to-visible growing expansion animation).
* Document our reliance on this discouraged feature for the remaining two
callers in expandCondition() and collapseCondition(). Both of those
need the initial width as-if visible and generally are not in charge
direclty of making it visible (so there's no better place to measure
it), and are in fact almost always called when the element is invisible,
thus pretty much exclusively depending on it, not even as an edge case.
* In collapseCondition(), optimise the logic to remember whether
collapsing is needed. This way, it won't need to call initialCactionsWidth()
if the loop iterated zero times (turns out to be impossible, but not
obvious from the code).
Follows-up 46f1d41 and 9b2bcbb.
Change-Id: I6f3a5c937eb17d194a7e00ab273768a5f2cb7cd2
Replace raster image gradients (before base64 embedded) for modern
browsers by CSS gradients. Only relying on conventional image URLs
in browsers that don't support linear-gradient.
Also
- adding a darkened border for inactive tabs to harmonize visual
perception of border as one continuous line and
- DRYing tab separator selectors, saving ~8 bytes gzipped.
Bug: T63099
Bug: T121730
Change-Id: I76d32b84ddff06a2c7ef983e6f89ca6e74257a67
Replace raster image gradients (before base64 embedded) for modern
browsers by CSS gradients. Only relying on conventional image URLs
in browsers that don't support linear-gradient.
Also updating color to Wikimedia Design Style Guide color and
removing obsolete *-ltr/*-rtl images that have been introduced in
MW core 1.16.0beta1 but have been replaced by unified 'portal-break'
image afterwards.
Bug: T63099
Bug: T121730
Change-Id: Id0ab5eb7d4a5751316ce750aff2dffbda62f6b09
Have been in since before Idfc38503d8397ffe where 'portal-break.png'
was still applied on `div.portal` and not ever after on `.portal .body`.
Change-Id: Icbaed3f9d41a46a0f5d17266c29703024ffc1412
Has been added in 8db5779682, but there's no `span` as direct child
of the watchstar `a` (any more).
Change-Id: I989cfd0c1fe30a0b4821f79e1d9377b8d888c24b
Also going with `--modifier` naming scheme when direct pseudo-class
modifying variable. And fixing small typo.
Change-Id: Ife2f9dc9cb57c063a43e4b3dfad3c737aaf3b72b
Navigation is the appropriate, general term – settling on it and
unifying file name and common abbreviation 'nav' for variable names.
Change-Id: I237b56320544de15e3b97c4806f6e2387bc54ca0
Unifying variable naming to property-identifier-modifier scheme and
use already existing variables out of mediawiki.ui variables file,
which gets imported by Vector and its variables (like
`@border-width-base`) are already in use in a few places.
Change-Id: Ic25b1517bf180a9bce437215c1309bb9f4dd15be
Unifying variable naming to property-identifier-modifier scheme.
Also removing `@padding` variable with only one single usage, instead of
extracting it from its place of application enable simpler readability.
Change-Id: I602fe645b233000bcecaeee6cf19d20e49a64c78
Unifying variable naming to property-identifier-modifier scheme.
Settling on non-em-based `line-height` values with one exception
of Vector tabs, where removing `em` would lead to different
calculation.
Also removing unneeded `inherit` assignment on content paragraphs
that has been part since Ic5ba836364.
Bug: T4013
Change-Id: I514467e4065d27de8d0ea82cdd3d23ccef6cffe3
Print-only variables should belong only to print stylesheet.
Also clarifying usage and naming throughout file.
Change-Id: I40dec1baadcf3dbbcf44252a8f577f19017fcbbc
* page-fade:
Remove redundant 'background-image' PNG fallback for
IE6-8 in '#mw-page-base' because the vertical-gradient() already
creates a solid fallback color which seems good enough for IE6-8.
Remove the 'background-color' rule which was only there to fill
the gap above the the IE6-8 PNG image fallback, which in turn
overrode the background-color rule from vertical-gradient.
The background-repeat rule is also redundant with background-image
gone.
* watch-icon-loading:
This is only used when the JS code is active and the user
clicks the watch star. It does not need a PNG fallback, as it
is only needed in Grade A browsers where the JS executes,
which are expected to support SVG.
Also removed the embedding as the rendering of article text
on page load should not be delayed by an icon that might
be used if and when the user clicks on the watchstar (and
irrelevant to logged-out users).
Bug: T121730
Change-Id: Ief4b80432fbe2ce7ebddf429f02c161048ed61d1
Unifying variable naming to property-identifier-modifier scheme, while
also collecting all non-print values variables in corresponding file.
We will amend the `em` based values to calculations that will enable
rendered full pixel values and also fix some connected
usability issues in the future.
Change-Id: I378e8a2af91fe0790708e6fb2d2e7a5718ce93c5