Commit graph

92 commits

Author SHA1 Message Date
Ebrahim Byagowi
f06694fed6 Remove spacing above used template
If there is Wikidata item usage in a page this will result
in an extra space and the style here seems too arbitrary
to worth to have a better fix considering all other cases
this could break like lack of template but hidden
categories so let's just remove it instead.

Bug: T373286
Change-Id: I370ef49e5972865a62f68f2a260e8daef090b1c3
2024-08-30 11:20:26 +03:30
Jon Robson
a4a3c71f66 Responsive style for images was upstreamed to core
Responsive styles now live in core (in content.media-screen.less)
following I604ea436a816939cd6b2d9ef8c352e319ffcbec0

Bug: T368469
Change-Id: Id4833591b4581312ad5a5b03e9b45a1b29be6b5d
2024-06-25 23:05:21 +00:00
libraryupgrader
699ee3da65 build: Updating npm dependencies
* eslint-config-wikimedia: 0.27.0 → 0.28.0
* grunt-stylelint: 0.19.0 → 0.20.0
* stylelint-config-wikimedia: 0.16.1 → 0.17.0

Change-Id: I6301659d10ff9f1d633b5e588f69d850c523b53e
2024-06-04 23:03:05 +00:00
Volker E
4df7af4b00 build: Update 'svgo' to latest v3.2.0 and re-minify SVGs
The latest update of 'svgo' dependency includes three optimizations on
converting path commands, which
- improves closing paths and how we determine if to use absolute or
  relative commands.
- round arc or convert to lines based on the geometric sagitta
- convert cubic Bézier curves to quadratic Bézier curves where possible
Also unifiying npm command to qua standard notation `minify:svg`.

Bug: T354875
Change-Id: Ie9a455a521f6312e82462b88409822df2112dcd6
2024-01-16 00:43:37 +01:00
Bartosz Dziewoński
924c90c8d6 Restore OOUI dialog styles for compatibility
Follow-up to 5a71392192.

Bug: T350544
Change-Id: Ib7b401326cecb1b1ec362696c1c65957516764d2
2023-11-06 01:40:04 +01:00
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
Ed Sanders
ea7349cfee build: Update linters
Change-Id: I66509997c334d9bf56ecd76ec238fc87672a7a3d
2023-09-04 18:09:37 +01:00
Jon Robson
d39df243b8 Make Monobook compatible with mw.util.addPortlet method
The markup from the addPortlet method differs slightly from
Monobook's markup. Apply to label elements as well as h3 to
account for this.

Bug: T342814
Change-Id: I147c8e74a49078abad2d363e25cdd9c9d06ac473
2023-07-26 21:20:27 +00:00
jenkins-bot
05dbc5027d Merge "styles: Use mediawiki.mixins screen reader text mixin" 2023-06-05 20:25:57 +00:00
Volker E
b277b28a5b Drop fallback code for SVG handling
Bug: T328144
Change-Id: Ib78a4756c2e9539f1a4ae3151ce79b0c80b30c6f
2023-06-04 04:41:00 -07:00
Volker E
96d719b31c styles: Use mediawiki.mixins screen reader text mixin
Also
- import mixins separately from variables, those two should not be
mashed together
- change mobile navigation logic to work around the new mixin

Change-Id: I54ae992dd5627dd54a690dd064cf662b382761c1
2023-06-01 06:25:26 -07:00
Volker E
7d31a60911 styles: Remove single-use mixins
Those styles are better off in the one place they are needed,
also removing duplicated properties.

Change-Id: I6307f0cb6c454a0fd020f7dff1be4908f5547b20
2023-05-30 22:43:47 -07:00
Volker E
fa350786d6 skin variables: Add MonoBook specific text colors
Reuse pre-defined variable values with wider scope thanks to
mediawiki.skin.variables.less.

Bug: T333888
Change-Id: I6071ea59746d9ab3a701f570dc97b1fb5a802a45
2023-05-10 01:58:24 +00:00
Volker E
58986d581a styles: Remove outdated browser hack
Bug: T306486
Change-Id: I0d13a3af0d3dd7184bce646b772409ced55c80c8
2023-05-09 18:10:31 -07:00
Volker E
0937fc914b styles: Remove deprecated .list-style-image() mixin call
Deprecated since v1.38.0.

Change-Id: Ib8acdc721c5e114dba270f57b88b18fd8d32cab4
2023-05-09 18:10:00 -07:00
Umherirrender
919667ba34 stylelint: Enable selector-pseudo-element-colon-notation
Via stylelint --fix

Change-Id: Ie6de762bf62033ee913008c194ded62104410256
2023-03-29 23:28:45 +02:00
Jack Phoenix
0965c92e61 Don't include the "jump to (navigation|search)" links when copy-pasting article text
They are included in the DOM for screen readers but there's a good chance the user copy-pasting text from an article does _not_ wish to copy-paste these visually-hidden-for-most-users accessibility helper links.

Bug: T295647
Change-Id: Ib3b3ae5fcd711bca8391e90ed1e7ffcf31a2b384
2023-03-13 22:31:36 +02:00
Jack Phoenix
3fb300a05a Optimization: .sharedUploadNotice is also specific to File: pages
Change-Id: I7d40d7d15ccd6b368269317c29646d50fde68c77
2023-01-31 22:31:37 +02: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
2d644b8596 Fix alignment when Echo is clicked
Bug: T257143
Change-Id: I91f92f20c1a773831980900a3ace37d60ada8f92
2022-11-21 13:07:55 +00:00
Jon Robson
d2c778b0e9 Move skinStyles for Echo to Monobook
Bug: T257143
Change-Id: Ib148e90a3fde42ebcf271432dce3ccfc8985c677
2022-11-18 16:12:54 -08:00
Volker E
4750ffdf08 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: I860dc7f00a6a3ce3f1bed56978a7cf560187146e
2022-02-27 23:59:34 +00:00
Ed Sanders
20a1fba017 build: Update eslint-config-wikimedia to 0.21.0
Change-Id: I5602e1be65b4c8c4a5f2218bf92c36a6a209d484
2021-11-12 23:06:59 +00:00
AntiCompositeNumber
4487cda6fa
mobile.js.less: fix padding for a.feedlink
Core mediawiki.feedlink sets `a.feedlink {padding-left: 16px;}` to
establish proper spacing around the feed icon background-image. That
rule was overridden by a much more specific rule for the mobile menu,
causing the text to overlap the icon.
This change duplicates the padding-left rule at a higher specificity,
fixing the overlap problem.

This could also be fixed by significantly increasing specificity for the
rule in mediawiki.feedlink, but that would break the existing skins and
extensions that intentionally override it.

This patch has a soft-ish dependency on I897b85d3e77233b858ee85be263a14e401fe5fd2
to work correctly when the page is loaded in mobile format. Without that
patch, an empty space would be visible where the icon should be unless
the page was loaded in desktop format.

Depends-On: I897b85d3e77233b858ee85be263a14e401fe5fd2
Bug: T291274
Change-Id: Id427653eb21194085853de903624b9a537eeece6
2021-09-17 15:01:01 -04: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
jdlrobson
ca0b4bed6a Simplify MonoBook link styles
* Link color comes from the elements ResourceLoaderSkinModule feature
* MonoBook link colors are overriden in skin variables

Depends-On:  I799b46664f01c5631fb9d1ae4f5c43caeeaac818
Bug: T288739
Change-Id: Ifbe2394f2f5beb417a4aa5b288a0e906ed10a691
2021-08-31 08:27:10 +00:00
jdlrobson
bf64fa1aec Restore red links color to the responsive mode
Follow up to c1ca90ce4b

the #p-personal li a is trumped by
the skin--responsive selector. Store the rule next
to the existing link rule to avoid this.

This stylesheet loaded by both modes so works in both.
One with the skin--responsive prefix and one without.

Bug: T288788
Change-Id: Ief4fa9dbbd48f2c6f73a58a73d64255438cd938e
2021-08-18 08:02:14 -07:00
jenkins-bot
ba278242d4 Merge "Restore capitalization styling in MonoBook portlets" 2021-08-16 22:51:18 +00:00
jdlrobson
ba2c0ec06e Restore capitalization styling in MonoBook portlets
Cleaning up the `text-transform` mess and making this specific
rule simpler for the different languages and skin variants like
responsive skin.
Follow up to c1ca90ce4b.

Bug: T97892
Change-Id: Id4b3a3c23396728fa5910b7acfcf618b281390ca
2021-08-13 15:18:11 -07:00
jdlrobson
65cbf78781 Drop double skin-responsive class
This is already added in `skin-responsive.less` so adding it
a second time means the selector no longer matches.

Bug: T288681
Change-Id: I4b08561f8848dc5f8545f5dc42add8b5ec286ca8
2021-08-11 15:12:17 -07:00
jdlrobson
38c49703f1 Add visualClear style to MonoBook
Follow up to ff1d2fcf0f
following guideline on
https://mediawiki.org/wiki/Manual:ResourceLoaderSkinModule#visualClear

Bug: T288288
Change-Id: I3066ac2171a1faa82244152f141208ca8643e00d
2021-08-05 21:16:04 +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
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
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
bwang
6ce3ce1acb Use Skin::getAfterPortlet instead of deprecated BaseTemplate:getAfterPortlet
Change-Id: Ie00e8c5efe9a1e736251382344a7ae8cd779bb6b
2021-06-11 15:08:45 -05:00
Volker E
a80be96c35 build: Update SVGO to latest v2.3.0 and re-crush SVGs
SVGO v2.x changed configuration to JS, amending configuration.
Adding new 'minify-svg' npm script.
Also re-crushing SVGs.

Bug: T278656
Change-Id: I3c2544e93da008baaffca6c75ff3de15aeb6dc1b
2021-05-18 06:12:46 -07:00
Jdlrobson
0321b399f5 Drop mw-body-content class from Monobook in preparation for glorious future
* Removes the class from site notice - this provides no styling benefits
inside MediaWiki and is inconsistent with other skins. If site styles
need to target this element they should use the siteNotice id
* Replaces mw-body-content class with monobook-body and adapts existing
styles. The mw-body-content class will soon be applied to
$this->get( 'bodytext' ) instead. The core change
I3a91b294fcb3724cd46743e497dff723de0490a6 will shift this class to the
child element. There are no styles outside Monobook that rely on this
class and only 45 Monobook specific site/user styles that could be impacted.
The new class is prefixed monobook to avoid confusion with classes that
originate in core that are prefixed `mw-`

Bug: T279388
Change-Id: I90d85c21f4a62e6697f24e3ce388445a0a53c2b0
2021-05-13 20:14:11 +00:00
Derick A
aa848854ef resources: Remove redundant CSS rule from .mw-indicators class selector
As already mentioned on the task, this has already been made available in
the interface ResourceLoaderSkinModule feature, hence redundant in here.

Bug: T278364
Change-Id: I071f43836bed9991bbefd71b7b0348c2eb13bbec
2021-04-19 17:57:15 +01: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
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
Ammar Abdulhamid
a891fd477c Rename #searchGoButton -> #searchButton (2)
This was missed in I9ced97b

Bug: T255791
Change-Id: Ibee6218afd753750db0bcba2325534151c2db5f1
2020-07-31 12:40:04 +01:00
Ammar Abdulhamid
058fef6bf6 MonoBook: Rename searchGoButton -> searchButton
Bug: T255791
Change-Id: I9ced97b55cf5d6fb675a925825a28458ab7278db
2020-07-25 03:18:49 +01:00
Volker E
8b727fe359 Replace deprecated background-image-svg() mixin calls
Use normal `background-image` properties with SVGs now
that IE 8 and Android 2.1 are removed from Grade C.
Also removing all fallback images.

Bug: T248062
Change-Id: Icd9cb9ea2a102467b5af3829f4dad0f2c5707aee
2020-07-23 23:07:15 -07: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
AronDemian
1587cdfb60 Add .mw-footer CSS class & replace #footer selector with it
`#footer` kept for backwards compatibility with user styles and gadgets.

Bug: T248137
Change-Id: Ied8e79c5895f8fe383b1ca743a31890549cc8d86
2020-04-24 02:28:15 +00:00
Volker E
09fe3e5567 Remove elements from overqualified element-id combination selectors
There's no need for those in year 2020.

Change-Id: I9ea94bce18d749ada0bb5b1bb9692d1d1886755a
2020-03-21 20:39:46 -07:00
AronDemian
607fbb78ee Extend documentation of CSS trick that sets the minimum content font-size to 11.43px
Change-Id: If90ae377705eb88807be465b24859b9ccc63d09c
2020-02-28 06:37:03 +01:00