Commit graph

133 commits

Author SHA1 Message Date
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
Volker E 8398bda8fd Reduce li selector specificity for general li treatment
Same margin is used for both `ol li` and `ul li`. And `li` shouldn't
be used anywhere else then as child of those two parent elements or
`menu` anyways, which doesn't seem in use on mobile, therefore reducing
the specificity.
Side-effects would only be visible in invalid code.

Change-Id: Idddc3115b08c9937a1d2141b23f33008d6776f60
2019-03-29 22:56:16 -07:00
jenkins-bot 3ace1a7615 Merge "Images should have borders in Android app / parsoid generated content" 2019-03-29 14:57:02 +00:00
Volker E 1f418a20b8 Remove unnecessary double assignment of font-family
Headings inherit from body, therefore removing unnecessary double
assignment of sans serif font family value.

Change-Id: Iebea830399703b5f95ff87f2e0b91660df8c79cc
2019-03-27 20:24:58 +00:00
jenkins-bot 875b22d5a5 Merge "Use system font stack as sans-serif choice" 2019-03-27 18:11:05 +00:00
Volker E a738f25c05 Use system font stack as sans-serif choice
Using system font stack provides better reading experience on wider
range of operating systems and languages combinations.

Adding `fontFamilyBase` variable to easier update and clarify usage.

Bug: T175877
Change-Id: Id00fbe7ca90a3b31524c618de4441c413fe4afbe
2019-03-27 10:01:01 -07:00
Jan Drewniak e42a655e9a Fix alignment of "learn-more" link on page-issues
Fixes the extra padding below the page-issues boxes as well
as the alignment of the "learn-more" link relative to the rest of
the text in the issues box.

Bug: T214549
Change-Id: I691254af76c65a3d620ec28bce6bb16b8977607d
2019-03-26 13:11:16 +01:00
jdlrobson 05e6069ab6 Images should have borders in Android app / parsoid generated content
To test check out  I5c1fdfc87a48764cbb53b7a751fbffc1a4e36fc5
``
$wgMFContentProviderClass = 'MobileFrontend\ContentProviders\McsContentProvider';
$wgMFMcsContentProviderBaseUri = "https://he.wikipedia.org/api/rest_v1";
```
Navigate to http://localhost:8888/w/index.php/%D7%93%D7%92%D7%9C_%D7%99%D7%A4%D7%9F

Bug: T198534
Change-Id: I19e9456895789abc413679105da46cbd4f9f0ce9
2019-03-23 00:15:04 +00:00
jenkins-bot add1ca4174 Merge "Add padding and center text in infobox caption" 2019-03-12 19:57:04 +00:00
Volker E 644cc45f6f Add padding and center text in infobox caption
Bug: T168861
Change-Id: Ibdbd25ce6e93a8cb363e24887bde09bc81880e40
2019-03-12 13:17:29 +01:00
Bartosz Dziewoński f5eb153205 Switch to outside list style for ordered lists too (second try)
See design rationale on T150377.

Furthermore, 'inside' lists cause rendering issues inside VisualEditor
(tested with Chrome 71 and Firefox 65 on desktop), as seen on T208102.

Previously attempted in abf223da58 and
reverted. This patch sets a larger padding of 2.25em, so that higher
list item numbers (3 digits) will fit in the available space.

Bug: T150377
Change-Id: I1e643505105717dda380a47bac852fbe0b8d8c28
2019-03-09 01:17:47 +00:00
Volker E 4a7bd78d8b Move html and body styles to 'ui.less'
Moving reset properties
- `font-family` and
- `font-size`

and opinionated
- `margin`
to ui.less.

All other properties from 'reset.less' don't apply to those elements.

Also
- consolidating body `background-color` and `color` in 'ui.less' and
- moving `html` affecting property there as well.

Bug: T205341
Bug: T217621
Change-Id: I4c545da76e6fdebced41e6e7e6eb89e4d97a8b24
2019-03-05 16:38:20 -08:00
Jan Drewniak a1d52a1cdd Remove hard-coded z-index value from page-issues read-more link
Defines the z-index value of the "fade-out" below the read-more text
as a variable instead of a hard-coded value. The variable is essentially
1 value below the z-index of the parent element.

The output of this change remains the same, the parent z-index value
is 0 so the "fade-out" z-index value still remains -1.

Bug: T214550
Change-Id: Ib1fa53cbb83e995c3c7b0320ba177ea087a8931b
2019-02-20 00:45:20 +00:00
jenkins-bot 680019d45e Merge "Revert "Switch to outside list style for ordered lists too"" 2019-02-19 23:41:42 +00:00
Jdlrobson ddc667905e Revert "Switch to outside list style for ordered lists too"
Per discussion in humans of the web, 
this causes problems with lists with items >= 100. Reverting (and
later SWATing) with this new information.

This reverts commit abf223da58.

Bug:  T150377
Change-Id: I962824dae8c855bb3d01ba346ae08aa3f6234073
2019-02-19 23:32:37 +00:00
jenkins-bot 718527e061 Merge "Switch to outside list style for ordered lists too" 2019-02-11 20:13:26 +00:00
jenkins-bot e79e2202b9 Merge "Apply <sup> styling to Parsoid refs as well" 2019-02-09 19:23:55 +00:00
Ed Sanders cc727b9c11 Apply <sup> styling to Parsoid refs as well
Currently they are 0.8em, instead of 0.75em.

Change-Id: Ieb91c1251839ff4bb54451aae69af9fb88322219
2019-02-09 14:10:52 +00:00
Bartosz Dziewoński abf223da58 Switch to outside list style for ordered lists too
See design rationale on T150377.

Furthermore, 'inside' lists cause rendering issues inside VisualEditor
(tested with Chrome 71 and Firefox 65 on desktop), as seen on T208102.

Bug: T150377
Bug: T208102
Change-Id: Ia8e47ab98226a78cb5a3a4ef5f09d729ea3c8791
2019-02-08 18:40:19 +01:00
Jan Drewniak 73885e01c2 Change z-index of page-issues read-more link
Changes z-index from 1 to 0 on page-issues link to avoid showing
white background when navigation menu slides over.

Also changing z-index value on SpecialNotificationsOverlay.less
from the hard-coded value of 2 to @z-indexOverOverlay
(which is set to 2).

Bug: T214550
Change-Id: If033755115f2a266869fb87c4314798c422d88ed
2019-02-07 19:37:02 -05:00
Jan Drewniak 6627078c08 Remove a .content-header CSS selector.
A `.content-header` is often placed inside a `.content` div,
so this selector causes a 90% width on a container element as well as
it's child element, which is probably undesirable.

Bug: T210745
Change-Id: Ib559db66a513537127ad543cb54a119af8ebf8df
2019-01-23 22:44:56 +01:00
jenkins-bot 33736e3ead Merge "Reduce unnecessary selector specificity" 2019-01-19 04:38:54 +00:00
Volker E 994edd76e0 Reduce unnecessary selector specificity
Bug: T214218
Change-Id: If0afb83d7f5f9b288427aaf09951348ed94cd74e
2019-01-18 17:23:48 -08:00
jdlrobson 1166009c00 skins.minerva.tablet.styles can be merged
This module is unnecessary - it's loaded unconditionally on a page.
Instead bundle the related CSS inside skins.minerva.content.styles

Change-Id: Ieb37d63332ff5b0cf39835b64cc9f0dcaf62c34f
2019-01-15 12:30:30 -08:00
Huji Lee fa5dff873f Change the "visited" color for links to increase readability
Please see Phab task about why this is necessary and how the new
color was selected.

Bug: T204081
Change-Id: If11f308bad5f7260c82bafe0e8d584763773869e
2019-01-13 19:44:38 -05:00