Michael added a comment.

  Mh, this will be a bit tricky, because the font-family in very easy to 
override as its specificity is almost as low as possible:
  
  name=Vector/resources/common/typography.less
    html,
    body {
        font-family: @font-family-sans;
    }
  
  And in the file where that is defined, it reads:
  
  name=Vector/resources/mediawiki.less/mediawiki.skin.variables.less
    // FIXME: Use WikimediaUI Base's OS specific default sans-serif fonts.
    @font-family-sans: sans-serif;
  
  Though that comment was added two years ago in 434214: Implement 
mediawiki.skin.variables.less for Vector 
<https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/434214> PS6 for 
T112747 <https://phabricator.wikimedia.org/T112747>.
  
  One way we could do this is by dropping the `font-family` rule from the Wikit 
typography mixins. Or maybe provide some kind of override? 🤔  Otherwise they 
would be pretty unusable for on-wiki projects.
  
  This could look like
  
    @mixin body ($font-family: $font-family-style-body,$color: 
$font-color-base, $line-height: $font-line-height-style-body, $font-weight: 
$font-weight-style-body) {
        font-family: $font-family;
        font-size: $font-size-style-body;
        font-weight: $font-weight; //can also be $font-weight-style-body-bold
        line-height: $line-height; //can also be set to the smaller 
$line-height-style-body-component
        color: $color;
    }
  
  and be used as
  
    @mixin body ($font-family: unset)
  
  Though I haven't actually tested that yet.
  
  Alternatively, we could define a global css variable for the font-family in 
Vector and other skins and then use that in Wikit with the other fonts as 
fallback. Though that seems like it would need more work and more coordination 
and be overall more fragile.

TASK DETAIL
  https://phabricator.wikimedia.org/T313166

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Michael
Cc: Michael, Mohammed_Sadat_WMDE, Sarai-WMDE, Aklapper, Lydia_Pintscher, 
Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, Akuckartz, 
Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, 
rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to