Обсуждение MediaWiki:Common.css

Последнее сообщение: 4 года назад от Krassotkin в теме «Горизонтальные списки»

External links icons removed править

Hello! If this CSS adds or modifies icons shown after external links, you'll be interested in knowing that such icons have been removed from MediaWiki core, a change which will reach this wiki in few days. You may want to consider whether you still need them. If you have questions, please ask at bugzilla:63725. Regards, Nemo 09:45, 10 апреля 2014 (UTC)Ответить

Горизонтальные списки править

@Krassotkin: Можно добавить в стили этот код? Многие шаблоны в последнее время строятся на горизонтальных списках для лучшей адаптивности. — putnik 09:35, 15 августа 2019 (UTC)Ответить

/* Style for horizontal lists (separator following item).
   @source mediawiki.org/wiki/Snippets/Horizontal_lists
   @revision 9 (2016-08-10)
   @author [[User:Edokter]]
 */
.hlist dl,
.hlist ol,
.hlist ul {
	margin: 0;
	padding: 0;
}
/* Display list items inline */
.hlist dd,
.hlist dt,
.hlist li {
	margin: 0;
	display: inline;
}
/* Display nested lists inline */
.hlist.inline,
.hlist.inline dl,
.hlist.inline ol,
.hlist.inline ul,
.hlist dl dl, .hlist dl ol, .hlist dl ul,
.hlist ol dl, .hlist ol ol, .hlist ol ul,
.hlist ul dl, .hlist ul ol, .hlist ul ul {
	display: inline;
}
/* Hide empty list items */
.hlist .mw-empty-li,
.hlist .mw-empty-elt {
	display: none;
}
/* Generate bullets */
.hlist dt:after {
	content: ": ";
}
.hlist dd:after,
.hlist li:after {
	content: "\00a0• ";
}
.hlist dd:last-child:after,
.hlist dt:last-child:after,
.hlist li:last-child:after {
	content: none;
}
/* Add parentheses around nested lists */
.hlist dd dd:first-child:before, .hlist dd dt:first-child:before, .hlist dd li:first-child:before,
.hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt li:first-child:before,
.hlist li dd:first-child:before, .hlist li dt:first-child:before, .hlist li li:first-child:before {
	content: " (";
	font-weight: normal;
}
.hlist dd dd:last-child:after, .hlist dd dt:last-child:after, .hlist dd li:last-child:after,
.hlist dt dd:last-child:after, .hlist dt dt:last-child:after, .hlist dt li:last-child:after,
.hlist li dd:last-child:after, .hlist li dt:last-child:after, .hlist li li:last-child:after {
	content: ")";
	font-weight: normal;
}
/* Put ordinals in front of ordered list items */
.hlist ol {
	counter-reset: listitem;
}
.hlist ol > li {
	counter-increment: listitem;
}
.hlist ol > li:before {
	content: " " counter(listitem) "\a0";
}
.hlist dd ol > li:first-child:before,
.hlist dt ol > li:first-child:before,
.hlist li ol > li:first-child:before {
	content: " (" counter(listitem) "\a0";
}

/* Отступы в горизонтальных списках в нав. шаблонах */
.navbox .hlist td dl,
.navbox .hlist td ol,
.navbox .hlist td ul,
.navbox td.hlist dl,
.navbox td.hlist ol,
.navbox td.hlist ul {
	padding: 1px 0 0;
}

/* Неразрывные пробелы в горизонтальных списках */
.nowrap,
.nowraplinks a,
.nowraplinks .selflink,
.hlist-items-nowrap dd,
.hlist-items-nowrap dt,
.hlist-items-nowrap li {
	white-space: nowrap;
}

/* Но где-то неразрывность надо сбросить (например, в навшаблонах в узких местах) */
.wrap,
.wraplinks a,
.wraplinks .selflink,
.hlist-items-nowrap dl dl, .hlist-items-nowrap dl ol, .hlist-items-nowrap dl ul, /* Allow nested lists to wrap anyway */
.hlist-items-nowrap ol dl, .hlist-items-nowrap ol ol, .hlist-items-nowrap ol ul,
.hlist-items-nowrap ul dl, .hlist-items-nowrap ul ol, .hlist-items-nowrap ul ul {
	white-space: normal;
}
  • @putnik, да, конечно, сделал. Только я сейчас тоже не в России и не очень по времени. Так что нет возможности вникать и тестировать. Если увидишь, что где-то что-то покривило или нужно допилить, напиши пожалуйста. --cаша (krassotkin) 12:36, 15 августа 2019 (UTC)Ответить
Вернуться на страницу «Common.css».