(Tabs: add CSS) |
m (add tooltip css) Tags: mobile edit mobile web edit |
||
(2 intermediate revisions by the same user not shown) | |||
Line 142: | Line 142: | ||
.tabs-togglebox details.tabs-container[open] .tabs-close {display: inline;} | .tabs-togglebox details.tabs-container[open] .tabs-close {display: inline;} | ||
.tabs-togglebox details.tabs-container[open] .tabs-open {display: none;} | .tabs-togglebox details.tabs-container[open] .tabs-open {display: none;} | ||
/* END COPY PASTA? */ | /* END COPY PASTA? */ | ||
#wpTextbox1 { | |||
font-family: monospace; /* instead of the default (sans-serif) */ | |||
} | |||
/* ============= * | |||
* News Articles * | |||
* ============= */ | |||
.news-subheader { | |||
padding-left: 0.5em !important; | |||
} | |||
/* CSS for Template: Command List (Base) and its related templates */ | |||
.th-divider, .th-divider th, .th-divider td { | |||
background-color: #ccc !important; | |||
} | |||
/* ========= * | |||
* TOOLTIP * | |||
* ========= */ | |||
.tooltip { | |||
position: relative; | |||
display: inline; | |||
border-bottom: 1px dotted black; | |||
} | |||
.tooltiptext { | |||
visibility: hidden; | |||
min-width: 250px; | |||
padding: 12px 14px; | |||
text-align: center; | |||
position: absolute; | |||
left: 50%; | |||
bottom: calc(100% + 20px); | |||
z-index: 99999; | |||
background: #fff; | |||
box-shadow: 0 2px 0 0 rgba(0,0,0,0.15); | |||
border: 1px solid #a2a9b1; | |||
border-radius: 2px; | |||
font-weight: normal; | |||
white-space: normal; | |||
} | |||
.tooltiptext:after, | |||
.tooltiptext:before { | |||
content: ''; | |||
position: absolute; | |||
left: 50%; | |||
border-style: solid; | |||
} | |||
.tooltiptext:after, | |||
.tooltip .tooltip .tooltiptext:after { | |||
top: 100%; | |||
bottom: auto; | |||
width: 20px; | |||
height: 20px; | |||
margin-top: -10px; | |||
margin-left: -10px; | |||
background: #fff; | |||
box-shadow: 1px 1px 0px #a2a9b1; | |||
transform: rotate(45deg); | |||
border-width: 0; | |||
} | |||
.tooltiptext:before { | |||
top: 100%; | |||
bottom: auto; | |||
border-width: 18px; | |||
margin-left: -18px; | |||
border-color: white transparent transparent transparent; /* fallback border color */ | |||
border-color: rgba(0,0,0,0.15) transparent transparent transparent; | |||
pointer-events: none; | |||
} | |||
.tooltip .tooltip .tooltiptext { | |||
bottom: auto; | |||
top: calc(100% + 20px); | |||
} | |||
.tooltip .tooltip .tooltiptext:after { | |||
top: 0px; | |||
bottom: 100%; | |||
box-shadow: -1px -1px 0px #a2a9b1; | |||
} | |||
.tooltip .tooltip .tooltiptext:before { | |||
top: auto; | |||
bottom: 100%; | |||
border-width: 16px; | |||
margin-left: -16px; | |||
border-color: transparent transparent #888 transparent; | |||
} | |||
.tooltiptext hr { | |||
margin: 10px 0 12px; | |||
position: relative; | |||
background: none; | |||
} | |||
.tooltiptext hr:after { | |||
content: ''; | |||
display: block; | |||
width: 100%; | |||
height: 1px !important; | |||
position: absolute; | |||
left: -14px; | |||
background: #a2a9b1; | |||
padding: 0 14px; | |||
} | |||
.tooltip:hover > .tooltiptext, | |||
.tooltip.hover > .tooltiptext { | |||
visibility: visible; | |||
} | |||
.tooltiptext { | |||
opacity: 0; | |||
transition: opacity 200ms ease, visibility 0s ease 200ms, transform 200ms ease; | |||
transform: translate(-50%, 8px); | |||
} | |||
.tooltip .tooltip .tooltiptext { | |||
transform: translate(-50%, -8px); | |||
} | |||
.tooltip:hover > .tooltiptext, | |||
.tooltip.hover > .tooltiptext { | |||
opacity: 1; | |||
transition-delay: 0s; | |||
transform: translate(-50%, 0); | |||
} | |||
/* ======================= | |||
Tooltip colors & styles | |||
======================= */ | |||
/* Just have it inherit | |||
.tooltiptext a { color: #0645ad; border-bottom: 0; } | |||
.tooltiptext a:visited { color: #0b0080; } | |||
.tooltiptext a:active { color: #faa700; } | |||
.tooltiptext a:hover, a:focus { text-decoration: underline; } | |||
.tooltiptext { color: #252525; } | |||
.tooltiptext a.new { color: #ba0000; }*/ | |||
/* Remove .mw-body-content stacking context so the tooltip can | |||
overlap with elements outside content area and be shown properly */ | |||
.mw-body-content { z-index: auto; } |
Latest revision as of 23:53, 10 August 2018
/*==============
TABS EXTENSION
For Extension:Tabs, since its CSS doesn't apply by default
==============*/
.tabs-tabbox .tabs-input,
.tabs-tabbox .tabs-container .tabs-content,
.tabs-container .tabs-input,
.tabs-close,
.tabs-container .tabs-content {
display:none;
}
.tabs-tabbox .tabs-label,
.tabs-container .tabs-label {
background-color: inherit;
border: 1px solid;
border-bottom:none;
border-radius: 7px 7px 0 0;
cursor: pointer;
display: inline-block;
padding: 0 2px;
position:relative;
vertical-align: bottom;
}
.tabs-tabbox .tabs-container {
margin-top: -1px;
padding: 2px 6px;
border-radius: 8px;
position: relative;
border: 1px solid #AAA;
width: inherit; /*This will cause the width to be inherited from the main tab, and enables the possibility to use width: inherit within the tab itself too */
max-width: inherit;
min-width: inherit;
z-index: 1; /* unselected tab is positioned below the content this way */
}
.tabs-tabbox .tabs-label:hover,
.tabs-tabbox .tabs-label:active,
.tabs-container .tabs-label:hover,
.tabs-tabbox .tabs-label:active,
.tabs-label:hover, .tabs-label:active {
background-color: white;
}
.tabs-plain .tabs-label,
.tabs-container .tabs-label {
border: 1px solid #AAA;
border-radius: 5px;
}
/*.tabs-plain label:first-of-type,*/
.tabs-tabbox > .tabs-input:checked + .tabs-label,
.tabs-input-0:checked + .tabs-input-1 + .tabs-label,
.tabs-plain input[type="radio"]:checked + label {
background-color: #FFF;
}
.tabs-plain input[type="radio"]:disabled + label,
.tabs-plain .tabs-label {
background-color: #CCC;
}
.tabs-plain .tabs-container {
border-radius: 0;
border: none;
padding: 0;
margin-top: 1px;
}
/* TABS EXTENSION COPY PASTA? */
.tabs-togglebox > .tabs-container {
display: inline-block; /* this is to make the box the minimal width it needs to be */
width: inherit;
min-width: inherit;
max-width: inherit;
padding: 0;
border-radius: 8px;
}
.tabs-togglebox >*> .tabs-label {
display: block;
text-align: center;
border-radius: 7px;
padding: 1px 5px;
margin: 0;
outline: none; /* prevent :focus outline */
}
.tabs-togglebox >*> .tabs-content {
padding: 2px 6px;
border-radius: 0 0 7px 7px;
border: 1px solid #AAA;
border-top: none;
vertical-align: top;
}
.tabs-label:hover {
background-color: #CCC;
}
.tabs-label:active, .tabs-label:focus {
background-color: #CCE;
}
.tabs-tabbox > .tabs-input:checked + .tabs-label,
.tabs-input-0:checked + .tabs-input-1 + .tabs-label {
z-index: 2;
background-color: #FFF;
}
.tabs-togglebox >*> .tabs-input:checked + .tabs-label,
.tabs-dropdown >*> .tabs-label:focus, .tabs-dropdown:hover >*> .tabs-label {border-radius: 7px 7px 0 0;}
.tabs-togglebox >*> .tabs-input:checked ~ .tabs-content {display: block;}
/* tabs-close is hidden by default, tabs-open is shown by default. Swap this when the tab is opened. */
.tabs-togglebox .tabs-input:checked + * .tabs-close {display: inline;}
.tabs-togglebox .tabs-input:checked + * .tabs-open {display: none;}
.tabs-tabbox > .tabs-input.checked + .tabs-label,
.tabs-input-0.checked + .tabs-input-1 + .tabs-label {
z-index: 2;
/*(background-color: #FFF;*/
}
.tabs-togglebox >*> .tabs-input.checked ~ .tabs-content {display: block;}
.tabs-togglebox >*> .tabs-input.checked + * .tabs-close {display: inline;}
.tabs-togglebox >*> .tabs-input.checked + * .tabs-open {display: none;}
/**
* The following is an alternative toggle system for Android Browser using <detail> and <summary> tags
* which is based on http://stackoverflow.com/q/21357641/1256925
*/
summary::-webkit-details-marker {
display: none;
}
.tabs-togglebox details.tabs-container:not([open]) .tabs-content {
display: none;
}
.tabs-togglebox details.tabs-container[open] .tabs-content {
display: block;
}
.tabs-togglebox details.tabs-container:not([open]) .tabs-label {
border-radius: 7px;
}
.tabs-togglebox details.tabs-container[open] .tabs-label {
border-radius: 7px 7px 0 0;
}
.tabs-togglebox details.tabs-container[open] .tabs-close {display: inline;}
.tabs-togglebox details.tabs-container[open] .tabs-open {display: none;}
/* END COPY PASTA? */
#wpTextbox1 {
font-family: monospace; /* instead of the default (sans-serif) */
}
/* ============= *
* News Articles *
* ============= */
.news-subheader {
padding-left: 0.5em !important;
}
/* CSS for Template: Command List (Base) and its related templates */
.th-divider, .th-divider th, .th-divider td {
background-color: #ccc !important;
}
/* ========= *
* TOOLTIP *
* ========= */
.tooltip {
position: relative;
display: inline;
border-bottom: 1px dotted black;
}
.tooltiptext {
visibility: hidden;
min-width: 250px;
padding: 12px 14px;
text-align: center;
position: absolute;
left: 50%;
bottom: calc(100% + 20px);
z-index: 99999;
background: #fff;
box-shadow: 0 2px 0 0 rgba(0,0,0,0.15);
border: 1px solid #a2a9b1;
border-radius: 2px;
font-weight: normal;
white-space: normal;
}
.tooltiptext:after,
.tooltiptext:before {
content: '';
position: absolute;
left: 50%;
border-style: solid;
}
.tooltiptext:after,
.tooltip .tooltip .tooltiptext:after {
top: 100%;
bottom: auto;
width: 20px;
height: 20px;
margin-top: -10px;
margin-left: -10px;
background: #fff;
box-shadow: 1px 1px 0px #a2a9b1;
transform: rotate(45deg);
border-width: 0;
}
.tooltiptext:before {
top: 100%;
bottom: auto;
border-width: 18px;
margin-left: -18px;
border-color: white transparent transparent transparent; /* fallback border color */
border-color: rgba(0,0,0,0.15) transparent transparent transparent;
pointer-events: none;
}
.tooltip .tooltip .tooltiptext {
bottom: auto;
top: calc(100% + 20px);
}
.tooltip .tooltip .tooltiptext:after {
top: 0px;
bottom: 100%;
box-shadow: -1px -1px 0px #a2a9b1;
}
.tooltip .tooltip .tooltiptext:before {
top: auto;
bottom: 100%;
border-width: 16px;
margin-left: -16px;
border-color: transparent transparent #888 transparent;
}
.tooltiptext hr {
margin: 10px 0 12px;
position: relative;
background: none;
}
.tooltiptext hr:after {
content: '';
display: block;
width: 100%;
height: 1px !important;
position: absolute;
left: -14px;
background: #a2a9b1;
padding: 0 14px;
}
.tooltip:hover > .tooltiptext,
.tooltip.hover > .tooltiptext {
visibility: visible;
}
.tooltiptext {
opacity: 0;
transition: opacity 200ms ease, visibility 0s ease 200ms, transform 200ms ease;
transform: translate(-50%, 8px);
}
.tooltip .tooltip .tooltiptext {
transform: translate(-50%, -8px);
}
.tooltip:hover > .tooltiptext,
.tooltip.hover > .tooltiptext {
opacity: 1;
transition-delay: 0s;
transform: translate(-50%, 0);
}
/* =======================
Tooltip colors & styles
======================= */
/* Just have it inherit
.tooltiptext a { color: #0645ad; border-bottom: 0; }
.tooltiptext a:visited { color: #0b0080; }
.tooltiptext a:active { color: #faa700; }
.tooltiptext a:hover, a:focus { text-decoration: underline; }
.tooltiptext { color: #252525; }
.tooltiptext a.new { color: #ba0000; }*/
/* Remove .mw-body-content stacking context so the tooltip can
overlap with elements outside content area and be shown properly */
.mw-body-content { z-index: auto; }