itty-bitty/docs/edit.css

259 lines
4.9 KiB
CSS
Raw Normal View History

2022-05-17 15:37:07 +00:00
html {
--text-color:rgba(0, 0, 0, 0.87);
--text-placeholder-color:rgba(0,0,0,0.54);
--text-link-color:#0070e0;
--background-color:white;
--shadow-color:black;
color: var(--text-color);
background-color: var(--background-color);
}
@media (prefers-color-scheme: dark) {
html {
--text-color:white;
--text-placeholder-color:rgba(255,255,255,0.54);
--text-link-color:#40a0ff;
--background-color:#111;
--shadow-color:black;
}
}
2018-05-26 00:16:21 +00:00
body {
2018-07-08 16:18:51 +00:00
margin: 0 auto;
padding: 12vh 10vmin;
max-width: 35em;
2022-05-17 15:37:07 +00:00
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
2018-07-08 16:18:51 +00:00
line-height: 1.5em;
2018-05-26 00:16:21 +00:00
}
2018-07-08 16:18:51 +00:00
h1 {
font-weight: 400;
}
h2 {
font-weight: 500;
}
2018-05-26 00:16:21 +00:00
2018-05-30 05:10:16 +00:00
a {
2022-05-17 15:37:07 +00:00
color: var(--text-link-color);
2018-05-30 05:10:16 +00:00
}
2018-06-10 14:41:58 +00:00
2018-07-08 16:18:51 +00:00
*[contenteditable="true"] {
/* display: inline-block; */
2018-07-08 16:18:51 +00:00
}
2018-06-10 14:41:58 +00:00
body.loaded:not(.edited) #placeholder {
2018-07-08 16:18:51 +00:00
display: block;
2018-05-26 00:16:21 +00:00
}
#placeholder {
2018-07-08 16:18:51 +00:00
display: none;
font-style: italic;
2022-05-17 15:37:07 +00:00
color: var(--text-placeholder-color);
2018-05-26 00:16:21 +00:00
pointer-events: none;
2018-07-08 16:18:51 +00:00
position: absolute;
2018-05-26 00:16:21 +00:00
}
body.drag #content {
outline: 3px dashed #ccc;
2018-07-08 16:18:51 +00:00
background-color: #fafafa;
border-radius: 1em;
2018-05-26 00:16:21 +00:00
pointer-events: all;
}
2018-07-08 16:18:51 +00:00
#content,
#placeholder {
margin: -1em;
padding: 1em;
min-height: 7em;
2018-05-26 00:16:21 +00:00
}
#content {
2018-07-08 16:18:51 +00:00
width: 100%;
outline: none;
2018-05-26 00:16:21 +00:00
}
#content:focus {
outline-color: #ccc;
}
2018-06-10 14:41:58 +00:00
#doc-title {
2018-07-08 16:18:51 +00:00
outline: none;
min-width: 180px;
top: 0;
position: absolute;
padding: 0.5em 0;
font-weight: bold;
2022-05-17 15:37:07 +00:00
font-size:small;
2018-06-10 14:41:58 +00:00
}
2018-07-06 14:04:21 +00:00
body.edited #doc-title:empty:before,
2018-07-08 16:18:51 +00:00
#doc-title:focus:empty:before {
content: "untitled";
2022-05-17 15:37:07 +00:00
color: var(--text-placeholder-color);
2018-07-06 14:04:21 +00:00
}
2018-06-10 14:41:58 +00:00
#doc-title:focus {
2018-07-08 16:18:51 +00:00
border-bottom: 1px solid #ccc;
2018-06-10 14:41:58 +00:00
}
#doc-title:empty:before {
background: transparent;
}
2022-05-17 15:37:07 +00:00
2018-05-26 00:16:21 +00:00
#content:empty:before {
content: attr(placeholder);
color: rgba(0, 0, 0, 0.2);
background: transparent;
}
2022-05-17 15:37:07 +00:00
2018-07-04 19:22:21 +00:00
#doc-file {
2018-05-26 00:16:21 +00:00
border-radius: 1em;
2022-05-17 15:37:07 +00:00
background-color: #fafafa;
2018-05-26 00:16:21 +00:00
padding: 0.25em 1em;
2022-05-17 15:37:07 +00:00
/* font-size: smaller; */
2018-07-08 16:18:51 +00:00
margin-bottom: 2em;
2022-05-17 15:37:07 +00:00
background-position: top center;
background-repeat: no-repeat;
background-image: url("data:image/svg+xml,%0A%3Csvg width='128' height='128' viewBox='0 0 128 128' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-outside-1_116_2' maskUnits='userSpaceOnUse' x='27' y='15' width='74' height='98' fill='black'%3E%3Crect fill='white' x='27' y='15' width='74' height='98'/%3E%3Cpath d='M80 16H28V112H100V36L80 16Z'/%3E%3C/mask%3E%3Cpath d='M80 16H28V112H100V36L80 16Z' fill='white'/%3E%3Cpath d='M28 16V15H27V16H28ZM80 16L80.7071 15.2929L80.4142 15H80V16ZM28 112H27V113H28V112ZM100 112V113H101V112H100ZM100 36H101V35.5858L100.707 35.2929L100 36ZM28 17H80V15H28V17ZM29 112V16H27V112H29ZM100 111H28V113H100V111ZM99 36V112H101V36H99ZM100.707 35.2929L80.7071 15.2929L79.2929 16.7071L99.2929 36.7071L100.707 35.2929Z' fill='black' fill-opacity='0.15' mask='url(%23path-1-outside-1_116_2)'/%3E%3C/svg%3E%0A");
min-height: 160px;/* background-size: 128px; */text-align: center;padding-top: 128px;}
2018-07-04 19:22:21 +00:00
#doc-file:empty {
2018-07-08 16:18:51 +00:00
display: none;
2018-05-26 00:16:21 +00:00
}
#ib-info {
2018-06-10 14:41:58 +00:00
pointer-events: all;
2018-05-26 00:16:21 +00:00
}
2018-06-10 14:41:58 +00:00
#ib-info:hover {
pointer-events: all;
2018-07-08 16:18:51 +00:00
color: black;
2018-06-10 14:41:58 +00:00
}
2018-05-26 00:16:21 +00:00
/*#toolbar a#copy {
transition: transform 1s;
cursor: default;
}
#copy:active {
transform:translate(0, -0.5em);
transition: transform 100ms;
color:red;
}
*/
2018-06-10 14:41:58 +00:00
#sharehint {
2018-07-08 16:18:51 +00:00
display: none;
position: fixed;
bottom: 0;
left: 0;
right: 0;
font-weight: bold;
text-align: center;
2018-06-10 14:41:58 +00:00
}
@media only screen and (max-device-width: 480px) {
2018-07-08 16:18:51 +00:00
#twitter,
#copy {
display: none;
2018-06-10 14:41:58 +00:00
}
#sharehint {
2018-07-08 16:18:51 +00:00
display: block;
2018-06-10 14:41:58 +00:00
}
#menu-share-hint {
2018-07-08 16:18:51 +00:00
display: none;
2018-06-10 14:41:58 +00:00
}
2018-05-26 00:16:21 +00:00
}
#toolbar button {
vertical-align: baseline;
}
#toolbar a.invalid {
text-decoration: line-through;
}
2018-07-08 16:18:51 +00:00
#length {
opacity: 0.54;
}
2018-06-10 14:41:58 +00:00
/*body.edited #toolbar {
opacity:1.0;
transform: translateY(0);
}
*/
#toolbar {
2018-07-08 16:18:51 +00:00
position: fixed;
top: 0;
right: 0;
padding: 0.5em 1em;
text-align: right;
2022-05-17 15:37:07 +00:00
font-size:small;
2018-07-08 16:18:51 +00:00
font-weight: bold;
2018-06-10 14:41:58 +00:00
/*transform: translateY(-2em);*/
transition: transform 100ms ease-out;
border-bottom-left-radius: 1em;
2018-07-08 16:18:51 +00:00
cursor: pointer;
2018-06-10 14:41:58 +00:00
}
2018-05-26 00:16:21 +00:00
#copy-message {
2018-07-08 16:18:51 +00:00
background: #2d2d2d;
color: white;
top: 0.5em;
right: 0.5em;
position: absolute;
padding: 0.5em 1em;
z-index: 100;
font-weight: bold;
}
body:not(.copied) #copy-message {
2018-07-08 16:18:51 +00:00
display: none;
}
2018-06-10 14:41:58 +00:00
#menus-share-hint {
2018-07-08 16:18:51 +00:00
content: "hello";
2018-06-10 14:41:58 +00:00
}
#toolbar .disabled {
2018-07-08 16:18:51 +00:00
opacity: 0.333;
}
#toolbar a {
margin-left: 0.5em;
cursor: pointer;
text-decoration: none;
2022-05-17 15:37:07 +00:00
color: var(--text-color);
vertical-align: middle;
2018-07-08 16:18:51 +00:00
}
#toolbar a:hover {
text-decoration: underline;
2018-06-10 14:41:58 +00:00
}
2018-05-26 00:16:21 +00:00
2018-06-10 14:41:58 +00:00
.menu {
2018-07-08 16:18:51 +00:00
width: auto;
display: none;
2022-05-17 15:37:07 +00:00
color:var(--text-color);
border: 2px solid currentColor;
padding: 0.5em;
box-shadow: 2px 2px var(--shadow-color);
margin-right: -0.5em;border-radius: 2px;
margin-top: 0.7em;}
div#menu-contents {}
2018-06-10 14:41:58 +00:00
#toolbar.menu-visible .menu {
2018-07-08 16:18:51 +00:00
display: block;
2018-06-10 14:41:58 +00:00
}
2018-05-26 00:16:21 +00:00
2018-06-10 14:41:58 +00:00
#toolbar.menu-visible #menu {
2018-07-08 16:18:51 +00:00
opacity: 0.54;
2018-07-04 17:47:41 +00:00
}
2018-05-26 00:16:21 +00:00
2018-06-10 14:41:58 +00:00
.menu hr {
2018-07-08 16:18:51 +00:00
border: none;
2022-05-17 15:37:07 +00:00
background-color: currentColor;
height: 2px;
2018-07-08 16:18:51 +00:00
}