Commit graph

157 commits

Author SHA1 Message Date
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
Derk-Jan Hartman 9524dae241 Set a fixed table header text-alignment
This is important, as text alignment is inherited and often
overwritten in wikicode by the table element, with the expectation
that the header alignment remains, as other skins have the text
alignment for headers as a fixed property.

Bug: T240106
Change-Id: Ifc6a2bbc47ce8c6d5b1fa9d98a4d3278716993d2
2021-05-06 08:50:49 +00:00
Volker E 9de2b0101a styles: Remove obsolete -moz- vendor prefixed properties
Bug: T278670
Change-Id: I60dcd4873a2e4acd2f23148907321d1b8581743d
2021-03-29 03:12:57 -07:00
jdlrobson 5d6ffe7072 Table of contents should not trigger reflows in layout
Make sure the table of contents doesn't change size when it is
enhanced by JavaScript.

Take opportunity to fix alignment of table of contents based on
20x20 icons (previously 24x24) and icon/heading alignment.

Bug: T268787
Change-Id: I4ac26068687579484381af5b08e680e3a65f8f1e
2021-02-18 22:19:35 +00:00
Volker E e6370e9aec Amend blockquote spacing to Design Style Guide
Also ensure not to inherit whitespace on blockquote children.

Bug: T265947
Change-Id: Id92746233c6e888a543c4d97db25f79df61ec99d
2020-10-30 13:28:51 -07: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
Ed Sanders bc945fa15c Apply mobile width fixes to infoboxes explicitly
Previously they were just inheriting from `table`, but
now we don't require .infobox to use a specific element
they should be applied separately.

Fix table max-width override to use !important as this
too could be specified inline.

Bug: T258011
Change-Id: I4f28414fd965ae9f608b5e52047b9d474427853a
2020-07-24 15:42:59 +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
Ammar Abdulhamid ca2faa877d Restore redlink color to .new link elements
The color of the children will not apply back to the parent.

This was removed in I0c151ba under the assumption that elements
is loaded by the Minerva ResourceLoaderSkinModule which it is not.

Bug: T256503
Change-Id: Iffb4b623de61088871c82aa5f02344d765611398
2020-06-27 16:50:56 +00:00
AronDemian e0193eba9b Rename @fontFamily* variables to WikimediaUI Base naming convention
Renaming:
- @fontFamilySans -> @font-family-system-sans
- @fontFamilyBase -> @font-family-base
As defined in: https://phabricator.wikimedia.org/source/wikimedia-ui-base/browse/master/wikimedia-ui-base.less$201

Bug: T245136
Change-Id: Idec2c516efe2a6ee82efdf3cc6be173bedbb5b56
2020-06-25 19:51:11 +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 ce5f213dda Rely on core .new color
Relying on core's 'elements.less' `.new` color without overriding it.
Also renaming variable to apply to standard naming scheme.

Depends-On: If9ce056ef1a186db86584897707b7bcf890137a6
Change-Id: I0c151ba95c4b51bb857dba69fa7e9eeec8a96263
2020-06-16 23:40:05 +00:00
jenkins-bot 9b6cb1fbb8 Merge "Ensure tables account for a border when 100% wide" 2020-05-27 16:19:44 +00:00
Derk-Jan Hartman 3e7b24ec77 Ensure tables account for a border when 100% wide
This is a very general style rule and there are lots of tables with a
border that are NOT 100% by default and as such do not expect to need
box-sizing: border-box. So apply here by default.

Change-Id: I86458c87f5871e7c3a858f93aa9d4156bbefc8ac
2020-05-25 11:36:03 +02:00
jdlrobson e56302a3f6 Break title on watchlist and scope non-hyphenated links
Non-hyphenated links according to T230860 were added for
infoboxes but the default is no hyphens so these no
longer should be needed. It was likely working around
a recently removed bit of CSS in MediaWiki:Minerva.css
(See T248415)

The new selector is needed for Special:Contributions

Bug: T237230
Change-Id: I500ca1a6182f505ceb31441c49e4dcacd597a5d3
2020-03-27 00:30:54 +00:00
Umherirrender 53fab7c03d Always enable stylelint rules after disable
Change-Id: I3c677fb6e3ff9666e8e50f3a2ad9cd9ac57c29b8
2020-03-11 15:50:14 -07:00
Volker E ecf404db7f Drop the abandoned, replaced 'KSS' styleguide
KSS is no longer in use anywhere. The only official style guide is
at https://design.wikimedia.org/style-guide.

Depends-On: I688a78e9a71a082c499af55bd01e8fd615130486
Change-Id: I21663c7b48465b0f23f1b40520e8cee9be71c4bc
2020-02-11 14:26:19 -08: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
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
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 d021f2fc9e Remove LESS @fontScalingFactor variable
It dates back before MinervaNeue was its own skin in Iff1f7e63e796cc
and was probably an idea to provide a simple one-stop solution for
a typography change of font size.
It isn't very well setup for this and also provides no value as of now,
for code simplicity's sake, let's remove it.
From a design perspective, we would approach this problem differently
nowadays.

Change-Id: If43ea2590468832e135b3f654022e8b2064b06c1
2019-12-05 21:28:38 -08:00
Volker E ea00e7cb28 Align LESS typography variable naming scheme to WikimediaUI Base
Another step into unified naming scheme, here all typography
variables.

Change-Id: Ic0ee64fc924ccc2b04a6b9d040e2f00dc6c45799
2019-12-05 21:15:33 -08:00
Volker E 52f37a5f2a Enable stylelint 'selector-max-id' rule and disable only on occurrence
Enabling 'selector-max-id' rule, and changing in rare exceptions like
`#bodyContent` to `.mw-body > .content` where there's only one less
specific option.

Bug: T239183
Change-Id: I9d929eaae09475b2e20d96cb19081aba3aec5877
2019-11-27 17:36:59 -08:00
Volker E 3bd0a4cfaf Replace #toc id selector by .toc class
Replacing id CSS selector by lower specific class selector, if needed
with `.client-js` prefix.
We have already been there once in Ib1a874b644, we need to enable
`selector-max-id` stylelint rule in a follow-up in order to make
devs not introduce without clear need.

Change-Id: Id16d89280d2ef080907fca5871dca701554087fd
2019-11-26 22:56:33 +00:00
Volker E 9262b6bb09 Remove obsolete toc selector
Removing obsolete code, now that cache has definitely expired from
I720e62a578f0c7a14f4b5a698004471c85e54bc8.

Change-Id: I4f8dc279ed7eeb185e0591b64b91e68c135cf235
2019-11-25 07:31:41 -08:00
Volker E 6dac1b0bc0 Set overflow-y to scroll to avoid reflow
Setting `overflow-y: scroll` to prevent reflow as soon as content
comes in. Adding it to `body` as there might be side-effects when
it's set on both, `html` and `body` and latter seems to be the
place where volunteers or third parties would have set it already.

Bug: T204084
Change-Id: I08e8ceeaea4d8488bc9aee23d26f7791ceaa7ee0
2019-11-18 15:07:49 -08:00
Volker E 02ac4be0fa Replace color with WikimediaUI palette color
Leftover from our color changes a while ago. Use blue shade for
background like in most other products.

Change-Id: Ic6e7e7a50d5698dfcd302f5988df1327f7435976
2019-10-19 11:56:54 -07:00
jdlrobson a66f3a3cec Hardcode page issues vertically alignment
Bug: T234254
Change-Id: If14e52558631a20ea444564fa4758e20cf8ccf42
2019-10-08 20:41:31 +00:00
jdlrobson 81bbd6eb48 Use consistent small font sizes
* Add @font-size-minerva-smallest and use it in place
of font-size: 0.8em across the site so that we get a round
number for our font sizes.

Bug: T229568
Change-Id: I4270225c07941b4c164d5e044f70d4b131dbc19d
2019-10-01 22:29:55 +00:00
Jan Drewniak 2ef6119bed [ICONS] Fix icon positions in page-issues, inline and overlay
Bug: T232837
Change-Id: Ie24b38146b9361f86467d40db7b07b6a5d0655d1
2019-09-13 15:47:50 +02:00
Jan Drewniak be76f05ebb Prepare for new mw-ui-icon spec for Minerva
Includes icon fixes and removal of some CSS overrides.

This causes the following temporary defects to the skin:
* Last modified bar will temporarily be squashed
* clear search  icon will be misaligned vertically

Depends-On:  Ie811d25595d041c35e6c214190101821f3a5d466
Bug: T229440
Change-Id: I0a3a73421791ad353bbcebaeb8241ad062f67ae4
2019-09-12 18:44:44 +00:00
jdlrobson c0f08790ea Remove the mw-ui-icon hacks and overrides
Note: this agitates T230232 again - when merging this please
make sure a merge for I929090848f3e04647a97f4979ec78682623fa070
is pending.

In various places we try to override the default mw-ui-icon behaviours
The hacks need to be removed as part of addressing the core problem.

Changes:
* Wherever we use mw-ui-icon-before in PHP - wrap the label with a span
so that label font-size is altered where needed - not the icon
* Where a small icon is needed us isSmall parameter for the Icon component
* Apply font-size to labels of mw-ui-icon-before elements
* The browser tests need a slight update to access the span element inside
a menu item - in the case of the logout button the label is always hidden,
so we need to check the visibility of the parent element (secondary_action)

Bug: T229440
Depends-On:  I3f803ec4c9068b30aa93b803391aa4d65d8310ff
Change-Id: I07e4ae233979636b739f1117dd7703571e0a9366
2019-09-10 10:53:20 -07:00
jdlrobson 497044290a MobileFrontend is now managing the toggling code. Remove.
Depends-On: I6bdeb7198082c4b1d0a32960cc4dc679ff4c6762
Change-Id: I1815a730fc12f68c287d58f2de6f92e05db3abd2
2019-09-06 15:50:00 +02:00
jdlrobson 15323b3d63 Use core table of contents in Minerva
No more using the TableOfContents component in MobileFrontend. It's
just creating more work for us. The end result is exactly the same - we can make
a table of contents using the checkbox hack rule and CSS that looks identical to
the current table of contents.

For now, this change can only be tested on Minerva desktop.
I2ea1c23bc86871e2a095c4c6674a08ff2f04b160
is the patch that goes for the jugular and applies this to mobile Minerva. It's
important we merge the two together to avoid disruption to this feature, as
currently MobileFrontend strips the table of contents from core from the HTML
using the MobileFormatter.

Change-Id: I720e62a578f0c7a14f4b5a698004471c85e54bc8
2019-09-03 19:02:31 +00:00
jenkins-bot 0a7608085d Merge "Disable hyphenation for links" 2019-08-26 23:30:07 +00:00
jdlrobson 7280d255c0 Dev: Prep for storybook
* Remove ambiguity in imports - say the file extension
'less' for all instances of variables and mixins.
* Separate toast styles from drawer styles so they can be
imported separately
* associate header-action selector with its parent
(.overlay-header) not parent's parent (.overlay) so it can be imported
and rendered without the Overlay.

Change-Id: Ib7e19a440ba095d6424d35305fb41d643ca9764c
2019-08-21 12:20:26 -07:00
Shreyas Minocha 9d6a5caf14 Disable hyphenation for links
Should fix a misleading "bug" I noticed wherein URLs sometimes break
over multiple lines with hyphenation, for example `www.exam-ple.com`.

Change-Id: Id96d708e6ba59d6e6a6a093c3195b5121160c899
Bug: T230860
2019-08-21 06:24:35 +00:00
Stephen Niedzielski b1cbc639da [dev] [LESS] use z-index symbol instead of hardcode
@z-indexBase is 0. @z-indexBase - 1 is -1 which is identical to the
symbol @z-indexOccluded. The calculation didn't seem to add much to the
clarity of the code so use the symbol for grepability.

Change-Id: Ie8dcbca00a0a3e1d08a4ffe0b4fb3b71257f69c0
2019-08-07 14:44:56 -06:00
Ed Sanders b836141c9f Remove outer border from overflow tables
Bug: T206762
Change-Id: Ice5e85d10d932a93094228629201afd98a9cc1f4
2019-08-05 12:40:18 +01:00
jdlrobson c63fceea6e Normalize small fonts
We use 0.9em in a variety of places, to shrink font-size from the
default font-size. However given we use 16px as a base font this results
in a font-size of 14.4px. This can also cause problems with icons resulting
in rounding errors when used with multiple icons

This changes the font-size to 14px for those areas and makes future usages
centralized by adding a specific variable.
Also amending `@font-size-browser` variable to be aligned to naming convention
and equal to Vector one.

Bug: T229399
Change-Id: I8e31bca2982c049a9be73c89aa9e8e2aa8141269
2019-08-01 16:11:29 +00:00
Jan Drewniak ed9f455545 Adding a reflist.less file to hold Template:Reflist specific styles
Template:Reflist needs a larger column-gap to be consistent with
the Vector skin.

Bug: T150377
Change-Id: I14911f9b0fa46249cf11a591bc5323a227f7c3cc
2019-06-03 14:27:50 +02:00
Volker E 9845433bf1 Remove unused 'sectionAnchor.less'
File is not referenced and not in use as MF removes class.

Change-Id: I4fb9f887f38b991ac809903a120844d24fbbcac6
2019-05-09 08:07:43 -07:00
Volker E cd61867f0a Unify ul bullet styling
Unifying unordered lists bullet styling with Wikimedia Design Style
Guide defaults and other products.

Bug: T220323
Change-Id: Ifa990010cf80010cd3184f9bcb72fc081674db05
2019-04-30 10:25:35 -07:00
Volker E e562227392 Remove ol overrides to ensure list styles in non-Arabic number scripts
Bug: T205341
Bug: T217616
Change-Id: I66a677ab5d7ea4555d16d5761340eaad4158c3bc
2019-04-29 21:53:15 +02:00
jenkins-bot f1ccfd50e1 Merge "Switch to outside list style for ordered lists too (second try)" 2019-04-29 19:45:14 +00:00
Volker E 5f6f75e487 Add basic hr element styles
Bug: T221020
Change-Id: I90cef54b48d5934dac4adac6be6ffe7145a726f4
2019-04-15 17:43:09 -07:00
Volker E 6a078ddb65 Increase margin-top for h3 following p elements
With Id00fbe7ca90a in, this inharmonious, too close distance has
become more obvious.

Bug: T219572
Change-Id: Ie9689d29b6553aadf8ec4781369ec966b4a34abe
2019-04-04 18:01:55 +00:00
Volker E 681a752f29 Remove .background-size() mixin usage
Removing deprecated LESS `.background-size()` mixin calls.
Also
- simplifying code, where second (height) value is automatically set
  to `auto` when only one value is set and
- removing stylelint rule.

Bug: T219956
Change-Id: I643c66b3067ba77726d76cbebf7550781e18aa5d
2019-04-03 18:02:48 -07:00