Commit graph

988 commits

Author SHA1 Message Date
Bartosz Dziewoński 50fc799b07 Fix various problems with print styles
These styles have drifted away from the HTML structure since they were
written in 2017.

General:
* Add some comments
* Replace complicated selectors with simple class selectors

styles.less:
* Hide section edit links (previously we relied on MobileFrontend
  styles, which one handled some cases - removing them in I9a88b80c2a)
* Show print footer, hide Minerva footer

header.less:
* Remove FIXME (resolved in c323c6858a).
* Fix hiding the search box. In 0bee6a1eb6 a <form> for the search box
  was added to the header, and these styles (using tag selectors) were
  not updated. Use class selectors instead.
* Remove styles for <h1>. The element was changed to <a> in
  a905b1c161, styles to override font-size etc. are no longer needed.
* Consolidate 'padding' rules and remove unneeded !important.

article.less:
* Replace the `[ class|='mw-content' ]` selector, which was not
  matching anything. It would match elements with `class="mw-content"`
  or `class="mw-content-…"`, but the node we're trying to style has
  `class="mw-body-content mw-content-ltr"` (since 7cda5b0bf8 in
  MediaWiki core). Use a class selector instead.
* Replace the `.mw-body > .content` selector too. While this one
  works, it is also needlessly complicated.

footer.less:
* Fix and simplify how last-modified info and license text is unhidden
  (while other parts of the footer remain hidden).
* Remove styles for .license. Unused since 1f2b7dff15, use the desktop
  footer added in that commit instead.
* Use the desktop footer for last-modified info, since it's more
  suitable for "archiving" (it has a date rather than time ago).

Bug: T323636
Change-Id: I21ef26355e3e6dd8b0c34ae933b7f5b0b222655c
2023-01-03 21:57:11 +00:00
jenkins-bot 754b73c8e2 Merge "Tweak margins/paddings of Echo icons" 2022-12-14 16:43:52 +00:00
jenkins-bot 3c6a66d1af Merge "Use standard subtitle markup" 2022-12-14 04:13:59 +00:00
Bartosz Dziewoński 433458ba98 Tweak margins/paddings of Echo icons
On desktop, the "Alert" icon had more white space around it than the
"Notice" icon, and its popup displayed with a different offset.

On mobile, the combined icon jumped around while the page was loading.

Change-Id: Icdd5bc6e8478f3453b6461a35b7fb53e8ab014e9
2022-12-14 04:36:14 +01:00
Jon Robson f6f2c4f1e4 Show both Echo icons in desktop Minerva
For consistency with desktop Vector, Minerva should show two
icons. This also removes the duplicate #pt-notifications-alert
element in the skin.

Bug: T313609
Change-Id: I6449f0c29b52fd2092d63fbef23205ed8f57d50f
2022-12-14 02:08:44 +00:00
Jon Robson 028ab69a8b Echo icon should reflect seen status
Bug: T310358
Change-Id: I681a2540979ceeca677e576fca2efd91e1b80e15
2022-12-13 16:21:50 -08:00
Jon Robson 64fb00e237 Use standard subtitle markup
Bug: T324876
Depends-On: I8e538939a6d7d4474f2e96b93040f3c68c2f98ec
Depends-On: I4b178f67b6718fa9a84827e1804ec4eb1483f735
Change-Id: Ie24c0215d07d5e4605d8479ed9e950a3d9c9b086
2022-12-13 01:32:37 +00:00
Arlo Breault c4fe708a36 Remove b/c for media typeof
Bug: T270150
Bug: T203211
Depends-On: I44b3fb432dd00120a4d5cd5556ba5ba8bc4e65d5
Change-Id: I58d8ce9e2e58916d55c8d838c3fbfb96e2a05f02
2022-11-30 13:55:32 -05:00
jenkins-bot c966853dca Merge "Remove styles for dd that cause content to be cut off" 2022-11-23 01:41:01 +00:00
Bartosz Dziewoński 4648848cbf Remove styles for dd that cause content to be cut off
They reference T160946, but in that task it was explained that the
problem was caused by faulty wikitext (T160946#3230740), so I don't
know why they were added.

Bug: T323640
Change-Id: I73d654d1f9127e22365d94909681c1c5f5f39597
2022-11-22 20:32:56 +01:00
jenkins-bot e914576438 Merge "Disable auto-capitalization hint on search field of wikis with $wgCapitalLinks = false" 2022-11-21 13:24:21 +00:00
Jon Robson 9ea73b920e Disable auto-capitalization hint on search field of wikis with $wgCapitalLinks = false
Pass the value of autocapitalize to the SearchOverlay in MobileFrontend

Depends-On: I98ea142b2b39d699bb144eb528b12a5a4dcd0667
Bug: T251664
Change-Id: I082233fd5ac0a5d6d88794ef7cf4b1b13f43c708
2022-11-16 16:58:15 -08:00
jenkins-bot dff20426d2 Merge "hacks: Stop hiding .fmbox and .tmbox" 2022-11-15 18:34:48 +00:00
Bartosz Dziewoński 4c60fd328d hacks: Stop hiding .fmbox and .tmbox
Both of these elements are already hidden by default in the normal
view (.fmbox is used for some edit notices, which aren't shown in the
editor; .tmbox is used in the lede of talk pages, which is hidden by
the talk page interface), and these styles make it more difficult to
display them when they are desirable.

Bug: T257394
Change-Id: Ifb0316256bdec5008acc48544ddd3e2bf71b6d41
2022-11-11 00:09:00 +01:00
Arlo Breault b1d39a5425 Media border option applies to the media element, not the wrapper
Reported in,
https://it.wikipedia.org/w/index.php?title=Wikipedia%3ABar%2FDiscussioni%2FAggiornamento_del_parser_per_le_immagini%3A_vogliamo_testarlo%3F&type=revision&diff=130240855&oldid=130214646

The default styling in core looks like,

.mw-image-border {
	> a:first-child,
	> span:first-child {
		> *:first-child:not( .mw-broken-media ) {
			border: @border-thumbborder-screen;
		}
	}
}

The simplification here recognizes that the border option doesn't apply
to thumbs, so descendent selectors can be dispensed with, there's no
nesting in figcaptions to worry about.  That's important because
lazy-loading adds a noscript before the img tag, which would make the
selectors with first-child not apply anyways.

An img tag is used instead of the universal selector.  That seems like a
safe assumption for now and can be revisited with T314097 / T318433

Bug: T318300
Change-Id: I25f45ee794300d2ba2a38a0ab6e3741a6b1a18f2
2022-11-02 12:34:00 -04:00
jenkins-bot 77db2094eb Merge "Disable "page issues" feature when DiscussionTools is handling talk page" 2022-10-25 17:51:55 +00:00
Ed Sanders f876accf9a Disable "page issues" feature when DiscussionTools is handling talk page
Bug: T312309
Change-Id: I9c3035c9dbe7545a05efb2286dffe0145d3557b4
2022-10-25 16:36:15 +01:00
Arlo Breault 8c87990f0b max-width only applies to thumbs
Not frameless or plain floated media.

Bug: T318300
Change-Id: Iced12531dc8fe416c493daa82c0aa8252f9226bd
2022-10-20 17:48:58 -04:00
jenkins-bot ea6fd775f2 Merge "mediawiki.skin.variables: Add border-style and border-width vars" 2022-10-04 00:29:04 +00:00
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
Volker E 2c9e18b367 mediawiki.skin.variables: Add border-style and border-width vars
Already covered in mediawiki.skin.defaults.less.

Change-Id: I2171c7ab3287e14deb3a76faec2e11811a7f8e31
2022-09-23 01:39:30 -07: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
Volker E ca0c534962 mediawiki.skin.variables: Add Opacities to skin variables
Orienting on Codex Opacity tokens as defined in v10 of 2022-04-01 in
https://www.figma.com/file/h9pA2CCl2i0wtlTKNChaES/Opacities---Tokens?node-id=368%3A2139
Also adding legacy opacity icon tokens for use in all non-Codex
products.
Specifically the icon ones are already in use in MinervaNeue.

Change-Id: I6321b966b6125bee7538be1370c95cb21b3193ba
2022-09-19 19:57:32 +00:00
jenkins-bot a7169771db Merge "Fix typo" 2022-08-26 18:53:21 +00:00
jenkins-bot 9b12e9da47 Merge "[Cleanup] Remove dependency injection of mw.msg" 2022-08-26 18:46:54 +00:00
Fomafix 0ed13f07b4 [Cleanup] Remove dependency injection of mw.msg
The use of the injection pattern for mw.msg is inconsistent
compared to mw.mobileFrontend which leads
to confusion about how to contribute to the codebase.

Change-Id: I057a8e46d43211180f9c8b8173b64fab6936d284
2022-08-26 18:23:24 +00:00
Fomafix a574b2e3df Use shortcut mw.msg( ... ) instead of mw.message( ... ).text()
Change-Id: Ia0e867034a0c7f334376bbc74d426018e6764c25
2022-08-26 08:34:27 +00:00
Fomafix 269dd44aa1 Fix typo
Bug: T201491
Change-Id: I6deb75bca2cc6d4a6f254da80d51a3c067f9ca3d
2022-08-24 19:04:37 +00:00
Volker E f53990c19f mediawiki.skin.variables: Define own copy of Style Guide derived colors
MinervaNeue sets its own variable definitions of all link color
variables. Note that this is currently a copy of Vector 2022's
definition and pointing back to Wikimedia Design Style Guide and
Design System.
In the long term both skins should be updated to use the same tokens
package.

Also with this change comes an update visited link color from the latest
design agreements in alignment with Vector 2022.

Change-Id: Ibda474f9e37ce7f510364bf15c6be661b6e0304b
2022-08-16 17:25:48 +00:00
Ed Sanders f3ba1af953 Cleanup: Use .position-sticky() mixin from core
Change-Id: I2972eb33dc5ce54fa3ad23e1b52893b52ee13526
2022-08-16 07:51:03 +00:00
jenkins-bot be00ec043f Merge "Add metric platfrom event tracking on mobile desktop toggle" 2022-08-04 17:29:01 +00:00
Ed Sanders c19cdec800 Replace bugzilla bug numbers with Phabricator task IDs
Change-Id: I0e8bd586ee0d3d9c3a1d5c14e96e2d0adc64a427
2022-07-18 14:20:11 +01:00
essexigyan 7856f79d11 Add metric platfrom event tracking on mobile desktop toggle
Moderator Tools team wants to track when mobile moderators switch/toggle to desktop.

Bug: T310852
Depends-On:I017b53e99bd1043c421670a4e12683186d4fb180
Change-Id: I46d61a17ad7aa837023cff0c97a20ecf307527bc
2022-07-08 18:19:21 +00: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
jenkins-bot a0fa695ee2 Merge "Move TOC button fixes to wikipage.content hook" 2022-03-22 21:26:35 +00:00
Ed Sanders 8899efd4b9 Move TOC button fixes to wikipage.content hook
The content area can be updated, after which these changes
need to be re-applied.

Bug: T219420
Change-Id: I3cd89fe98f74be70bf1e58cf606b2c19be8db2cf
2022-03-22 21:05:03 +00:00
jenkins-bot ffa698322a Merge "Remove user navigation min width and width" 2022-03-03 18:47:39 +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
Volker E e3c2e625f4 build: Update 'svgo' to latest v2.8.0 & re-crush images
Updating 'svgo' to v2.8.0 and newest Wikimedia SVG guidelines –
mainly around new whitespace features of SVGO.

Change-Id: Ief64a9ad3d2eec96a2bdba14d06a0dce1a29e014
2022-02-28 00:00:36 +00: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