mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-07 05:59:02 +00:00
514 lines
12 KiB
CSS
514 lines
12 KiB
CSS
/*
|
|
* notion-enhancer core: menu
|
|
* (c) 2021 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
|
* (https://notion-enhancer.github.io/) under the MIT license
|
|
*/
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
word-break: break-word;
|
|
text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
font-size: inherit;
|
|
font-family: inherit;
|
|
fill: currentColor;
|
|
}
|
|
|
|
html {
|
|
transition: opacity 50ms ease-out;
|
|
font-size: var(--theme--font_body-size);
|
|
}
|
|
html[class] {
|
|
opacity: 1 !important;
|
|
}
|
|
|
|
body {
|
|
padding: 2rem 2.5rem;
|
|
position: relative;
|
|
margin: 0;
|
|
background: var(--theme--sidebar);
|
|
color: var(--theme--text);
|
|
font-family: var(--theme--font_sans);
|
|
min-height: 100vh;
|
|
}
|
|
body a {
|
|
color: inherit;
|
|
}
|
|
|
|
header {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 1.25rem;
|
|
}
|
|
header > * {
|
|
margin: 0 1.25rem 0.1em 0;
|
|
font-size: var(--theme--font_heading1-size);
|
|
}
|
|
header h1 a {
|
|
text-decoration: none;
|
|
}
|
|
header h1 img {
|
|
width: 0.95em;
|
|
height: 0.95em;
|
|
margin-right: 0.5em;
|
|
margin-bottom: -0.1em;
|
|
}
|
|
header h1 svg {
|
|
width: 1em;
|
|
height: 1em;
|
|
padding-top: 0.3em;
|
|
margin-right: 0.2em;
|
|
}
|
|
header h1 svg[data-icon='info'] {
|
|
margin-right: 0em;
|
|
}
|
|
header h1 svg[data-icon='code'] {
|
|
margin-right: 0.3em;
|
|
}
|
|
|
|
img[data-view-target='notion'] {
|
|
cursor: pointer;
|
|
}
|
|
|
|
main {
|
|
display: grid;
|
|
grid-gap: 1.25em;
|
|
grid-template-columns: 1fr;
|
|
opacity: 1;
|
|
transition: opacity 200ms ease-out;
|
|
}
|
|
@media (min-width: 550px) {
|
|
main {
|
|
grid-template-columns: 1fr 1fr;
|
|
}
|
|
main > .action--buttons {
|
|
grid-column: span 2;
|
|
}
|
|
[data-view='mod'] main .library--card,
|
|
.documentation--body {
|
|
max-height: calc(100vh - 10rem);
|
|
overflow-y: auto;
|
|
}
|
|
[data-view='mod'] {
|
|
overflow: hidden;
|
|
height: 100vh;
|
|
}
|
|
}
|
|
@media (min-width: 850px) {
|
|
main {
|
|
grid-template-columns: 1fr 1fr 1fr;
|
|
}
|
|
main > .action--buttons {
|
|
grid-column: span 3;
|
|
}
|
|
[data-view='mod'] main > .documentation--body {
|
|
grid-column: span 2;
|
|
}
|
|
}
|
|
@media (min-width: 1350px) {
|
|
main {
|
|
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
}
|
|
main > .action--buttons {
|
|
grid-column: span 4;
|
|
}
|
|
[data-view='mod'] main > .documentation--body {
|
|
grid-column: span 3;
|
|
}
|
|
}
|
|
@media (min-width: 2050px) {
|
|
main {
|
|
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
}
|
|
main > .action--buttons {
|
|
grid-column: span 5;
|
|
}
|
|
[data-view='mod'] main > .documentation--body {
|
|
grid-column: span 4;
|
|
}
|
|
}
|
|
main article {
|
|
border-radius: 5px;
|
|
box-shadow: rgb(0 0 0 / 10%) 0px 20px 25px -5px, rgb(0 0 0 / 4%) 0px 10px 10px -5px;
|
|
border: 1px solid var(--theme--divider);
|
|
background: var(--theme--page);
|
|
}
|
|
main article img {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.action--buttons,
|
|
.library--expand {
|
|
margin: 0;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.53em;
|
|
}
|
|
.library--expand a {
|
|
margin-left: auto;
|
|
}
|
|
.action--buttons a,
|
|
.library--expand a {
|
|
border-radius: 3px;
|
|
padding: 0.35rem 0.45rem;
|
|
text-decoration: none;
|
|
display: flex;
|
|
}
|
|
.action--buttons .action--alert {
|
|
cursor: pointer;
|
|
border-radius: 3px;
|
|
padding: 0.35rem 0.45rem;
|
|
background: var(--theme--block_grey);
|
|
color: var(--theme--block_grey-text);
|
|
border: none;
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
transition: opacity 200ms ease-in-out;
|
|
}
|
|
.action--buttons .action--alert[data-triggered] {
|
|
pointer-events: all;
|
|
opacity: 1;
|
|
}
|
|
.action--buttons .action--alert[data-triggered]:hover {
|
|
background: none;
|
|
color: var(--theme--block_grey-text);
|
|
box-shadow: var(--theme--block_grey) 0px 0px 0px 1px inset;
|
|
}
|
|
.action--buttons span,
|
|
.library--expand span {
|
|
color: var(--theme--text_property);
|
|
}
|
|
.action--buttons a:hover,
|
|
.action--buttons a.action--active,
|
|
.library--expand a:hover {
|
|
background: var(--theme--button-hover);
|
|
}
|
|
.action--buttons svg,
|
|
.library--expand svg {
|
|
width: 1em;
|
|
height: 1em;
|
|
padding-top: 2px;
|
|
margin-right: 0.3rem;
|
|
}
|
|
.action--buttons svg *,
|
|
.library--expand svg * {
|
|
fill: var(--theme--text_property);
|
|
}
|
|
|
|
.library--preview {
|
|
border-bottom: 1px solid var(--theme--divider);
|
|
}
|
|
.library--version {
|
|
font-weight: normal;
|
|
font-size: var(--theme--font_ui-size);
|
|
border-radius: 5px;
|
|
padding: 0.125rem 0.25rem;
|
|
background: var(--theme--tag_default);
|
|
color: var(--theme--tag_default-text);
|
|
}
|
|
.library--description {
|
|
font-size: 1rem;
|
|
margin: 0.25rem 0;
|
|
}
|
|
.library--tags,
|
|
.library--authors {
|
|
padding: 0;
|
|
list-style-type: none;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
margin: 0.5em 0;
|
|
}
|
|
.library--tags li {
|
|
font-size: var(--theme--font_ui-size);
|
|
margin: 0 0.5rem 0 0;
|
|
opacity: 0.7;
|
|
}
|
|
.library--authors li {
|
|
font-size: var(--theme--font_ui-size);
|
|
margin: 0 0.5rem 0 0;
|
|
}
|
|
.library--authors a {
|
|
font-size: var(--theme--font_ui-size);
|
|
text-decoration: none;
|
|
border-radius: 5px;
|
|
padding: 0.125rem 0.25rem 0.25rem 0;
|
|
}
|
|
.library--authors img {
|
|
height: 1em;
|
|
width: 1em;
|
|
margin-bottom: 0.15625em;
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
border-radius: 50%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.library--options {
|
|
border-top: 1px solid var(--theme--divider);
|
|
}
|
|
.library--toggle_label,
|
|
.library--select_label,
|
|
.library--text_label,
|
|
.library--number_label,
|
|
.library--color_label,
|
|
.library--file_label {
|
|
margin: 0.6rem 0;
|
|
display: block;
|
|
appearance: none;
|
|
font-size: var(--theme--font_ui-size);
|
|
}
|
|
.library--toggle_label *,
|
|
.library--select_label *,
|
|
.library--text_label *,
|
|
.library--number_label *,
|
|
.library--color_label *,
|
|
.library--file_label * {
|
|
appearance: none;
|
|
font-family: var(--theme--font_sans);
|
|
font-size: var(--theme--font_ui-size);
|
|
color: var(--theme--text);
|
|
}
|
|
label p:not([class]),
|
|
label p > span:not([class]),
|
|
label > span:not([class]) {
|
|
font-size: 1rem;
|
|
}
|
|
label [data-icon='fa/solid/question-circle'] {
|
|
height: var(--theme--font_ui_small-size);
|
|
width: var(--theme--font_ui_small-size);
|
|
margin-left: 0.25em;
|
|
margin-bottom: -1px;
|
|
}
|
|
.library--toggle_label > p,
|
|
.library--toggle_label > p,
|
|
.library--select_label > p,
|
|
.library--text_label > p,
|
|
.library--number_label > p,
|
|
.library--color_label > p,
|
|
.library--file_label > p {
|
|
margin: 0.6rem 0;
|
|
}
|
|
.library--toggle_label > :not(input) {
|
|
align-items: center;
|
|
display: flex;
|
|
--toggle--bg: var(--theme--toggle_off);
|
|
--toggle--translation: 0%;
|
|
}
|
|
.library--toggle_label > :not(input) .library--toggle {
|
|
position: relative;
|
|
margin: auto 0 auto auto;
|
|
min-width: 2.25rem;
|
|
width: 2.25rem;
|
|
height: 1.25rem;
|
|
display: block;
|
|
border-radius: 40px;
|
|
background: var(--toggle--bg);
|
|
cursor: pointer;
|
|
}
|
|
.library--toggle_label > :not(input) .library--toggle::after {
|
|
content: '';
|
|
transition: transform 200ms ease-out, background 200ms ease-out;
|
|
height: 0.8rem;
|
|
width: 0.8rem;
|
|
left: 0.325rem;
|
|
top: 0.2rem;
|
|
position: absolute;
|
|
border-radius: 100%;
|
|
background: var(--theme--toggle_dot);
|
|
transform: translateX(var(--toggle--translation));
|
|
}
|
|
.library--toggle_label input[type='checkbox']:checked + :not(input) {
|
|
--toggle--bg: var(--theme--toggle_on);
|
|
--toggle--translation: 100%;
|
|
}
|
|
.library--toggle_label:focus-within .library--toggle,
|
|
.library--file_label:focus-within .library--file,
|
|
.library--color_label:focus-within .library--color,
|
|
.library--select_label .library--select:focus-within {
|
|
outline: -webkit-focus-ring-color auto 1px;
|
|
}
|
|
.library--toggle_label input,
|
|
.library--file_label input {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
clip: rect(0, 0, 0, 0);
|
|
white-space: nowrap;
|
|
border-width: 0;
|
|
}
|
|
.library--text_label textarea {
|
|
resize: none;
|
|
min-height: calc(1em + 16px);
|
|
height: var(--txt--scroll-height);
|
|
}
|
|
.library--text_label textarea,
|
|
.library--number_label input,
|
|
.library--select_label .library--select,
|
|
.library--color_label .library--color,
|
|
.library--file_label .library--file {
|
|
width: 100%;
|
|
padding: 6px 8px;
|
|
background: var(--theme--input);
|
|
border-radius: 3px;
|
|
border: none;
|
|
box-shadow: var(--theme--input-border) 0px 0px 0px 1px inset;
|
|
}
|
|
.library--select_label .library--select select,
|
|
.library--color_label .library--color input {
|
|
outline: none;
|
|
cursor: pointer;
|
|
}
|
|
.library--color_label .library--color input {
|
|
border-radius: 0;
|
|
}
|
|
.library--select_label .library--select select option {
|
|
background: var(--theme--tag_select);
|
|
}
|
|
.library--select_label .library--select,
|
|
.library--color_label .library--color,
|
|
.library--file_label .library--file {
|
|
padding: 0;
|
|
display: flex;
|
|
cursor: pointer;
|
|
}
|
|
.library--select_label .library--select > :first-child,
|
|
.library--color_label .library--color > :first-child,
|
|
.library--file_label .library--file > :first-child {
|
|
display: flex;
|
|
padding: 6px 8px;
|
|
background: var(--theme--input-border);
|
|
}
|
|
.library--select_label .library--select > :first-child svg,
|
|
.library--color_label .library--color > :first-child svg,
|
|
.library--file_label .library--file > :first-child svg {
|
|
width: 0.9em;
|
|
margin: auto 0;
|
|
}
|
|
.library--select_label .library--select > :first-child svg *,
|
|
.library--color_label .library--color > :first-child svg *,
|
|
.library--file_label .library--file > :first-child svg * {
|
|
color: var(--theme--input_icon);
|
|
}
|
|
.library--select_label .library--select > :last-child,
|
|
.library--color_label .library--color > :last-child,
|
|
.library--file_label .library--file > :last-child {
|
|
margin: auto 0;
|
|
padding: 6px 8px;
|
|
width: 100%;
|
|
height: 100%;
|
|
border: none;
|
|
background: none;
|
|
}
|
|
.library--file_label .library--file_title {
|
|
display: flex;
|
|
}
|
|
.library--file_title .library--file_remove {
|
|
margin-top: auto;
|
|
padding-top: 0.2em;
|
|
margin-left: auto;
|
|
}
|
|
.library--file_title .library--file_remove svg {
|
|
cursor: pointer;
|
|
width: 0.8em;
|
|
}
|
|
.library--title,
|
|
.library--title h2 {
|
|
margin: 0;
|
|
font-size: var(--theme--font_ui-size);
|
|
}
|
|
.library--title h2 > span {
|
|
font-size: var(--theme--font_heading2-size);
|
|
}
|
|
|
|
.library--card > div {
|
|
padding: 1rem;
|
|
}
|
|
[data-view='mod'] main .library--card {
|
|
overflow-x: auto;
|
|
}
|
|
.documentation--body {
|
|
padding: 1rem 2rem;
|
|
font-size: 1rem;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.notifications {
|
|
position: absolute;
|
|
bottom: 1.5rem;
|
|
right: 1.5rem;
|
|
}
|
|
.notification {
|
|
background: var(--theme--block_grey);
|
|
color: var(--theme--block_grey-text);
|
|
max-width: calc(100vw - 3rem);
|
|
width: 25rem;
|
|
font-size: var(--theme--font_ui-size);
|
|
border-top: 4px currentColor solid;
|
|
border-bottom-left-radius: 3px;
|
|
border-bottom-right-radius: 3px;
|
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
|
|
padding: 1.25em 1.5em;
|
|
display: flex;
|
|
margin-top: 1rem;
|
|
position: relative;
|
|
transition: opacity 200ms ease-in-out, transform 115ms ease-out 200ms,
|
|
margin-top 115ms ease-out 200ms;
|
|
transform: scaleY(1);
|
|
transform-origin: 100% 100%;
|
|
opacity: 0;
|
|
}
|
|
.notification :not(.notification--dismiss) > svg {
|
|
height: 1.5rem;
|
|
width: 1.5rem;
|
|
margin-top: 0.25rem;
|
|
margin-right: 1rem;
|
|
}
|
|
.notification h3 {
|
|
margin: 0 0 0.25rem 0;
|
|
font-weight: bold;
|
|
}
|
|
.notification p {
|
|
margin: 0.25rem 0 0.5rem 0;
|
|
}
|
|
.notification .notification--dismiss {
|
|
position: absolute;
|
|
top: 0.5rem;
|
|
right: 0.75rem;
|
|
background: none;
|
|
border: none;
|
|
padding: 0.15rem 0 0.15rem 0.5rem;
|
|
width: var(--theme--font_body-size);
|
|
color: currentColor;
|
|
cursor: pointer;
|
|
transition: opacity 200ms ease-in-out;
|
|
opacity: 0;
|
|
}
|
|
.notification .notification--dismiss svg {
|
|
width: 100%;
|
|
}
|
|
.notification:hover .notification--dismiss,
|
|
.notification:focus-within .notification--dismiss {
|
|
opacity: 1;
|
|
}
|
|
|
|
::-webkit-scrollbar {
|
|
background: transparent;
|
|
width: 10px;
|
|
height: 10px;
|
|
}
|
|
::-webkit-scrollbar-track {
|
|
background: var(--theme--scrollbar_track);
|
|
}
|
|
::-webkit-scrollbar-corner {
|
|
background: var(--theme--scrollbar_track);
|
|
}
|
|
::-webkit-scrollbar-thumb {
|
|
background: var(--theme--scrollbar_thumb);
|
|
}
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: var(--theme--scrollbar_thumb-hover);
|
|
}
|