Commit graph

202 commits

Author SHA1 Message Date
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
Volker E fea419f543 Use default @border-radius-base variable
Following WikimediaUI Base variable naming scheme.

Bug: T255230
Change-Id: I71f49d2b554dbca726aee43b19b1554969449403
2020-06-25 19:07:17 +00:00
Volker E 4cef1791c2 Use correctly named variables background-color-base and color-base--inverted
Depends-On: I7b7534223c672a47a11e69fc07bea535ec0085a1
Bug: T255230
Change-Id: Ibf5c0410e446cff18fc26fe2e80d120a72209c04
2020-06-25 19:07:12 +00:00
Volker E 7f590aba17 Rename link color variable to standard naming scheme
Change-Id: Iff85d1e424e18902df58988167ae6668ce034aa2
2020-06-25 11:20:33 -07:00
Volker E bb6827122c Naming convention using 'skin' as entrance point
Similar to Ief1c469724d4ffe238d307407c3ddb46f2e1abfa

Change-Id: Ibca2473b14ef258f92e71524489298e2f53ed873
2020-05-29 14:32:12 -07:00
Volker E b26f62b2fa Change opacity (color) of logo to a subtler gray close to #54595d
Use a variable to rely on opacity value close to `#54595d` similar
to icons in the header.

Bug: T251135
Change-Id: Ie3eaad9ac86f8c3827e0a41f0b73b694d8f8f2fc
2020-05-12 22:09:59 -07:00
Jan Drewniak 1a838f2004 Fix for 27eb9e - "Changing color of logo from black to gray"
Use a variable consistent with Wikimedia UI base instead of
a hard-coded opacity value.

Bug: T251135
Change-Id: I883d3b122c3a0206fe83365a7818929d74f86459
2020-05-04 21:08:25 +00:00
jenkins-bot 5bd8c646c9 Merge "Revert "Changing color of logo from black to gray using opacity."" 2020-05-04 18:14:51 +00:00
Jdlrobson d65ac4b5bb Revert "Changing color of logo from black to gray using opacity."
This reverts commit 27eb9e1666 to simplify the SWAT of
https://gerrit.wikimedia.org/r/594254

Change-Id: Iccb2e32c3b46e5014849a9a397e062203631342d
2020-05-04 17:58:30 +00:00
Volker E c9461c9dd8 Replace skins.minerva.mainMenu.advanced.icons with OOUI icons
Additional changes:
* Address a fixme relating to the overflow icon and move some AMC styles
out of the critical path for non-AMC pages

Note about ellipsis:
The class mf-mw-ui-icon-rotate-clockwise cannot be used as it's part of
MobileFrontend and loaded via JS. Minerva must work without MobileFrontend
and this rotation is needed without JS.

Bug: T244444
Change-Id: Ifd02c50305cf036dd6df640d778678668507e5eb
2020-05-01 12:18:35 -07:00
Jan Drewniak 27eb9e1666 Changing color of logo from black to gray using opacity.
Bug: T251135
Change-Id: I332e36149f71976008f1c020ff79db4adb96b9b8
2020-04-30 19:29:24 +02:00
jenkins-bot 8cb8a3cd3a Merge "Reduce last-modified-bar nesting and add mw-footer class" 2020-04-28 16:17:28 +00:00
Volker E b88cc09284 Clarify comment on Desktop MinervaNeue
Change-Id: Ibba6ea33f6338688dc3239d1da4b8c8d973f3c9b
2020-04-27 12:15:19 -07:00
Volker E 447a83415c Reduce last-modified-bar nesting and add mw-footer class
Reducing (currently) unnecessary `last-modified-bar` context nesting,
which isn't done consistently across stylesheet files.
Additionally adding new `mw-footer` class, but not yet using it
exclusively due to caching.

Change-Id: I6b9caa42c1907ec1a7f8c8b67334fb7f08705848
2020-04-27 12:02:47 -07:00
Volker E 18ab61d4fe Use .text-overflow() mixin from 'mediawiki.mixins'
Removing MinervaNeue's own mixin now that it's possible.
Also unify code instances to use new mixin.

Depends-On: Ia8d6e7229b49598b0f4cb19dff463ffe2f11a43d
Change-Id: Iaffcefcb7a239d5ddecbe17097573d06099de88e
2020-04-21 11:49:30 -07:00
Umherirrender 53fab7c03d Always enable stylelint rules after disable
Change-Id: I3c677fb6e3ff9666e8e50f3a2ad9cd9ac57c29b8
2020-03-11 15:50:14 -07:00
jdlrobson b3b50ce854 Fix Minerva print mode to correctly show top of document
When we built the new main menu we started using a `nav` element.
Update selectors to hide the `nav` element when printing from
mobile.

When printing from tablet or desktop make sure the header is displayed.

Bug: T244181
Change-Id: I7f60fd11d969a48e1c7926ad8acc4213f9affed4
2020-02-18 17:50:30 +00:00
Umherirrender 78dc3baf5c Use single quotes on less @import
Change-Id: I370dd866e9e3836fe6de4c86a54861f055424d7d
2020-02-07 17:51:49 +00:00
Umherirrender 4ccaf6e959 Move comments out of class lists
Bypass upstream bug and allow stylelint upgrade
https://github.com/stylelint/stylelint/issues/4049

Change-Id: Ibb0a1cc714324db96cf6c7973cfd8c4616e159b8
2020-02-06 01:05:27 +00:00
jdlrobson 1e64fc8f3d Dev: Address some FIXMEs
* Drop non-existent pointer-overlay selector
* Drop redundant icon class for arrow
* Drop unnecessary !important
* Drop transparent-shield class
* Reword an existing FIXME about a contensious decision and
add a new FIXME for moving some code to a more appropriate place.
* Move an image into a ResourceLoaderImage module (test with
`mw.notify('error', { type: 'error'} )`)

Change-Id: I6e38f07772afae6f13c4851ca17a67d52ca7d331
2020-02-03 08:43:18 +00:00
Ed Sanders e2903a5bad Reduce height of sections due to edit links
This matches the old height and the height in edit mode.

Change-Id: Ibdfd7cdabe16cec0b050a4ea706849c34beeb2ea
2020-01-29 21:35:34 -08:00
jdlrobson 1f584195de Reorganise stylesheets
All stylesheet-only ResourceLoader modules now have a single entry point
rather than multiple files. This eases compilation of the content of
those modules by all toolchains, which will be useful when introducing
the bundlesize tool.

Change-Id: Ic38a3e51db2f419fe68efd23a2c48ee69218a526
2020-01-29 09:46:18 +00:00
Krzysztof Witucki 3ec0ca1e6e Remove border-radius
ToggleList.less: remove border-radius style from .toggle-list__list
userMenu.less: add border-radius to .minerva-user-menu-list
pageactions.less: add border-radius to .page-actions-overflow-list
design feedback: (see T231205#5771626)

Bug: T231205
Change-Id: Ia06e230a53ddba7931a2869209e0851b11ca8030
2020-01-06 21:47:55 +01:00
Jan Drewniak f5bef2ea5c Main menu button works without JS
Converts the main menu button to work without JS using the CSS-only
"checkbox" hack, using the ToggleList module from the dropdown menus.

Bug: T225213
Change-Id: I0eff0439f7284ec74f6304324fab409e8a1b6245
2019-12-19 19:55:39 +00:00
Volker E 76212152a0 Use font-weight: 500 for page action buttons
Bug: T237019
Change-Id: I55e167ce794fe5c635cd86205e38055d7deb1040
2019-12-18 00:15:14 -08:00
Volker E 09d0feb287 Add @font-size-root var and rename @font-size-body-mobile
Following Vector and OOUI in `@font-size-root` and put it in central
file. Removing duplicated code in `html` and `body` achieving the
same thing.
Also renaming `@font-size-body-mobile` to a distinct
`@font-size-body--feature-phone` ending the confusion that it's a
variable only used at `@width-breakpoint-mobile - 1`.

Change-Id: Ie355d015d882f61c813991c3244bfcb67f161791
2019-12-12 17:34:44 -08:00
Volker E 7dc77f594a Replace id by attribute selector
`[ class|='mw-content ]'` catches `.mw-content`, but also `.mw-content-rtl`.

Change-Id: Ibbde7670cf86e36f08a4ce3dca9565bdaaec9b13
2019-12-12 14:36:09 +00:00
jenkins-bot d53cf4c3e0 Merge "Discontinue back-to-top feature" 2019-12-11 20:00:04 +00:00