跳转到内容

Module:Message box/ombox.css:修订间差异

勤求古训,博采众方
删除的内容 添加的内容
追加 .mbox-small 右浮动窄框样式
更新 ombox.css 为 mworg 完整版(含暗色模式+响应式)
 
(未显示同一用户的1个中间版本)
第1行: 第1行:
/**
/* {{ombox}} 其他页面消息框样式 */
* {{ombox}} (other pages message box) styles
.ombox {
*
* @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css
* @revision 2021-07-15
*/
table.ombox {
margin: 4px 10%;
border-collapse: collapse;
/* Default "notice" gray */
border: 1px solid #a2a9b1;
border: 1px solid #a2a9b1;
background-color: #f8f9fa;
border-left: 10px solid #f28500;
background-color: #fdf2d5;
color: #333;
color: #202122;
margin: 0.5em 0;
padding: 3px;
width: 100%;
box-sizing: border-box;
box-sizing: border-box;
}
}


/* An empty narrow cell */
.ombox-speedy {
.ombox td.mbox-empty-cell {
border-left-color: #b32424;
border: none;
background-color: #fee7e6;
padding: 0;
width: 1px;
}
}


/* The message body cell(s) */
.ombox-delete {
.ombox th.mbox-text,
border-left-color: #b32424;
.ombox td.mbox-text {
background-color: #fee7e6;
border: none;
/* 0.9em left/right */
padding: 0.25em 0.9em;
/* Make all mboxes the same width regardless of text length */
width: 100%;
}
}


/* The left image cell */
.ombox-content {
.ombox td.mbox-image {
border-left-color: #f28500;
border: none;
background-color: #fdf2d5;
text-align: center;
padding: 2px 0 2px 0.9em;
}
}


/* The right image cell */
.ombox-style {
.ombox td.mbox-imageright {
border-left-color: #fc3;
border: none;
background-color: #fef6e7;
text-align: center;
padding: 2px 0.9em 2px 0;
}
}


.ombox-move {
table.ombox-notice {
/* Gray */
border-left-color: #9932cc;
background-color: #f3eef7;
border-color: #a2a9b1;
}
}


.ombox-protection {
table.ombox-speedy {
/* Pink */
border-left-color: #a2a9b1;
background-color: #f8f9fa;
background-color: #fee7e6;
color: #333;
}
}


.ombox-notice {
table.ombox-speedy,
table.ombox-delete {
border-left-color: #36c;
/* Red */
background-color: #eaf3ff;
border-color: #b32424;
border-width: 2px;
}
}


.ombox .mbox-image {
table.ombox-content {
/* Orange */
border: none;
border-color: #f28500;
padding: 2px 0 2px 0.9em;
text-align: center;
width: 52px;
}
}


.ombox .mbox-text {
table.ombox-style {
/* Yellow */
border: none;
border-color: #fc3;
padding: 0.25em 0.9em;
}
width: 100%;

table.ombox-move {
/* Purple */
border-color: #9932cc;
}

table.ombox-protection {
/* Gray-gold */
border-color: #a2a9b1;
border-width: 2px;
}
}


/**
/* 小型消息框(如 Lua 通知,右浮动窄框) */
.ombox.mbox-small {
* {{ombox|small=1}} styles
*
* These ".mbox-small" classes must be placed after all other
* ".ombox" classes.
*/
html body.mediawiki .ombox.mbox-small {
clear: right;
clear: right;
float: right;
float: right;
margin: 4px 0 4px 1em;
margin: 4px 0 4px 1em;
box-sizing: border-box;
width: 238px;
width: 238px;
font-size: 88%;
font-size: 88%;
line-height: 1.25em;
line-height: 1.25em;
}

@media screen {
html.skin-theme-clientpref-night table.ombox {
background-color: transparent;
color: inherit;
}
}

@media screen and (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os table.ombox {
background-color: transparent;
color: inherit;
}
}

@media screen and (max-width: 720px) {
table.ombox {
margin: 4px auto;
}
}
}

2026年6月21日 (日) 15:46的最新版本

/**
 * {{ombox}} (other pages message box) styles
 *
 * @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css
 * @revision 2021-07-15
 */
table.ombox {
	margin: 4px 10%;
	border-collapse: collapse;
	/* Default "notice" gray */
	border: 1px solid #a2a9b1;
	background-color: #f8f9fa;
	color: #333;
	box-sizing: border-box;
}

/* An empty narrow cell */
.ombox td.mbox-empty-cell {
	border: none;
	padding: 0;
	width: 1px;
}

/* The message body cell(s) */
.ombox th.mbox-text,
.ombox td.mbox-text {
	border: none;
	/* 0.9em left/right */
	padding: 0.25em 0.9em;
	/* Make all mboxes the same width regardless of text length */
	width: 100%;
}

/* The left image cell */
.ombox td.mbox-image {
	border: none;
	text-align: center;
	padding: 2px 0 2px 0.9em;
}

/* The right image cell */
.ombox td.mbox-imageright {
	border: none;
	text-align: center;
	padding: 2px 0.9em 2px 0;
}

table.ombox-notice {
	/* Gray */
	border-color: #a2a9b1;
}

table.ombox-speedy {
	/* Pink */
	background-color: #fee7e6;
	color: #333;
}

table.ombox-speedy,
table.ombox-delete {
	/* Red */
	border-color: #b32424;
	border-width: 2px;
}

table.ombox-content {
	/* Orange */
	border-color: #f28500;
}

table.ombox-style {
	/* Yellow */
	border-color: #fc3;
}

table.ombox-move {
	/* Purple */
	border-color: #9932cc;
}

table.ombox-protection {
	/* Gray-gold */
	border-color: #a2a9b1;
	border-width: 2px;
}

/**
 * {{ombox|small=1}} styles
 *
 * These ".mbox-small" classes must be placed after all other
 * ".ombox" classes.
 */
html body.mediawiki .ombox.mbox-small {
	clear: right;
	float: right;
	margin: 4px 0 4px 1em;
	box-sizing: border-box;
	width: 238px;
	font-size: 88%;
	line-height: 1.25em;
}

@media screen {
	html.skin-theme-clientpref-night table.ombox {
	    background-color: transparent;
	    color: inherit;
	}
}

@media screen and (prefers-color-scheme: dark) {
    html.skin-theme-clientpref-os table.ombox {
    	background-color: transparent;
    	color: inherit;
    }
}

@media screen and (max-width: 720px) {
  table.ombox {
	margin: 4px auto;
  }
}