Difference between revisions of "User:Larivact/common.css"

From ArchWiki
Jump to: navigation, search
(add category CSS)
m (wrong selector)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
/* For https://wiki.archlinux.org/index.php/User:Larivact/drafts/Template:RespCell */
 +
 +
@media only screen and (max-width: 600px)  {
 +
 +
table.responsive-table, table.responsive-table thead, table.responsive-table tbody, table.responsive-table th, table.responsive-table td, table.responsive-table tr {
 +
display: block;
 +
}
 +
 +
table.responsive-table thead tr {
 +
display: none;
 +
}
 +
 +
table.responsive-table tbody tr {
 +
border-bottom: 2px solid #ccc;
 +
}
 +
 +
table.responsive-table td {
 +
position: relative;
 +
padding-left: 50% !important;
 +
border-bottom: 0 !important;
 +
}
 +
 +
table.responsive-table td:before {
 +
position: absolute;
 +
top: 6px;
 +
left: 6px;
 +
width: 45%;
 +
padding-right: 10px;
 +
white-space: nowrap;
 +
content: attr(data-label);
 +
text-align: left;
 +
}
 +
}
 +
 
/* See also https://wiki.archlinux.org/index.php/MediaWiki_talk:Common.css#Move_categories_under_h1 */
 
/* See also https://wiki.archlinux.org/index.php/MediaWiki_talk:Common.css#Move_categories_under_h1 */
  

Latest revision as of 07:41, 2 December 2018

/* For https://wiki.archlinux.org/index.php/User:Larivact/drafts/Template:RespCell */

@media only screen and (max-width: 600px)  {

	table.responsive-table, table.responsive-table thead, table.responsive-table tbody, table.responsive-table th, table.responsive-table td, table.responsive-table tr { 
		display: block; 
	}

	table.responsive-table thead tr { 
		display: none;
	}

	table.responsive-table tbody tr {
		border-bottom: 2px solid #ccc;
	}

	table.responsive-table td {
		position: relative;
		padding-left: 50% !important; 
		border-bottom: 0 !important;
	}

	table.responsive-table td:before { 
		position: absolute;
		top: 6px;
		left: 6px;
		width: 45%; 
		padding-right: 10px; 
		white-space: nowrap;
		content: attr(data-label);
		text-align: left;
	}
}

/* See also https://wiki.archlinux.org/index.php/MediaWiki_talk:Common.css#Move_categories_under_h1 */

body:not(.page-Main_page) #bodyContent{
    display: flex;
    flex-direction: column; 
}
body:not(.page-Main_page) #contentSub {
    order: -2;
    margin-bottom: 0;
}
body:not(.page-Main_page) #catlinks {
    order: -1;
    /*  The margin-bottom is consistent with div.archwiki-template-message */
    margin: 0.5em 0 1em;
}
body:not(.page-Main_page) p:first-child, .archwiki-template-meta-related-articles-start + p{
    margin-top: 0;
}

/* See also https://wiki.archlinux.org/index.php/Help_talk:Template#Template_colors */

div.archwiki-template-box.archwiki-template-box-note {
  background-color:#eef;
  border-color:#ccd;
}
div.archwiki-template-box.archwiki-template-box-tip {
  background-color: #ebfeee;
  border-color: #bed8be;
}