@clinic/clinic-common
Version:
Shared parts between the Clinic.js suite
283 lines (243 loc) • 4.9 kB
CSS
html {
--nc-colour-text: white;
--nc-colour-code: #E9F100;
--nc-colour-notification-dot: #2165E5;
--nc-colour-tray-backdrop: rgba(0, 0, 0, 0.6);
--nc-colour-tray: #292d39;
--nc-colour-header-background: #292d39;
--nc-font-family-sans: Archia, sans-serif;
--nc-font-family-sans-alt: Campton, sans-serif;
--nc-font-family-monospace: 'Space Mono', monospace;
}
html {
font-family: var(--nc-font-family-sans);
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: var(--nc-font-family-sans-alt);
}
pre,
code {
font-family: var(--nc-font-family-monospace);
}
input,
button {
font-family: inherit;
}
/* Icon */
.nc-icon {
display: inline-block;
position: relative;
width: 1em;
height: 1em;
vertical-align: middle;
}
.nc-icon svg {
position: absolute;
left: -10%;
top: -10%;
width: 120% ;
height: 120% ;
}
/* Code block */
.nc-code {
padding: 1em;
font-size: 18px;
font-weight: bold;
text-align: left;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
white-space: pre;
tab-size: 2;
hyphens: none;
border-radius: 4px;
color: var(--nc-colour-code);
background-color: rgba(0, 0, 0, 0.1);
line-height: 1.75;
overflow: auto;
}
/* Help Button */
.nc-button.walkthrough-button {
margin-left: 15px;
}
.nc-button.walkthrough-button .nc-button__inner-container {
padding: 0px;
}
.nc-button.walkthrough-button {
display: inline-block;
position: relative;
z-index: 0;
width: auto;
padding: 0.5em;
font-size: 13px;
font-family: inherit;
font-weight: bold;
text-decoration: none;
text-align: center;
white-space: nowrap;
border: solid currentColor 1px;
color: var(--nc-colour-text);
border-radius: 4px;
background-color: transparent;
cursor: pointer;
}
.nc-button.walkthrough-button:hover:before,
.nc-button.walkthrough-button:active:before {
opacity: 0.1;
}
.nc-button.walkthrough-button:active:before {
background-color: black;
}
/* Tray */
.nc-tray-backdrop,
.nc-tray {
display: none;
position: fixed;
z-index: 999;
top: 0;
right: 0;
width: 100vw;
height: 100vh;
opacity: 0;
transition-property: opacity, transform;
transition-duration: 0.2s;
transition-timing-function: ease-out;
}
.nc-tray-backdrop {
background-color: var(--nc-colour-tray-backdrop);
}
.nc-tray {
background-color: var(--nc-colour-tray);
color: var(--nc-colour-text);
font-size: 16px;
transform: translateX(100%);
}
.nc-tray__inner {
padding: 32px;
}
.nc-tray__inner a:link,
.nc-tray__inner a:visited {
color: inherit;
}
.nc-tray__close {
position: absolute;
top: 8px;
right: 8px;
width: 32px;
height: 32px;
padding: 8px;
border: 0;
border-radius: 100%;
}
.nc-tray__close:before {
border-radius: 100%;
}
.nc-tray__close-icon {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.is-tray-visible .nc-tray,
.is-tray-visible .nc-tray-backdrop {
display: block;
}
.is-tray-active .nc-tray,
.is-tray-active .nc-tray-backdrop {
opacity: 1;
transform: none;
}
/* Header */
.nc-header {
display: flex;
align-items: center;
height: 65px;
background: var(--nc-colour-header-background);
justify-content: space-between;
padding: 0px 16px;
}
.nc-header__logo {
display: flex;
align-items: center;
text-decoration: none;
}
.nc-header__logo-text {
color: var(--nc-colour-text);
font-weight: bold;
font-size: 18px;
}
.nc-header__logo svg {
display: block;
height: 29px;
width: auto;
margin-right: 13px;
}
.nc-header__tool-version {
color: var(--nc-colour-text);
font-size: 12px;
text-align: right;
}
.nc-header__elapsed-time {
color: var(--nc-colour-text);
font-size: 12px;
margin-left: 12px;
padding: 12px;
border-left: 1px solid var(--nc-colour-tray);
}
.nc-header__sponsor {
padding-right: 13px;
position: relative;
top: 8px;
}
.nc-header__sponsor svg {
display: block;
height: 15px;
width: auto;
}
.nc-header__inner {
display: flex;
align-items: center;
}
/* Modifiers */
.nc-light-on-dark,
html.light-theme main .nc--dark-on-light {
/* Light text on a dark background may look blocky without this, esp. on MacOS
* Only for use on light text on a dark background, see:
* http://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
*/
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.nc--dark-on-light,
html.light-theme main .nc-light-on-dark {
-webkit-font-smoothing: auto;
-moz-osx-font-smoothing: auto;
}
@media(min-width: 640px) {
.nc-tray {
width: 640px;
}
.nc-tray__close {
padding: 0.5em;
}
.nc-header__logo-text {
font-size: 24px;
}
.nc-header__logo svg {
height: 42px;
margin-right: 16px;
}
.nc-header__sponsor {
padding-right: 16px;
position: relative;
top: 8px;
}
.nc-header__sponsor svg {
height: 21px;
}
}