Commit graph

229 commits

Author SHA1 Message Date
Arlo Breault f0505d28a9 Hide figcaptions for plain and frameless figures
Only thumb and frame have visible captions.  This matches core's
mediawiki.skinning/content.media-common.less

Bug: T318300
Change-Id: If5713c8d629ec3c84abdb5c99eedf6f0bb408ddf
2022-09-27 17:18:02 +00:00
Arlo Breault 1d123e02d1 Remove redundant styling rules and fix center/none halign for figures
The rules in mediawiki.skinning.content.parsoid were made redundant by
25890e3ece.  There are some more rules
there that should be audited to see if they're still necessary or can be
moved to a more general location now that wgParserEnableLegacyMediaDOM
is being disabled and they apply more broadly than just when Parsoid
styles are requested.

Missing rules for mw-halign-center and mw-halign-none are added.

Bug: T318300
Change-Id: I34fb1ce76de24eec3b136dc6dc9ab4e07e36b809
2022-09-27 17:17:48 +00:00
Arlo Breault 25890e3ece Fix media alignment since disabling wgParserEnableLegacyMediaDOM
Default horizontal alignment based on page content language.
See I1a2cc989c35506172af361cd86a4a378ddf58ecb

Bug: T318300
Change-Id: I7acf07fb22bba6aae97db00e84eddaf78361dfe8
2022-09-22 13:26:16 -04:00
Arlo Breault 06000903e5 Restrict figure to the size of the media
This was proposed in I2683dcf91195ebc69686620ed11d771a9c0826df

Bug: T305357
Bug: T318300
Change-Id: If2d28847444c3f301db4669d75c7f023e68d355f
2022-09-22 17:00:29 +00:00
Fomafix 269dd44aa1 Fix typo
Bug: T201491
Change-Id: I6deb75bca2cc6d4a6f254da80d51a3c067f9ca3d
2022-08-24 19:04:37 +00:00
Ed Sanders c19cdec800 Replace bugzilla bug numbers with Phabricator task IDs
Change-Id: I0e8bd586ee0d3d9c3a1d5c14e96e2d0adc64a427
2022-07-18 14:20:11 +01:00
Jon Robson 31c317308c Do not use the SkinMinervaReplaceNotificationsBadge hook to add Echo
Based on work done in I7b9cf401936be2421d0ad4efe963486404d50e6a
we switch to the standard notifications menu for Echo generation

Bug: T301263
Change-Id: Id611cc07aebfb94e50bde8902cbc0627393fa926
2022-05-27 18:14:47 +00:00
jenkins-bot db4cc4f8c9 Merge "Remove deprecated vendor prefixes and their mixins" 2022-05-23 23:37:30 +00:00
Ed Sanders d926771bd8 Remove deprecated vendor prefixes and their mixins
Additional change:
* The animation stylesheet pulled down for the storybook instance
in dev-scripts/setup-storybook.sh is no longer referenced anywhere
in assets so can be removed.

Bug: T306486
Bug: T308351
Bug: T308360
Change-Id: Ia9f2a05cde2724486f7e449261c5d4875388f5ab
2022-05-23 23:18:43 +00:00
jenkins-bot 9cf1c286e5 Merge "Follow-up I24090527: Add .mw-parser-output scope to limit to parsed output" 2022-05-23 22:57:55 +00:00
Ed Sanders 816aac97bc Follow-up I24090527: Add .mw-parser-output scope to limit to parsed output
This scope is used elsewhere in the skin to limit styles
to parsed output. Confusingly `.content` also applies to
the body area of special/action pages.

Bug: T304148
Change-Id: Id5aa760c8441e589e813c5cc0c12c86469cde714
2022-05-20 17:49:05 +01:00
Ed Sanders 86caa17713 build: Update linters and linter config
* Update stylelint-config-wikimedia to 0.13.0
* Ensure eslintrc.js and root files are linted
  with server config

Change-Id: I59c49fedd5b0c4c5620f960b78e4f781a6bc5abb
2022-05-18 14:33:23 +01:00
Ed Sanders eaeca6f328 Move dd scroll hack to .content scope
Bug: T304148
Change-Id: I24090527206e4ff7d53c5256cce1bd9981be8ae9
2022-05-03 15:59:28 +01:00
Bartosz Dziewoński 2690ea3a9c Style section headings using flexbox
Bug: T305971
Change-Id: I383971a1bebafd1af1e971ad02648bd943b0c5ee
2022-04-14 22:16:01 +02:00
Jon Robson 0fe451b23a FIXME cleanup
- Remove cached HTML relating to heading change
( I2ffdedd64414ffb3c6e441391a75fd6e744847a4)
- Update invalid instruction for selector in footer (I0bfc7f977cdaf5ce8873103346c64121d704b86c)
It appears this rule cannot yet be removed.
- Update classes for contributions icon on user pages
(I6c908acd70c0dca5bcb1754d1b25d3da2389feb8)

Change-Id: I271abf3d29dfcfd19d654514fb3f6d6e257505ab
2022-04-06 20:17:22 +00:00
Jon Robson 0e963397a0 Remove user navigation min width and width
This is creating a large gap between search icon and user navigation
icons on the right.

Bug: T302753
Change-Id: Ic24ab36d0a9c394c5c88b375bdfbe529be93ace6
2022-03-03 09:52:56 -08:00
Jon Robson fade8ad2c2 Search icon should be part of search form for grade C browsers
Cached HTML friendly change which works by limiting styles to the new
HTML which is identified by the existence of the
minerva-search-form class

Bug: T301257
Change-Id: I61ba77a349a38e6a05f87f600ec31bcbf36f306a
2022-02-22 08:40:55 -08:00
Jon Robson c88a68b38a The warningbox class is deprecated
Bug: T300306
Change-Id: I178a01a457c26981301c5171f0293402fbf9d377
2022-02-07 18:54:19 +00:00
jdlrobson f9a8703a64 Minerva uses core page title handling
Bug: T265892
Change-Id: I2ffdedd64414ffb3c6e441391a75fd6e744847a4
2021-12-20 19:39:42 +00:00
Gagah Pangeran Rosfatiputra e49dd310e8 Make whole area of last edited section to be tappable
Now whole area of last edited section (from edge to edge) is tappable
and linked to history page.

Bug: T163853
Depends-Onː I3d1f272a27c5c9b0b0928b5c0eaeb3f6e270532b
Change-Id: I3c35bbaafea3376cd2f9dccfd13bfe4845fd6823
2021-12-20 16:31:42 +00:00
jenkins-bot 99e72700d2 Merge "Fix external icon specificity" 2021-11-12 23:05:08 +00:00
bwang e5cb874ea2 Move header styles into header.less
Change-Id: Ia68745a74e988fe10fbb77ccfbc10ee347899d77
2021-11-12 11:56:49 -06:00
Volker E ff24bbe030 Fix external icon specificity
We've changed the selector in MW core to `.mw-parser-output a.external`
a while ago. In order to show the correct image, selector needs to be
amended.

Change-Id: I83d7b4c8be2eda1876959d000e0fb2d493e12cbc
2021-11-09 12:13:43 -08:00
bwang f1c828e19d Refactor Minerva header and overlay headers to use flexbox
- Move new header styles to header.less
- Remove unnecessary styles
- Update search overlay to be aligned with the heading searchbox on all screen sizes
- Add temporary skin style to ensure no regressions in mobile VE

Bug: T294033
Change-Id: Ib9867d1b76b602f3355e9f2689f137bc84b0c929
2021-11-04 15:50:00 -05:00
jdlrobson 1f2b7dff15 Minerva uses desktop footer for license
After this change, in desktop Minerva the copyright
text in the footer should match desktop Minerva.

In mobile Minerva the copyright text in the footer
is shortened and doesn't contain terms of use.
It should match Vector mobile
?useskin=vector&useformat=mobile

Depends-On: I3473908e08f643b4c60aafc470dd124516955323
Change-Id: I2895975aaa1d09d228f80aff74381e88034a0137
Bug: T289401
2021-11-03 18:38:44 +00:00
bwang a2d065c062 Update anon talk messages to show on non-main namespaces
- Loads messageBox styles on non-main namespaces
- Add messageBox styles to 'skins.minerva.scripts' module for MobileFrontend's edit overlay page
- Prevent warning box from showing with empty message

Bug: T284642
Change-Id: I70d0d86671384210cc3ab43cb1d350ff2a862fd9
2021-10-27 21:29:42 +00:00
bwang b4fd1498bc Add yellow talk page message warning to non-main namespace pages
Bug: T284642
Change-Id: I2895975efe1d09d228f80aff74381e88034a0137
2021-10-26 10:44:28 -05:00
jdlrobson a7b66f6f63 Remove MinervaTemplate::getContentHtml
* Move method to SkinMinerva
* Turn preparePageContent into a getter that returns the subject
page
* Use getSubjectPage in template

For mobile special pages this now means the page has two .content elements
On those pages I've disabled the initial content element. It also means
various .content <heading> and .content ul  rules now apply that need to be
disabled.

While testing several other issues were taken care of - for example
the h2 in errors

Depends-On: I7761396d6a33830f279742be01240796573556a7
Bug: T291871
Change-Id: I13bc4b5dae7aed86eca31ef306212365e1759481
2021-10-15 20:49:23 +00:00
jdlrobson 3a88911209 Remove whitespace to right of search input in overlay
Bug: T292107
Change-Id: I1143747600a1ffb25dcfe8600c5cd352afb25159
2021-10-12 16:26:53 +00:00
jdlrobson d990f99b9e list-header styles should be specific enough to override h2 styles
Change-Id: I83e6992b0a63f456e1c2f7d17c87cbfc903d9c60
2021-10-06 23:56:37 +00:00
Derk-Jan Hartman c0c9a82851 Rework the Minerva ToC
- reserve space for the icons
- break long urls in the ToC
- fix right margin on the ToC
- support without JS

Bug: T292338
Change-Id: Ic279047f297fa132b87b77b6d7127b797015f92a
2021-10-06 10:47:56 +00:00
jenkins-bot 7f9bbebf8c Merge "Search header should be vertically centered, not top aligned(take 2)" 2021-09-29 17:56:02 +00:00
Jdlrobson e09a336500 Search header should be vertically centered, not top aligned(take 2)
The 27525d0bff change renamed header to minerva-header, but neglected
the fact that this class was being used in the Overlay as well.

Bug: T292071
Change-Id: I05c1589723b68cf07c874f299f1960548f53e8ff
2021-09-29 16:21:34 +00:00
Nicholas Ray 6067d2689b Change footer logo from a heading element to a div
Also, remove old CSS selector that was preserved for caching.

Bug: T288362
Change-Id: Iab3531229b64e0b9ee9268f6480a1417872d6107
2021-09-27 15:04:55 -06:00
Nicholas Ray 6df49e3da4 Add alt attribute to logo
* Adds alt attribute with a value of the `mobile-frontend-sitename`
(previously called `mobile-frontend-footer-sitename`). The message was
changed because this affects both the footer and the header's logo.

* Adds a `minerva-footer-logo` class to the logo in footer.mustache in
preparation for changing that element from an h2 to a div. Given caching
issues (old CSS with new HTML; new CSS with old HTML are both
possibilities), we need to do this in two separate deploy cycles.

Bug: T288362
Change-Id: I3ecbf8fdcae72a0ded7f60c559259f312b8ef15d
2021-09-22 02:01:42 +00:00
jdlrobson 5263b09397 Standardize use of buttons and icons in Minerva
* Adds button hover/focus states to all Minerva button icons
* Removes the deprecated mw-ui-icon-before selector

Depends-On: I4eb28eae4c4e23d58f1f85bc41c0caf77197d8a1
Bug: T288678
Change-Id: I490534f9f704a733191b459c8ee071848c436001
2021-09-17 15:36:54 +00:00
jdlrobson 8c1afd97a3 Minerva uses centralized link styling colors
Making Minerva use the `elements` feature is not
practical at the current time. In lieu of that, we
update the link colors to use the core definition.

The red links and external link colors
can come from the "content-links" module.

This also adds support for the underlining user link preference
and better plain link support.

Bug: T274717
Change-Id: I600257e6f4430f166331c4ea4f3a72d87aa377d8
2021-09-02 14:55:24 +00:00
jdlrobson ca18ad75d3 minerva-header class is now in cached HTML, remove old header class
This completes the migration from header to minerva-header

Bug: T172626
Change-Id: Ibb86359e683e08d86091f855e3813a99e0ad2cee
2021-07-20 18:36:39 +00:00
ExE Boss 27525d0bff Fix style conflict with content using class="header"
Content using `header` as a CSS class was affected by skin styles
in Minerva being insufficiently specific to the skin‑specific elements.

This changes Minerva to use `class="minerva‑header"`, thus avoiding
the conflict and matching what Vector does.

Bug: T172626
Change-Id: Id8fbe61b2d1d4a89ec11ddfdf7837be797b3bd20
2021-07-16 20:39:24 +00:00
jdlrobson 4f2f1bb349 Drop duplicate styles in Minerva
These styles are also applied inside MobileFrontend as they should apply
to all skins, not just Minerva.

Several styles for desktop Minerva are amended with a comment.

Bug: T253370
Change-Id: Ib23024d192f331ef76007dbd9ef54596cc1adb0c
2021-06-28 12:26:12 -07:00
jenkins-bot fb18094a40 Merge "Move skins.minerva.content.styles into skins.minerva.base.styles" 2021-06-22 18:44:03 +00:00
jdlrobson 18ad3fa457 Address some FIXMEs in styles
A comment says that the line of code can be removed after cached
HTML is not a problem. This code for ui.less was added in April 2019, so is
not a problem. The code for footer.less was added in April 2020 so is also
not a problem.

Another comment says external link unsetting can be removed after
a ticket has been resolved, which has been resolved and I can confirm
is no longer needed.

The header > div a rule only matches the link wrapping the logo
inside the branding-box. It no longer matches the hamburger or notifications
icon  which make use of nav elements, and to make matters worse
interferes with the goal in T282473

Bug: T285261
Change-Id: Ie7777b4b53355cf0dc48d6447f63299156254b6c
2021-06-21 17:56:48 +00:00
Timo Tijhof 0d61c78f73 Move skins.minerva.content.styles into skins.minerva.base.styles
This could be made even simpler by not using a LESS varialbe for
hacks.less, but loading it conditionally through the moduel def.
But, as a first step we can merge the two as-is.

Given that the subject and target are always referenced together
in page views, there is no need to keep an alias around. However,
I'm keeping it anyway so as to not produce any
`/* {"skins.foo":"missing"} */` appendix to the stylesheet response
for these cached URLs.

Bug: T266361
Change-Id: I8578faab8ca32bd49be90711cbd5e182763b8065
2021-06-21 17:50:37 +00:00
mainframe98 87934a3034 Use content-body skin feature
This styles parser errors, which were previously unstyled.
It removes the need for the clear for the table of contents
on stub pages

Additional change:
* The base styles module increases with this change
* While testing bundlesizes I noticed that the bundlesize for the
content styles is outdated and have updated it (this is unrelated
to the inclusion of the new feature)

Bug: T281228
Change-Id: I8e099b18f0866201cba378f6110913cdab478c4c
2021-05-14 15:42:19 +00:00
jdlrobson 685387220f Message box styles for Minerva come from core
Just as before styles for message boxes will be
kept off the critical path of most page views and
loaded on special pages, old revisions and action= URIs,
however unlike before the CSS will come from the definition
in core.

It must also be loaded in JavaScript for compatibility
with the use of warnings in JavaScript, for example 
MobileFrontend overlays.

This change will allow us to remove the
mobile.messageBox.styles module in MobileFrontend
I8b6bdfceaf33b9527dbe6790d2a39e335fb692b2

Bug: T233160
Change-Id: I7d8d1d34621c36c26ec03a3773d4d1e67bd14f2e
2021-04-12 21:45:53 +00:00
Volker E 3b1dc8b431 icons: Update to latest 'search' icon and remove obsolete code
Removing historically grown code and icon and replace by latest
'search' icon. It is slightly smaller 18x18dp on 20x20dp canvas, and aligns with 
icon guidelines of Design Style Guide.

Bug: T213580
Bug: T275563
Depends-On: I752ea81aaff51059af942daa008a1b898dbc2d06
Change-Id: Ia7f50ec7534e303dcfd311b301a764936f7729df
2021-03-09 08:21:23 +00:00
jdlrobson a7db7341ca Last modified bar should not show external link icon
A new rule resetting padding-right and background-image on
a.external inside footer is added.

Additional change:
* Merge all styles relating to the last modified bar into a single
component file for consistency with Vector and easier lookup.

Bug: T267464
Change-Id: I558f0756264e92ca757a99e47a53564c3ecd8b71
2020-11-17 03:36:01 -08:00
Peter Ovchyn 402aaad6ff Move css styles related to lazy-image-placeholder to skinStyles
`lazy-image-placeholder` is needed only when MobileFrontend is enabled.
So it makes sense to move those styles to mobile.init css. See more details here: T199351#6380240

Bug: T260406
Change-Id: I16ca734af33fb0f3c4c67f20bbca8631279d7778
2020-08-18 16:51:02 +00:00
Peter Ovchyn 8581b2c16b Make lazy-image-placeholder vertically aligned middle by default
All images in MinervaNeue skin are vertically aligned `middle`,
so placeholder for them should be consistent.

Bug: T199351
Change-Id: I5fa00bd0c02e67059543389e4bbd07b073a2c5e0
2020-08-17 18:30:21 +00:00
Ed Sanders e8d5462bb3 Apply infobox styles to any element with the class
MoveLeadParagraphTransform treats div.infobox the same as table.infobox,
and should be fixed to match any element too.

Fix specificity of tablet overrides.

Bug: T258011
Change-Id: I9ada6d1b8b19b46dba6527f1f66edd2547fa0c88
2020-07-17 22:09:30 +01:00