Skip to content

Commit

Permalink
fix(core): 馃悰 incorrect sticky header rendering on changelist
Browse files Browse the repository at this point in the history
Fix: #575
  • Loading branch information
alistair3149 committed Jan 31, 2023
1 parent ef9ab2a commit 78f79e8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
5 changes: 2 additions & 3 deletions skinStyles/mediawiki/mediawiki.rcfilters.filters.ui.less
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,8 @@
}

.mw-changeslist-legend {
z-index: @z-index-page-header + 1; // so that it won't be covered by sticky header
border-color: var( --border-color-base );
background-color: var( --color-surface-1 );
border-color: transparent;
background-color: var( --color-surface-2 );
}
}

Expand Down
36 changes: 29 additions & 7 deletions skinStyles/mediawiki/special/mediawiki.special.changeslist.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,23 @@

// Need additional parent to override
.mw-changeslist-legend {
z-index: @z-index-page-header + 1; // so that it won't be covered by sticky header
border-color: var( --border-color-base );
padding: 0.6em; // Sync with rcfilter
border-color: transparent;
border-radius: var( --border-radius--small );
background-color: var( --color-surface-1 );
background-color: var( --color-surface-2 );
font-size: 0.8125rem;

// Citizen label styles
strong {
color: var( --color-base--subtle );
font-weight: var( --font-weight-normal );
letter-spacing: 0.05em;
}

@media ( max-width: @width-breakpoint-tablet ) {
margin: 0;
float: none;
}
}

.mw-tag-markers {
Expand All @@ -53,7 +66,6 @@
font-size: 0.8125rem;
font-weight: var( --font-weight-normal );
letter-spacing: 0.05em;
.citizen-sticky-header( 0, false, false );
}

&-line {
Expand Down Expand Up @@ -81,7 +93,17 @@
border-color: var( --border-color-base );
}

// Disable sticky header
#citizen-body-header-sticky-sentinel {
display: none;
/*
* Only apply stick header style on the special pages
* Sometimes wiki transclude those pages and these styles will break regular pages
*/
.ns-special {
.mw-changeslist h4 {
.citizen-sticky-header( 0, false, false );
}

// Disable sticky header
#citizen-body-header-sticky-sentinel {
display: none;
}
}

0 comments on commit 78f79e8

Please sign in to comment.