Commit graph

61 commits

Author SHA1 Message Date
Bartosz Dziewoński
5a71392192 Migrate OOUI overlay styles to #mw-teleport-target
Since T348286, OOUI elements like .oo-ui-windowManager and
.oo-ui-defaultOverlay are attached to the new #mw-teleport-target
element, and styles like font-size should be changed on that element,
so that they will also apply to Codex dialogs in the future.

Bug: T348287
Change-Id: I2cbd3298ed2494c68a2db1409e2975093e36d488
2023-10-31 21:16:12 +01:00
James D. Forrester
c9d8b43e2c build: Update MediaWiki requirement to 1.41
All skins in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I2b6abbb8da59ca981206a472996ec8d0acbea3f8
2023-08-19 14:32:57 +08:00
Jon Robson
43851b3482 Targets no longer needed
All match current default.

Bug: T328497
Change-Id: I7b7277e59c819de6d80eeda584c2319b88dfdb55
2023-02-16 20:04:18 +00:00
Jack Phoenix
1e500a5add Optimization: use skinStyles to load CSS specific to File: pages + rm unused #login-sectiontip rule
Change-Id: I281b61642588eb05b775314c9852847756cd36e0
2023-01-30 16:13:18 +02:00
Jon Robson
d2c778b0e9 Move skinStyles for Echo to Monobook
Bug: T257143
Change-Id: Ib148e90a3fde42ebcf271432dce3ccfc8985c677
2022-11-18 16:12:54 -08:00
Reedy
ec3e5e27fe Switch to HookHandlers
Bug: T271010
Change-Id: Ie248342d4deb3520d284fac9c3ead17f7dee3de4
2022-08-22 11:43:37 +00:00
Ed Sanders
080893760f skin.js: Add required dependency on mediawiki.user
skin.js uses mw.user.isAnon

Change-Id: I08c8d8f07becefb64ef0071854444692799cfa4d
2021-11-12 23:03:15 +00:00
jdlrobson
abe94aa408 Monobook Mustache
Changes in HTML markup that fix various bugs and lead to consistencies
with other skins:
* firstHeading now has `dir` attribute
* `tagline` message no longer parsed - plain text only - this is consistent with
other skins
* printfooter now child of #bodyContent
* #ca-view is outputted (but hidden with CSS)
* Order of attributes on  #p-search-label changed
* Search input form elements are no longer self closing
* The #mw-searchButton element gains class mw-fallbackSearchButton
* The generated-sidebar class is no longer present on sidebar portlets,
consistent with other skins
* The print link disappears when ElectronPdf is installed so there
are not two print links.

Changes in functionality:
* Previously (in getCactions) a nomobile class would be added if
less than 2 tabs.
If not 1 tab, more would be appended. This is dropped.

Bug: T285989
Change-Id: I03d0dc1dad23894e7e64ceeb8956692316265144
2021-09-07 09:02:55 -07:00
bwang
bf86a37f1d Replace deprecated 'content' and 'content-thumbnail' features with 'content-media'
Bug: T287410
Change-Id: I349227cbe6b0577e122b47278c3c838b31b07eda
2021-08-18 19:08:29 +00:00
jdlrobson
c1ca90ce4b Reduce ResourceLoader modules used by Monobook
MonoBook supports two modes - one that is responsive and one that
is not. To do this it adds 3 modules. These can be reduced to 1
module by loading all the code and adding client side checks to
determine whether to use it.

The skin--responsive class is added by core for responsive skins so
can be used to make that check.

This does lead to additional download for all users (particularly
the addition of oojs-ui.styles.icons-alerts) but given the default
behaviour is to load these, and non-responsive skin requires an opt
in I don't see this as a problem.

Thanks to gzip the increase in render blocking styles is minimal:

Before:
skins.monobook.styles: 15.21KB
skins.monobook.responsive: 16.14KB

After:
skins.monobook.styles: 16.63KB

See bug for QA plan.

Bug: T285492
Change-Id: I76bb644145539c8ec0220704c8fe9a78a4819c03
2021-08-03 12:45:59 -07:00
jdlrobson
9b4186d863 Drop MonoBook responsive preference
This was moved to a core preference as part of T285402
The migration was handled by a #user-notice

Bug: T285402
Change-Id: I25fe3d32ad929924034db06b5a95bab6a3a3a727
2021-07-29 23:50:31 +00:00
bwang
ff1d2fcf0f Remove 'legacy' feature, simplify skins.monobook.mobile module
skins.monobook.mobile which was incorrectly identified as
a ResourceLoaderSkinModule is removed. This module was always
loaded in JavaScript alongside one of the modified modules

Bug: T287410
Change-Id: Ia1e15b606b3eee1ae442bd71765778269d11fd38
2021-07-29 23:18:54 +00:00
jdlrobson
ee59005150 Separate hooks from SkinMonoBook, use namespace
For consistency with other skins, its easier to see how hooks are
invoked when they are separated from the skin.

The skin is also updated to use namespaces and modern skin registration
which has been available since MediaWiki v1.36.

Change-Id: I1c93d4e817b53c93eba47ee9086c86c5d75443e5
2021-06-27 22:06:39 +00:00
Jack Phoenix
57e963507c Move capitalize-all-nouns CSS class support from core to MonoBook
Bug: T97892
Change-Id: I598c4469c46d284562ea3aec79330f9a1f40d2ce
2021-06-17 20:20:55 +00:00
jdlrobson
c8cdc4c4ab Restore external links to responsive monobook
Bug: T270012
Change-Id: I68c88850539becd21aa834fb43f37c8ec7fa96ce
2020-12-14 10:07:29 -08:00
jdlrobson
747c8e6fa8 Monobook should use content-links feature instead of mediawiki.skinning.content.externallinks
Bug: T267577
Change-Id: I94dce8f159eaf3fb533bc0c57a9bab768d376a1e
2020-12-07 18:37:14 +00:00
jenkins-bot
fa65ca8004 Merge "Monobook should use opt-in policy for ResourceLoaderSkinModule features" 2020-09-21 09:33:18 +00:00
jenkins-bot
404eade86e Merge "Implement mediawiki.skin.variables.less for MonoBook" 2020-09-16 15:09:44 +00:00
Sam Wilson
9086f450af Set top offset for notifications
Set the top offset for notifications to match the height of the
top tab and link area. Also move this height to a common Less
variable to use in both places it's used.

Bug: T260262
Depends-On: I12db7c1745d17851f6421123a145de4cb916ad51
Change-Id: I679b7bba8d0c43c36c5911b30540e86a77125497
2020-09-16 13:10:49 +08:00
jdlrobson
adf982583f Monobook should use opt-in policy for ResourceLoaderSkinModule features
Bug:  T252774
Change-Id: If9283742a83ecfbe8c4246e3624022a56be8f161
2020-09-14 15:24:44 -07:00
Timo Tijhof
0fe9a86271 Implement mediawiki.skin.variables.less for MonoBook
For now, only define:

- @font-family-sans
- @border-radius-base

Bug: T112747
Depends-On: Icf86c930a3b5524254bb549624737d3b9dccb032
Change-Id: I000f319ab31b711c107e9e0dc2c29b93b761dc82
2020-09-14 17:51:23 +00:00
jdlrobson
3bed284b37 Refactor: Simplify responsive Monobook's optional dependencies
Having module definitions living inside SkinMonobook makes them
less discoverable. It also shouldn't be necessary - even if there
are soft dependencies on other modules.

A new file resources/optional-enhancements.js is added which will
load the two optional dependencies based on whether they have been
installed on the client.

Bug: T203023
Change-Id: If9a88db52deb0cc91d58cbb40693d4cd448eabbc
2020-09-04 15:53:28 +00:00
Derk-Jan Hartman
32b7602e04 Print: Hide accessibility jump links and cookie statement
Hide the accessibility jump navigation links when printing
Also only show the last modified and copyright footer info and hide
all the footer 'places' links by default.

Bug: T250232
Bug: T136786
Change-Id: I039b523d009ddb4f5948dff456ef2845a93439fa
2020-08-15 16:33:28 +02:00
jdlrobson
5ca99813d0 Drop responsive Monobook IE8 support
Bug: T259316
Change-Id: I85c198601291327bb5edff6d440ce143b8887756
2020-08-04 21:55:36 +00:00
Volker E
b87a5b66d2 Use 'normalize' module from core's 'mediawiki.skinning'
Also removing covered styles from 'screen-common.less'.

Bug: T256520
Change-Id: I054c77bb5410e0c08bbdcf3b51f2d6fcc8a103f0
2020-07-06 21:58:15 -07:00
jdlrobson
b3847eaa95 Get legacy styles from ResourceLoaderSkinModule
Instead of relying on Skin::getDefaultModules to get
`mediawiki.legacy.styles` make the legacy style feature an explicit
opt in choice by including it in the features list.

This is done on the assumption that Icb910a563273bde92a09b1bb92857d5b6e348baa
will shortly be merged to deprecate this module to avoid double loading
the styles.

Bug: T242177
Depends-On: Icb910a563273bde92a09b1bb92857d5b6e348baa
Change-Id: I6471bc169f3c2a1f51e17b8ee26ac245b0374c18
2020-03-12 18:13:00 +00:00
Ammar Abdulhamid
c639988692 Upgrade skin.json schema to manifest_version 2
Bug: T242502
Change-Id: I0c12363d8bfffef32305cf7190c90231f0adefa1
2020-02-07 14:21:43 +01:00
jdlrobson
00234ce031 Drop mediawiki.skinning.interface in preparation for its deprecation
Since MonoBook is never cached on Wikimedia wikis, we don't need
to do anything about both modules being loaded in cached HTML.
There should be no differences before and after this change.

The change must apply to skins.monobook.styles and skins.monobook.responsive
as these modules never load at the same time (see setupSkinUserCss).

Bug: T242177
Change-Id: I5e69cd7f37f7b7a2b6325177b6688a426d92d57f
2020-02-05 18:28:27 +01:00
Isarra
a2d4476d12 Style RelatedArticle cards
If RelatedArtcles uses the SkinAfterContent hook (depends-on patch)
and we move the hook out of the main content block (parent patch),
it needs some styles to remain consistent.

Bug: T181242
Change-Id: I9fc00c22fb5e5b7d363455abe9d85062e67c7dfa
Depends-On: Iebd759c0d1a536768d18953f372664df762d9e04
2019-07-26 19:50:24 +00:00
Volker E
d2a20bd520 Remove obsolete Special:Preferences styles after its transformation to OOUI
These removed styles match no elements in the
Special:Preferences page since the OOUI transformation.

Bug: T208923
Change-Id: If7df130c53bcbbc199a6e10a6d84dbcc8b4e087d
2018-11-07 12:53:36 -08:00
jenkins-bot
8a9bea4df7 Merge "Set mobile width cutoff to 550px" 2018-06-06 21:15:39 +00:00
Isarra
406adb14f2 Set mobile width cutoff to 550px
Should avoid more of the issues with unwanted appearance of mobile
layouts. Cutoff results in layout switch when sidebar becomes ~a
third of the total window width.

bug: T196213
Change-Id: I9b8baee5fe53316128f864e732c86750b4e5470e
2018-06-06 21:06:13 +00:00
Kunal Mehta
9f9a5f2290 Add user preference to control responsive MonoBook
This provides a device agnostic, persistent opt-out for the new responsive
functionality.

The preference will show up under the skin selector if the user has their
skin already set to MonoBook. I considered adding a new skin option to
the radio selector of skins, but that is probably unnecessary for the
majority of users, in addition to complicating how to differentiate the
two modes (Classic MonoBook vs. Modern MonoBook?).

Wikis that want to make this opt-in can control the default in the standard
way ($wgDefaultUserOptions), or hide it entirely ($wgHiddenPrefs).

Change-Id: Id22f8e5199ff2b15fd03c94097db5cdc7188f8b1
2018-06-04 21:40:09 -07:00
Isarra
ca53e721ab Mobile - reorganise and clean up p-personal js dropdown
* Reorder ULS and Echo links
* Rename conditional module load hook to be more generic, and add
  ULS module
* Remove .active bolding from dropdown

Change-Id: I7e746e7c5af8ffd7c4ca06742ab1fe6bc94ba531
2018-05-20 10:29:50 +00:00
Isarra
ef1f98e7bd Responsive support: Echo hacks
Have echo just show the numbers instead of the badges, and add a
text link to special:notifications in the dropdown, as opposed to
entirely reimplementing the flyout layout

Change-Id: I072dbc2b7bf70b6675469e09e3beb3927e06d0f7
2018-05-19 21:15:31 +00:00
Isarra
0e2ee04c87 Responsive support, JS edition
Dropdown menus and js interactiveness for people who like to pretend
we live in a modern era or something.

Does not actually support newfangled tapping and swiping stuff.
Does not properly support echo. (will follow up)

Change-Id: I27d50c320b1526b9d158016a0e8022567f78ccc1
2018-05-19 20:17:17 +00:00
Isarra
70d426d4fd Responsive support, noJS version
* Add screen-mobile.css with basic mobile styles
* Force loading of screen-desktop on IE8- due to lack of
  @media width support
* Add some new divs and a set of spoof cactions for jumping
  around the page (what's js?)
* Replace cactions label with a more descriptive string (was
  previously set to display:none regardless)
* Also add a set of icons for fixed widths for tabs and things
  (icons-source.svg is the source file for the set, and includes
  a few others that ultimately weren't used here)

Cutoff 850px. Desktop styles should remain unchanged, with
mobile remaining stylistically consistent.

Change-Id: I737a7447db1e44e0d6abaa4c07813295a5ac73a6
2018-05-02 22:20:54 +00:00
Bartosz Dziewoński
33e2eb5eef Convert screen-desktop.less back to .css
A proposed change (I737a7447db1e44e0d6abaa4c07813295a5ac73a6) requires
this not to require Less parsing. It was unnecessary to convert this
to Less when I could have just removed an `/* @embed */` annotation.
Follow-up to ac8b055693.

Change-Id: Iba82f57d4ba3e65c61a5ef795b3b8d9c3f164a39
2018-04-19 01:03:25 +02:00
Bartosz Dziewoński
ac8b055693 Consistently embed images in CSS (or not)
Use .background-image() and .background-image-svg() mixins to embed
all SVG images, but not embed GIF/PNG fallbacks.

Change-Id: I807719dbf07749f4c942b4ba9b023440ca52a510
2018-04-05 16:25:32 +02:00
Bartosz Dziewoński
82580b2dd7 Remove unused styles
These elements no longer exist. See comments on the previous patch.

Follow-up to e33b232785.

Change-Id: I58aca1f4255df14d6289e167e180dad31b546a8c
2018-03-27 19:45:32 +00:00
Isarra
e33b232785 Move Cite styles into separate skinStyles sheet
No guarantees that these styles actually apply to anything anymore.
But at least the TODO is resolved!

Change-Id: Ibb43c044f50f026afa84a0151b113dd600956942
2018-03-24 18:38:33 +00:00
Isarra
2b24cbab0e Separate desktop and common styles, clean things up a bit
Part of the move toward responsiveness.

* Use mixins and variables!
* Vectorise existing icons
* Delete a rule or two that don't apply to the source anymore
* Consolidate similar colours into the same ones using variables

Change-Id: I2f0eb2b79cba01d8fa3a06298711e8af4d5508ba
2018-03-24 18:10:23 +00:00
Isarra
7b01f37552 Rename main.less to screen-common.less to prepare for splitting
Part of the move toward responsiveness.

Change-Id: I6ca7c87fff7a65b05b2310885aedaeede9647c78
2018-03-24 18:01:41 +00:00
Isarra
a29f04c254 Vectorise book background image
Also:
* Convert main.css to less because I can't figure out how to do svgs
  and fallbacks by hand
* Add gradient image to fit with book for really, really, really wide
  displays (and move book background to globalWrapper to make it
  actually work)

Change-Id: Ie6f5b6b87b475953274688fc4640f9fa17184fa4
2018-03-23 22:06:25 +00:00
Isarra
57106ab179 Restructure files according to modern skin practices
Also delete unused images, since even if something is
somewhere using them anyway (looked, couldn't find
anything), it wouldn't be able to find them in the new
image location regardless.

Wiki.png, magnify, and link are all part of core and have
been for some time.

Change-Id: Id7a02155a5f1b207908c9c0c8f7519b6d3f9a886
2018-03-21 21:56:55 +00:00
MarcoAurelio
0eb3eecc61 Use valid SPDX-3 license identifier
Change-Id: Ib29500f6df89f30646a9587d01a8681e5f1297da
2018-02-15 21:13:21 +00:00
Tulsi Bhagat
54c7c2f523 Removed deprecated position statements from resource loader module
Bug: T184257
Change-Id: Ie7b043904510dcd25a003d25c5ca794f6f543db9
2018-02-12 21:18:13 +00:00
Bartosz Dziewoński
b4d5bf46c0 OOjs UI: Fix font size for default overlay
Override font size for .oo-ui-defaultOverlay to match normal content.

Bug: T183069
Change-Id: I1941365fb1550604ff45fbe60bacc600f72eea9e
Depends-On: I53888581f9e1da3b036166613c46cbc1085aa55e
2018-01-02 19:21:55 +01:00
Jack Phoenix
120cf5ead9 Optimization: don't load .redirectText CSS outside redirect pages
Change-Id: I5a12b60cff731c9b5c2492daa3aa67169e53a041
2017-06-13 18:21:54 +03:00
Ed Sanders
f025d40dc0 Match mediawiki.notification styles to OOUI dialogs
Bug: T58313
Change-Id: I12f22a50046de4a4ce0a0c06d8a245eeb6d71005
2017-04-10 19:40:58 +01:00