Skip to content

Commit

Permalink
fix(MediaWiki): break down long filenames for broken files (#698)
Browse files Browse the repository at this point in the history
* Update content.thumbnails-common.less

* Update content.media-common.less
  • Loading branch information
Dringsim committed Jul 23, 2023
1 parent f0f0a07 commit 6e44db8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Module: mediawiki.skinning.content.media-common
* Version: REL1_39
*
* Date: 2022-11-18
*/
* Date: 2023-07-23
*/

/**
* Block media items
Expand Down Expand Up @@ -47,6 +47,7 @@ figure[ typeof~='mw:File/Frame' ] {
*/
> span.mw-broken-media {
display: inline-block;
overflow-wrap: break-word;
/* This is hardcoded in Linker::makeThumbLink2 for broken media */
width: 180px;
}
Expand All @@ -69,7 +70,9 @@ figure[ typeof~='mw:File/Frame' ] {
@media ( min-width: @width-breakpoint-tablet ) {
figure[ typeof~='mw:File/Thumb' ],
figure[ typeof~='mw:File/Frame' ] {
text-align: start;
> figcaption {
text-align: start;
}

// When float is not explicitly set
.mw-content-ltr & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Module: mediawiki.skinning.content.thumbnails-common
* Version: REL1_39
*
* Date: 2022-11-18
*/
* Date: 2023-07-23
*/

/* @noflip */
div.floatleft,
Expand Down Expand Up @@ -44,6 +44,10 @@ div.thumbinner {
// We use the same font size for both caption and inner
font-size: 0.8125rem;
text-align: center;

> a {
overflow-wrap: break-word;
}
}

// Do not float content in mobile view
Expand Down

0 comments on commit 6e44db8

Please sign in to comment.