Commit graph

87 commits

Author SHA1 Message Date
Volker E. 9380b86c2b styles: remove outdated feature phone font size rules
Nowadays even Apple iWatch has a minimum resolution of 352 pixels,
so we can safely remove the outdated feature phone font rules and
save bytes down-the-wire for users.

Bug: T369247
Change-Id: Ib482a32b0ed288ae1ea4e0b9dca5f6fdf74eb845
2024-07-04 01:34:02 +00:00
Steph Toyofuku 6f98cc6460 (Almost) no more CSS variables in minerva
Remove direct usage of CSS variables in Minerva, and replace them with
codex design tokens again.  Document this decision in the original ADR

Note: there are still a small number of CSS variables in use, including
most notably the --color-link-red fix, which broke when I removed it,
but this change takes care of all the ones that could be easily replaced

Bug: T363743
Change-Id: I7d3a9dceb908167078987de1733774c8bd4bea2f
2024-06-11 11:44:47 -07:00
Volker E dd154b4ea7 styles: Replace deprecated breakpoints
The values have slightly changed:
- Tablet breakpoint is decreased by 80px,
  pushing lesser devices into a mobile only experience but
  should make barely a difference to vast majority of our users.
- Biggest difference is in `min-width-breakpoint-desktop`,
  which is increased by 120px in comparison to
  `@width-breakpoint-desktop: 1000px`

Also removing one out-dated feature phone clause.

TECHNICAL CHANGES:
* The previous breakpoint was tied to the maximum content width.
The previous maximum content width is preserved, and several media
queries are adjusted to make use of it.
* The header (logo) is not optimized for  640px-720px. For now
a temporary fix is but in place which will be investigated as part
of T366859

VISUAL CHANGES:
* 6 visual changes which improve alignment in language and
visual editor overlay and diffs (where wikidiff2 is not
installed)

Bug: T349793
Depends-On: I3afba8c51f60de9271054499bfa3ffbcc1a9d779
Change-Id: I9552d8ad7509aae90e15edda26e786465773d3ac
2024-06-07 12:52:39 -07:00
Jon Robson 1f83fd0d68 History rows should be clickable
Bug: T362683
Change-Id: I8a3b3554991eb8229b0d734fd577c48868480fdc
2024-05-02 12:08:39 +00:00
Steph Toyofuku 4b3abcb1eb [VISUAL CHANGE] Update last modified bar to have an accessible color contrast
The current white text on a green background is not an accessible level
of color contrast.  We were instead recommended to use
@background-color-progressive, so let's do that

In addition, remove the previous definition of
@background-color-last-modified-bar-active as it's no longer being used

Visual change for pages on mobile that have been updated recently

Bug: T358736
Change-Id: If5b97b785e95df75645be62847cef396f6be68b6
2024-03-15 22:28:48 +00:00
jenkins-bot 07b25670af Merge "Main page should work in night mode" 2024-02-29 20:35:45 +00:00
Jon Robson 55ea39bb30 Main page should work in night mode
Note: You need to enable wgMinervaApplyKnownTemplateHack in LocalSettings.php
for these styles to work.

Editors can opt out of these rules by using the already popularized
"notheme" class.

Bug: T357722
Change-Id: I32f3968b74bded987bb60e85a902e551727db545
2024-02-28 22:29:08 +00:00
Jon Robson f7124fdc6c Separate image inversion from widget inversion
For images only the filter is needed, not the entire
widget

Bug: T356822
Change-Id: Id0ace19d4071a987d132224612724259ed40aa1b
2024-02-27 11:29:06 -07:00
Jon Robson a30b575271 Map color-based skin variables to CSS variables
Additional changes:
* Separate CSSCustomProperties.less from skin.less so that
we can obtain the unmodified original values for the colors

Depends-On: I363a97d33d85a9033da753f2a8fe730d80206639
Depends-On: I148eaca747352ffdc9d1423f20d34bd5a1d0e447
Bug: T356427
Change-Id: I916450c276cabb0c7c871525c50f95fb87f498ad
2024-02-21 00:36:13 +00:00
Jon Robson 16139768c6 Use border-color-muted CSS variable for Special:RecentChanges
Bug: T356825
Change-Id: I8cc39a3150dd55f1ae65d4b4352ab3df3f053fe5
2024-02-16 10:32:50 -08:00
Jan Drewniak 59fd0cd5dc Convert all color related Less variables to CSS custom properties
All colors used in Minerva are converted from Less variables
into CSS custom properties. A new file called CSSCustomProperties.less
is created in the skins.minerva.base.styles module to store
these custom properties and an ADR is provided on the rationale for
dropping support for browsers that don't support custom properties.

The new CSS custom properties follow Codex design token conventions
where possible (and noted when not).

Link colors are unique because their styles are defined in core,
so in that case the Less variables values are set to custom properties.
Those values are then fed back into MediaWiki core for core link
styling.

Also adds a temporary night-mode color palette under the
.skin-nightmode-1 class on the <html> element.

Bug: T356074
Change-Id: Ida1f14138f12bd3c600c264bde7b5100f9dbf4ff
2024-02-02 17:57:27 +00:00
Jan Drewniak be0b43042e Convert Less variable names from camelCase to snake-case
Converts all Less variable names from CamelCase to snake-case
per the MediaWiki coding conventions.

Removes the following unused Less variables, mostly
related to icons, since those were converted to Codex:
- @icon-touch-area-sm
- @icon-touch-area-md
- @min-size-icon (replaced with @size-icon-medium)
- @icon-glyph-size-sm
- @icon-size-sm
- @icon-padding-sm
- @icon-glyph-size-md
- @icon-size-md
- @margin-icon-md-labelled

Bug: T350581
Change-Id: I1b16e77942d9bea20dcc5636a63d64aa2325a173
2024-01-31 15:24:31 -08:00
Jdrewniak cc513b9e72 Revert "styles: Apply Codex z-index tokens"
This reverts commit b28b80e222.

Reason for revert: Changes broke dialogs in mobile VE.

Change-Id: I957661a882b1d8aa50cede906631d29f4a51e530
2023-05-26 15:29:03 +00:00
Volker E b28b80e222 styles: Apply Codex z-index tokens
Applying central Codex design tokens in new architecture.
This replaces all existing MN `z-index` tokens and comments on
replacement choice.

Bug: T285592
Change-Id: I23d794566898946a500c10713802d8dfaad993d1
2023-05-18 23:33:38 -07:00
Volker E 38ca243e39 styles: Replace 'mediawiki.ui/variables' call with skin variables
Replacing 'mediawiki.ui/variables.less' @import with
new skin-aware 'mediawiki.skin.variables.less' standard.
Removing calls for 'mediawiki.skin.variables.less' in favor for
'minerva.variables.less' for consistency.
Also
- replacing several static values with new Codex design token featuring
  skin variables of `background-color`, `color`, `border-*` and
  `transition` categories
- renaming several Less variables to variable naming standard
- moving a small number of MinervaNeue specific variables into
  'minderva.variables.less' file. Those should be replaced in mid-future
  by Codex design tokens

Please note, that this patch is not replacing all values with
possible Codex tokens. It's just applying them on selected
categories for consistency for now to keep the patch easier reviewable.
Further replacements will be done in follow-up patches.

Bump MediaWiki core required version to >= v1.41.0.

Bug: T319381
Bug: T332541
Depends-On: I98c8cc27527533e2efb3b987ee34bc403e988b75
Change-Id: I86c5a35377541a784552c29456e0b8b507b3ee9c
2023-04-24 16:08:27 +00:00
Umherirrender 5bd834e0c7 build: Updating npm dependencies
* stylelint-config-wikimedia: 0.13.0 → 0.14.0

Run stylelint fix to fix the new stylelint rule

Change-Id: I7738ae421e84dd3171355391ebc82dd812b39ca4
2023-03-31 21:50:36 +02:00
Volker E e794ae1c07 minerva.variables: Remove duplicated ones by mediawiki.skin.variables
Were added to core with Ib40bec99d1174a6.

Change-Id: I8fccd064e6926eb70f8ecb1e4270c85836f10362
2023-01-14 20:01:11 +00:00
Volker E ca776d7692 pagelist headers: Increase contrast ratio
Increasing contrast ratio slightly to meet WCAG 2 AA requirements.

Bug: T310741
Change-Id: Ic7e674525e26e407e0d9f7dbab5dc87d358d5247
2022-06-15 13:07:21 -07:00
Ed Sanders d926771bd8 Remove deprecated vendor prefixes and their mixins
Additional change:
* The animation stylesheet pulled down for the storybook instance
in dev-scripts/setup-storybook.sh is no longer referenced anywhere
in assets so can be removed.

Bug: T306486
Bug: T308351
Bug: T308360
Change-Id: Ia9f2a05cde2724486f7e449261c5d4875388f5ab
2022-05-23 23:18:43 +00:00
Ed Sanders 86caa17713 build: Update linters and linter config
* Update stylelint-config-wikimedia to 0.13.0
* Ensure eslintrc.js and root files are linted
  with server config

Change-Id: I59c49fedd5b0c4c5620f960b78e4f781a6bc5abb
2022-05-18 14:33:23 +01: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
AntiCompositeNumber fae41df135 minerva.less: use rem instead of em for browser-relative font sizes
em values are calculated relative to the parent element's font-size, not
the root or browser-default font-size. However, @font-size-minerva-small
and @font-size-minerva-smallest are supposed to be relative to the
assumed 16px browser default font-size. If they are used in an element
that already has a smaller-than-100% font-size, the resulting font-sizes
will compound and can be smaller than accessability minimums. This change
uses rems instead, so -small and -smallest will be the same sizes
everywhere on the page.

If -small or -smallest were used anywhere where parent-relative font
sizing is expected, this patch will change the size of that text. This
is only a problem if the new size is smaller than the old size, as any
sizes smaller than -smallest are an accessability issue. I looked for
any potential problems, but didn't see any.

Bug: T282315
Change-Id: Ib578f2cc4597b4dbfb5d1f5e4842962433af3748
2021-08-16 15:25:18 -05:00
Volker E 32724f8183 styles: Implement mediawiki.skin.variables.less for MinervaNeue
For now, only define:

- @font-family-sans (unused in MinervaNeue, but for possible future use)
- @border-radius-base

With current implementation before this patch, MinervaNeue is relying on core's default
`@border-radius` which is set to `0` to be close to HTML default. 
MinervaNeue is currently not applying correct skin's `border-radius`.

Bug: T263270
Change-Id: I9a149eefd15efede27416ada4db07072e53628ec
2020-11-02 17:56:40 +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
Volker E b5eeb29fc1 Remove obsolete '@tocFontSize' variable
Seems to have been replaced by `@font-size-minerva-small`.

Bug: T255230
Change-Id: I94d565913b44fa4fb569e587eaa85d1f3823ccbc
2020-06-25 13:57:31 -07: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 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 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
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
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
Volker E ee4dbd39dd Use opacity for aligning icon color
Also adding corresponding variable.

Depends-On: I6e43a32366802775ae05e94859e
Change-Id: Iba1b12817b1620db96096f7fad34db194ce0775c
2020-04-18 00:28:20 +00:00
Volker E 1c18c860ca Reduce margin in icon and label combination
Specifically visible in main menu.

Bug: T237019
Change-Id: I47bfc169c1edae5c251a76800c800aa2f5328456
2020-02-12 22:43:44 -08:00
Krzysztof Witucki 0887552619 Fix shadow on notification overlay and navigation-drawer
minerva.variables.less: added gray color variable
MainMenu.less: added shadow to navigation
NotificationOverlay.less: changed alpha color of shadow
drawers.less: replaced rgba color with the same color variable

Bug: T231205
Change-Id: Ib1e16804b941a8f3b0cc639673baf73dc749a60a
2019-12-24 12:00:15 +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
Jan Drewniak 77a1424e4e Show labels in page-actions menu on desktop widths
Adds labels to page-actions menu via a new
`.mw-ui-icon-with-label-desktop` class that shows labels at the
desktop break-point.

Bug: T226562
Change-Id: If57ab44660e0dc2a58c04fbf22dee6c27dd1f45f
2019-10-28 12:53:38 -07:00
Volker E 3da637156f Use default duration LESS variable and align timing function one
Bug: T236224
Change-Id: I5c709a0989ab22839453e64bcefab201c666bf3c
2019-10-24 14:50:38 -07:00
Volker E 3d6b2b29bd Add standard transition to icon elements
While working on I05c4e5f7a8b18a3 I've noticed the missing transition.
Also adding standard WikimediaUI variables in support of this.

Change-Id: I30c75ed306bf826ae40db3703ef423dfad85fa74
2019-10-24 16:51:05 +00: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 56b8c43404 Bump icon touch areas to 44x44
Bug: T230033
Change-Id: I90c9616f1df38de51a92d55b56eb7dbb8662d0d0
2019-10-02 12:20:39 -07: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
jdlrobson b15fa199a2 Clear search alignment
* Refactor less variables to make icon touch-area sizes flexible 
* Search input is bumped up 1px to an even number

Bug: T233156
Change-Id: I156d09bfca8db9506c0e9cee21e4d6e0a2e91689
2019-09-25 22:15:21 +00:00
jdlrobson 109b24e0ee Adjust notification icon to be the same size as the other icons
Bug: T232011
Change-Id: I0300685d38551bc9ee2c2bd32d6348f32d4df4de
2019-09-13 13:55:01 -07:00
jenkins-bot 02986e7a85 Merge "Change height of overlay headers to 3em, keep site header unchanged" 2019-09-10 22:58:50 +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
Bartosz Dziewoński ee80c16f2c Change height of overlay headers to 3em, keep site header unchanged
Split @headerHeight variable into @siteHeaderHeight and @overlayHeaderHeight.
@overlayHeaderHeight is now set to 3em (48px).

Use @siteHeaderHeight for the base skin interface, and @overlayHeaderHeight
for overlays.

skinStyles/mobile.notifications.overlay/minerva.less:
* Update footer height to remain the same as header height.

skinStyles/mobile.startup/search/SearchOverlay.less:
* Use @siteHeaderHeight even though it is an overlay, because it's
  supposed to exactly match the base skin interface.

Bug: T215426
Change-Id: Iaa36f581a12a8eea2b755ae583b8a2c6324ebe29
2019-09-03 22:30:20 +00:00
Stephen Niedzielski 936ec8dcb4 [LESS] remove unused variables
Identified by:

  find -type f -name \*.less|
  xargs -rd\\n sed -rn 's%^\s*(@[a-zA-Z0-9_]+):.*%\1%p'|
  xargs -rd\\n -I{} bash -c "rg '{}''[^:]' > /dev/null || echo '{}'"

Change-Id: I64e02731e9f8b69ce8e934502208c061d595b673
2019-08-29 16:35:00 +02:00