Files
onenote-tools/src/styles.css

810 lines
12 KiB
CSS

:root {
color: #241b2b;
background: #f6f3f8;
font-family:
Inter,
ui-sans-serif,
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
sans-serif;
font-synthesis: none;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
min-width: 320px;
min-height: 100vh;
}
button,
input {
font: inherit;
}
button {
border: 1px solid #704294;
border-radius: 0.55rem;
padding: 0.55rem 0.9rem;
color: #4c1f6b;
background: #fff;
cursor: pointer;
}
button:hover:not(:disabled) {
background: #f1e8f8;
}
button:focus-visible,
summary:focus-visible {
outline: 3px solid #b788d4;
outline-offset: 2px;
}
button:disabled {
cursor: not-allowed;
opacity: 0.55;
}
code {
border-radius: 0.25rem;
padding: 0.08rem 0.25rem;
overflow-wrap: anywhere;
background: #eee7f3;
}
h1,
h2,
p {
overflow-wrap: anywhere;
}
.application {
display: grid;
gap: 1.25rem;
width: min(76rem, calc(100% - 2rem));
margin: 2rem auto;
}
.drop-zone,
.status-card,
.source-toolbar,
.package-inspector,
.diagnostics {
border: 1px solid #c9b9d5;
border-radius: 1rem;
background: #fff;
box-shadow: 0 0.75rem 2.5rem rgb(62 31 85 / 8%);
}
.drop-zone,
.status-card {
padding: clamp(1.5rem, 4vw, 3rem);
}
.drop-zone {
border-style: dashed;
text-align: center;
}
.drop-zone--active {
border-color: #6b368f;
background: #f7effd;
}
.drop-zone h2,
.status-card h2 {
margin: 0.25rem 0 0.75rem;
}
.drop-zone__eyebrow,
.status-card__label,
.eyebrow {
margin: 0;
color: #6b368f;
font-size: 0.76rem;
font-weight: 750;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.primary-button {
margin-top: 0.75rem;
color: #fff;
background: #5b2c83;
}
.primary-button:hover:not(:disabled) {
background: #472164;
}
.drop-zone__hint {
display: block;
margin-top: 0.75rem;
color: #6f6476;
font-size: 0.9rem;
}
.status-card--error {
border-color: #b65252;
}
.status-card--error > div {
margin-top: 1rem;
}
.source-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 1.15rem 1.35rem;
}
.source-toolbar h2 {
margin: 0.15rem 0 0;
font-size: clamp(1.2rem, 3vw, 1.65rem);
}
.reader-workspace {
display: grid;
grid-template-columns: minmax(16rem, 0.78fr) minmax(0, 2fr);
min-height: 30rem;
overflow: hidden;
border: 1px solid #c9b9d5;
border-radius: 1rem;
background: #fff;
box-shadow: 0 0.75rem 2.5rem rgb(62 31 85 / 8%);
}
.source-navigation {
overflow: auto;
border-right: 1px solid #d9cedf;
background: #faf7fc;
}
.navigation-heading {
position: sticky;
z-index: 1;
top: 0;
padding: 1.2rem;
border-bottom: 1px solid #ded5e3;
background: #faf7fc;
}
.navigation-heading h2 {
margin: 0.15rem 0 0;
font-size: 1.05rem;
}
.navigation-heading > p:last-child {
margin: 0.35rem 0 0;
color: #716675;
font-size: 0.8rem;
}
.page-list,
.section-list,
.notebook-tree ul,
.diagnostic-list {
margin: 0;
padding: 0;
list-style: none;
}
.page-list {
padding: 0.55rem;
}
.page-list button,
.notebook-section > button {
display: grid;
gap: 0.25rem;
width: 100%;
border-color: transparent;
padding: 0.72rem;
text-align: left;
color: inherit;
background: transparent;
}
.page-list button span {
display: -webkit-box;
overflow: hidden;
color: #716675;
font-size: 0.78rem;
font-weight: 400;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.page-list button.is-selected,
.notebook-section > button.is-selected {
border-color: #af8bc6;
color: #3e145c;
background: #eee3f5;
}
.section-list {
padding: 0.55rem 0.55rem 0;
}
.notebook-section > button {
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
}
.notebook-tree ul {
margin-inline-start: 0.7rem;
border-inline-start: 1px solid #ded5e3;
padding-inline-start: 0.45rem;
}
.section-group summary {
cursor: pointer;
padding: 0.62rem 0.45rem;
color: #574b5b;
font-size: 0.86rem;
font-weight: 700;
}
.notebook-section > .page-list {
margin: 0 0 0.4rem 0.7rem;
border-inline-start: 1px solid #ded5e3;
padding: 0.25rem 0 0.2rem 0.45rem;
}
.page-list ul {
margin: 0;
border: 0;
padding-inline-start: 0.7rem;
}
.page-list--nested button {
padding-block: 0.55rem;
}
.navigation-empty,
.empty-message {
margin: 0;
padding: 1rem 1.2rem;
color: #716675;
}
.page-reader {
min-width: 0;
padding: clamp(1.4rem, 4vw, 3rem);
background: #fff;
}
.page-reader--empty {
display: grid;
place-items: center;
min-height: 20rem;
color: #716675;
text-align: center;
}
.page-reader--error {
border-left: 0.25rem solid #b65252;
}
.page-reader__header {
margin-bottom: 2rem;
padding-bottom: 1.25rem;
border-bottom: 1px solid #e1d9e5;
}
.page-reader__header h2 {
margin: 0.3rem 0 0;
font-size: clamp(1.55rem, 4vw, 2.4rem);
line-height: 1.12;
}
.page-metadata {
display: flex;
flex-wrap: wrap;
gap: 0.3rem 1rem;
margin: 1rem 0 0;
color: #716675;
font-size: 0.82rem;
}
.page-metadata dt {
font-weight: 700;
}
.page-metadata dd {
margin: 0 1rem 0 0;
}
.page-content {
position: relative;
width: 100%;
max-width: 64rem;
line-height: 1.65;
}
.extracted-text {
margin: 0 0 1em;
white-space: pre-wrap;
}
.onenote-outline {
min-width: 0;
margin-bottom: 1rem;
}
.onenote-outline-group,
.onenote-outline-element {
min-width: 0;
}
.onenote-text {
min-height: 1lh;
margin: 0 0 0.55rem;
white-space: pre-wrap;
}
.onenote-link {
color: #5b2c83;
text-decoration-thickness: 0.08em;
text-underline-offset: 0.12em;
}
.onenote-table-scroll {
max-width: 100%;
margin-block: 1rem;
overflow-x: auto;
}
.onenote-table {
width: max-content;
min-width: min(100%, 28rem);
border-spacing: 0;
border-collapse: collapse;
background: #fff;
}
.onenote-table td {
min-width: 5rem;
border: 1px solid #cfc5d4;
padding: 0.55rem 0.65rem;
vertical-align: top;
}
.onenote-table--borderless td {
border-color: transparent;
}
.onenote-table td > :last-child {
margin-bottom: 0;
}
.onenote-image {
display: grid;
justify-items: start;
gap: 0.45rem;
max-width: 100%;
margin-block: 1rem;
}
.onenote-image img {
display: block;
max-width: 100%;
height: auto;
border-radius: 0.3rem;
}
.onenote-image figcaption {
max-width: 40rem;
color: #716675;
font-size: 0.82rem;
}
.image-placeholder {
display: grid;
min-width: 12rem;
min-height: 7rem;
max-width: 32rem;
place-items: center;
border: 1px dashed #a58caf;
border-radius: 0.55rem;
padding: 1rem;
color: #716675;
background: #faf7fc;
text-align: center;
}
.attachment-card {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.75rem 1rem;
margin-block: 0.8rem;
border: 1px solid #d4c8db;
border-radius: 0.65rem;
padding: 0.8rem;
background: #faf7fc;
}
.attachment-card > div {
display: grid;
flex: 1 1 12rem;
gap: 0.15rem;
}
.attachment-card span,
.attachment-card small {
color: #716675;
font-size: 0.8rem;
}
.attachment-card small {
flex-basis: 100%;
}
.onenote-ink {
position: relative;
max-width: 100%;
margin-block: 0.75rem;
overflow: visible;
color: #241b2b;
}
.onenote-ink svg {
display: block;
max-width: 100%;
overflow: visible;
pointer-events: none;
}
.unsupported-block {
display: grid;
gap: 0.2rem;
margin: 0.8rem 0;
border-left: 0.2rem solid #9872ae;
padding: 0.65rem 0.85rem;
color: #5e5362;
background: #f5eff8;
}
.package-inspector,
.diagnostics {
padding: 1.25rem;
}
.panel-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.panel-heading h2 {
margin: 0.15rem 0 0;
font-size: 1.2rem;
}
.count-badge {
display: inline-grid;
min-width: 2rem;
min-height: 2rem;
place-items: center;
border-radius: 999px;
color: #552477;
background: #eee3f5;
font-weight: 700;
}
.package-summary {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 0.7rem;
margin: 1rem 0;
}
.package-summary > div {
border-radius: 0.65rem;
padding: 0.75rem;
background: #f6f1f8;
}
.package-summary dt {
color: #716675;
font-size: 0.75rem;
}
.package-summary dd {
margin: 0.2rem 0 0;
font-size: 1.1rem;
font-weight: 700;
}
.entry-inspector {
border-top: 1px solid #ded5e3;
padding-top: 0.9rem;
}
.entry-inspector summary {
width: fit-content;
color: #5b2c83;
cursor: pointer;
font-weight: 700;
}
.entry-table-wrap {
max-height: 28rem;
margin-top: 0.85rem;
overflow: auto;
}
.entry-table {
width: 100%;
border-collapse: collapse;
font-size: 0.82rem;
text-align: left;
}
.entry-table th,
.entry-table td {
padding: 0.62rem;
border-bottom: 1px solid #e5dee9;
vertical-align: top;
}
.entry-table th {
position: sticky;
top: 0;
background: #fff;
}
.entry-table small {
display: block;
margin-top: 0.3rem;
color: #716675;
}
.status {
width: fit-content;
border-radius: 999px;
padding: 0.18rem 0.46rem;
color: #655769;
background: #ebe7ed;
font-size: 0.68rem;
font-weight: 750;
text-transform: uppercase;
}
.status--parsed {
color: #1c6645;
background: #daf0e4;
}
.status--failed {
color: #872d2d;
background: #f6dddd;
}
.status--unsupported {
color: #77510d;
background: #f6e9c8;
}
.diagnostic-list {
display: grid;
gap: 0.65rem;
margin-top: 1rem;
}
.diagnostic {
border-left: 0.22rem solid #b18124;
padding: 0.7rem 0.85rem;
background: #fbf4e6;
}
.diagnostic--error {
border-left-color: #b65252;
background: #faeaea;
}
.diagnostic__summary {
display: flex;
justify-content: space-between;
gap: 1rem;
}
.diagnostic__summary span {
font-size: 0.72rem;
text-transform: uppercase;
}
.diagnostic p {
margin: 0.35rem 0 0;
}
.diagnostic__context {
display: grid;
grid-template-columns: max-content 1fr;
gap: 0.15rem 0.65rem;
margin: 0.65rem 0 0;
font-size: 0.76rem;
}
.diagnostic__context dt {
font-weight: 700;
}
.diagnostic__context dd {
margin: 0;
}
.privacy-note {
border-left: 0.25rem solid #7d4aa0;
padding: 0.85rem 1rem;
color: #4c4054;
background: #eee7f3;
}
.dialog-backdrop {
position: fixed;
z-index: 10;
inset: 0;
display: grid;
place-items: center;
padding: 1rem;
background: rgb(25 14 31 / 58%);
}
.help-dialog {
width: min(32rem, 100%);
border-radius: 0.8rem;
padding: 1.5rem;
color: #241b2b;
background: #fff;
box-shadow: 0 1rem 3rem rgb(0 0 0 / 25%);
}
.help-dialog h2 {
margin-top: 0;
}
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
border: 0;
padding: 0;
}
@media (max-width: 760px) {
.application {
width: min(100% - 1rem, 76rem);
margin: 0.75rem auto;
}
.reader-workspace {
grid-template-columns: 1fr;
}
.source-navigation {
max-height: 20rem;
border-right: 0;
border-bottom: 1px solid #d9cedf;
}
.package-summary {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.entry-table {
min-width: 42rem;
}
}
@media (prefers-color-scheme: dark) {
:root {
color: #f6effa;
background: #1f1923;
}
.drop-zone,
.status-card,
.source-toolbar,
.package-inspector,
.diagnostics,
.reader-workspace,
.page-reader,
.help-dialog,
.entry-table th {
color: #f6effa;
background: #2b2231;
}
.source-navigation,
.navigation-heading {
background: #251d2a;
}
.drop-zone--active,
button:hover:not(:disabled),
.page-list button.is-selected,
.notebook-section > button.is-selected {
color: #f6effa;
background: #3c2b48;
}
button {
color: #f4e7fc;
background: #35283d;
}
code,
.privacy-note,
.package-summary > div {
color: #eadff0;
background: #3a3040;
}
.drop-zone__hint,
.navigation-heading > p:last-child,
.navigation-empty,
.empty-message,
.page-metadata,
.page-list button span,
.package-summary dt,
.entry-table small {
color: #cfc2d6;
}
.unsupported-block {
color: #e4dbe9;
background: #3a3040;
}
.onenote-link {
color: #d7acef;
}
.onenote-table,
.attachment-card,
.image-placeholder {
color: #f6effa;
background: #302638;
}
.onenote-table td {
border-color: #62536b;
}
.onenote-image figcaption,
.attachment-card span,
.attachment-card small,
.image-placeholder {
color: #cfc2d6;
}
.onenote-ink {
color: #f6effa;
}
.diagnostic {
color: #f5e8cd;
background: #493b23;
}
.diagnostic--error {
color: #f8dfdf;
background: #4d2929;
}
}