Просмотр исходного кода

refactor(themes): drop redundant multiline class on title (#8810)

The multiline class on the title <a> existed only so the parent <li>
could detect it via :has(.multiline). The condition (thumbnail or
summary enabled) is already exposed on the parent <ul> by the
has-thumbnail and has-summary classes, so keying the rule on those
directly removes the indirection. Same elements matched in modern
browsers. The rule now also applies where :has() isn't supported,
relevant to #6776.

Co-authored-by: Bjørn A. Andersen <polybjorn@users.noreply.github.com>
polybjorn 1 неделя назад
Родитель
Сommit
408419f433

+ 1 - 1
app/views/helpers/index/normal/entry_header.phtml

@@ -64,7 +64,7 @@
 	?></li><?php
 	endif; ?>
 	<li class="item titleAuthorSummaryDate">
-		<a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>" class="item-element title<?= (($topline_thumbnail !== 'none') || $topline_summary) ? ' multiline' : '' ?>" dir="auto"><?= $this->entry->title() ?><?php
+		<a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>" class="item-element title" dir="auto"><?= $this->entry->title() ?><?php
 		if ($topline_display_authors):
 			?> <span class="author"><?= implode(' · ', $this->entry->authors()) ?></span><?php
 		endif;

+ 2 - 1
p/themes/base-theme/frss.css

@@ -1513,7 +1513,8 @@ a.website:hover .favicon {
 	background-color: inherit;
 }
 
-.flux .item:has(.multiline) {
+.flux .flux_header.has-thumbnail .item.titleAuthorSummaryDate,
+.flux .flux_header.has-summary .item.titleAuthorSummaryDate {
 	vertical-align: top;
 }
 

+ 2 - 1
p/themes/base-theme/frss.rtl.css

@@ -1513,7 +1513,8 @@ a.website:hover .favicon {
 	background-color: inherit;
 }
 
-.flux .item:has(.multiline) {
+.flux .flux_header.has-thumbnail .item.titleAuthorSummaryDate,
+.flux .flux_header.has-summary .item.titleAuthorSummaryDate {
 	vertical-align: top;
 }