penpot-docs/css/index.css
2022-02-03 16:05:02 +01:00

979 lines
18 KiB
CSS

:root {
--darkest: #000000;
--graydark: #1F1F1F;
--graymedium: #7B7D85;
--graylight: #E3E3E3;
--primary: #31EFB8;
--primarydark: #00af7d;
--white: #fff;
--advice: #dafffb;
}
* {
box-sizing: border-box;
}
html,
body {
padding: 0;
margin: 0;
font-family: 'Source Sans Pro',system-ui, sans-serif;
color: var(--graydark);
}
body {
background-color: var(--white);
/* background-image: linear-gradient(rgba(68, 68, 68, 0.05), white);
background-size: 100% 300px;
background-repeat: no-repeat; */
}
p:last-child {
margin-bottom: 0;
}
p,
.tmpl-post li,
img,
h1, h2, h3,
.main-content {
max-width: 42rem;
position: relative;
}
img {
max-width: 100%;
}
p,
li {
line-height: 1.6;
}
ul, ol {
margin-bottom: 2rem;
padding-left: 1rem;
}
li {
margin-bottom: 1rem;
}
a[href] {
color: var(--primarydark);
}
a[href]:hover {
color: var(--darkest);
}
a[href]:visited {
/* color: var(--primarydark); */
}
main {
padding: 1rem;
background-image: url(/img/bg.png);
background-repeat: no-repeat;
background-position: center 120px;
}
header {
display: flex;
border-bottom: 1px solid var(--graylight);
padding: 1.6rem;
position: sticky;
top: 0;
width: 100%;
background-color: white;
z-index: 10;
}
header:after {
content: "";
display: table;
clear: both;
}
header a[href] {
color: var(--graydark);
}
table {
margin: 1em 0;
}
table td,
table th {
padding-right: 1em;
}
kbd {
border: 1px solid var(--graylight);
border-radius: 4px;
padding: 0.4rem 0.6rem;
box-shadow: 0 1px 0px 1px rgb(0 0 0 / 10%);
background-color: #fff;
margin-left: 0.16rem;
margin-right: 0.16rem;
white-space: nowrap;
}
h1 {
font-size: 5rem;
}
h2 {
font-size: 3rem;
margin-top: 6rem;
}
h3 {
font-size: 2rem;
margin-top: 4rem;
margin-bottom: 1rem;
}
h4 {
font-size: 1.2rem;
margin-top: 2rem;
margin-bottom: 1rem;
}
p, li {
font-size: 1.1rem;
word-wrap: break-word;
}
.main-paragraph {
font-size: 1.5rem;
}
hr {
background-color: var(--graylight);
margin-top: 6rem;
height: 1px;
border: none;
}
blockquote {
border-left: 4px solid var(--graylight);
margin-top: 2rem;
margin-left: 2rem;
padding-left: 2rem;
}
pre,
code {
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
line-height: 1.5;
}
pre {
font-size: 14px;
line-height: 1.375;
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
padding: 1em;
margin: .5em 0;
background-color: #f6f6f6;
overflow: auto;
}
.highlight-line {
display: block;
padding: 0.125em 1em;
text-decoration: none; /* override del, ins, mark defaults */
color: inherit; /* override del, ins, mark defaults */
}
/* allow highlighting empty lines */
.highlight-line:empty:before {
content: " ";
}
/* avoid double line breaks when using display: block; */
.highlight-line + br {
display: none;
}
.highlight-line-isdir {
color: #b0b0b0;
background-color: #222;
}
.highlight-line-active {
background-color: #444;
background-color: hsla(0, 0%, 27%, .8);
}
.highlight-line-add {
background-color: #45844b;
}
.highlight-line-remove {
background-color: #902f2f;
}
/* Header */
.preheader {
background: var(--graydark);
padding: 1rem 1.6rem;
display: flex;
align-items: center;
}
.preheader .home {
font-size: 1em; /* 16px /16 */
text-decoration: none;
flex: 1;
}
.preheader .home svg {
height: 36px;
width: 116px;
fill: white;
}
.preheader .home :link:not(:hover) {
text-decoration: none;
}
.header-inner {
display: flex;
max-width: 1400px;
width: 100%;
margin: auto;
position: relative;
}
.header-title {
font-size: 1.4rem;
display: inline;
font-weight: normal;
color: var(--graymedium);
text-decoration: none;
font-weight: 300;
}
.button {
align-items: center;
background: var(--primary);
color: var(--graydark) !important;
border-radius: 4px;
cursor: pointer;
display: flex;
font-size: 1rem;
justify-content: center;
padding: 0 1rem;
text-align: center;
text-decoration: none;
transition: all .4s;
min-height: 2rem;
}
.button:hover {
background: white;
}
/* Nav */
.nav {
display: flex;
list-style: none;
margin: 0 auto;
padding: 0;
align-items: center;
}
.nav-item {
display: inline-block;
margin-left: 1.4rem;
margin-right: 1.4rem;
margin-bottom: 0;
font-size: 1.1rem;
}
.nav-item a[href]:not(:hover) {
text-decoration: none;
}
.nav-item-active {
font-weight: 700;
text-decoration: underline;
}
/* Posts list */
.postlist {
list-style: none;
padding: 0;
}
.postlist-item {
counter-increment: start-from -1;
}
.postlist-item:before {
display: inline-block;
pointer-events: none;
content: "" counter(start-from, decimal-leading-zero) ". ";
line-height: 100%;
text-align: right;
}
.postlist-date,
.postlist-item:before {
font-size: 0.8125em; /* 13px /16 */
color: var(--graydark);
}
.postlist-date {
word-spacing: -0.5px;
}
.postlist-link {
display: inline-block;
padding: 0.25em 0.1875em; /* 4px 3px /16 */
}
.postlist-item-active .postlist-link {
font-weight: bold;
}
.tmpl-home .postlist-link {
font-size: 1.1875em; /* 19px /16 */
font-weight: 700;
}
.pre-footer {
padding: 2rem;
margin-top: 2rem;
display: flex;
justify-content: center;
border-top: 1px dashed var(--graylight);
}
footer {
align-items: center;
background-color: var(--graydark);
display: flex;
flex-direction: column;
padding: 4rem 2rem;
width: 100%;
}
.footer-inside {
display: flex;
flex-direction: row;
max-width: 1400px;
width: 100%;
}
.footer-inside .main-logo {
margin-right: auto;
}
.footer-inside .main-logo svg {
fill: #fff;
height: 50px;
width: 140px;
}
.footer-block {
display: flex;
flex-direction: column;
min-width: 20%;
margin: 1rem 0;
}
.footer-block li {
padding: .2rem 0;
}
.footer-block li a {
color: #fff;
font-size: 1.125rem;
text-decoration: none;
transition: color 200ms;
}
.footer-block li a:hover {
color: var(--primary);
}
.footer-text {
align-items: center;
display: flex;
margin-top: 2rem;
}
.footer-text span {
font-size: 1.125rem;
color: var(--graymedium);
}
/* Tags */
.post-tag {
display: inline-block;
vertical-align: text-top;
text-transform: uppercase;
font-size: 0.625em; /* 10px /16 */
padding: 2px 4px;
margin-left: 0.8em; /* 8px /10 */
background-color: red;
color: var(--white);
border-radius: 0.25em; /* 3px /12 */
text-decoration: none;
}
a[href].post-tag,
a[href].post-tag:visited {
color: #fff;
}
/* Warning */
.warning {
background-color: #ffc;
padding: 1em 0.625em; /* 16px 10px /16 */
}
.warning ol:only-child {
margin: 0;
}
/* Direct Links / Markdown Headers */
.direct-link {
font-family: sans-serif;
text-decoration: none;
font-style: normal;
margin-left: 1rem;
position: absolute;
/* top: 0.4rem; */
}
a[href].direct-link,
a[href].direct-link:visited {
color: transparent;
}
a[href].direct-link:focus,
a[href].direct-link:focus:visited,
:hover > a[href].direct-link,
:hover > a[href].direct-link:visited {
color: var(--primarydark);
}
:hover > a[href].direct-link:hover {
color: var(--primary);
}
[id]::before {
visibility: hidden;
content: '';
}
:target[id]::before {
content: '';
display: block;
visibility: hidden;
height: 94px;
}
/* Particular classes */
.media-container {
width: 100%;
display: flex;
justify-content: center;
}
.main-container {
margin: auto;
max-width: 80rem;
min-height: 60vh;
}
.main-container.with-sidebar {
/* display: grid;
grid-template-columns: minmax(100px, 25%) 1fr; */
display: flex;
flex-wrap: wrap;
}
.main-content {
margin: 0 auto;
}
.main-illus {
text-align: center;
}
.main-illus img {
margin-top: 2rem;
width: 60%;
max-width: 22rem;
}
/* .main-container.with-sidebar .main-content {
margin-left: 4rem;
} */
.main-container .sidebar {
padding-top: 0;
padding-right: 2rem;
position: sticky;
top: 8rem;
align-self: start;
}
.main-container .sidebar a[href] {
color: var(--darkest);
text-decoration: none;
}
.main-container .sidebar .header {
font-size: 1.6rem;
font-weight: bold;
display: block;
margin-bottom: 2rem;
}
.main-container.with-sidebar .sidebar .header.mobile {
display: none;
}
.main-container .sidebar ul,
.main-container .sidebar ol {
list-style: none;
padding-left: 0;
margin: 0;
padding-top: 0.2rem;
}
.main-container .sidebar #toc > ul ul,
.main-container .sidebar #toc > ul ol {
padding-left: 1rem;
}
/* first level */
.main-container .sidebar ul li,
.main-container .sidebar ul li a {
font-weight: 600;
padding-top: 1.2rem;
line-height: 1.2;
margin: 0;
}
.main-container .sidebar #toc > ul > li,
.main-container .sidebar #toc > ol > li {
padding-bottom: 1rem;
padding-top: 1rem;
}
/* second level */
.main-container .sidebar ul li li,
.main-container .sidebar ul li li a {
font-weight: normal;
font-size: 1rem;
}
/* third level */
.main-container .sidebar .toc li {
}
.main-container .sidebar #toc {
/* position: fixed; */
max-width: 300px;
max-height: calc(100vh - 8rem);
overflow: auto;
padding-right: 1rem;
}
.advice {
background-color: var(--advice);
padding: 2rem;
border-radius: 4px;
}
.hint {
font-size: 0.9rem;
margin-bottom: 2rem;
}
.search {
position: absolute;
right: 0;
top: -0.2rem;
z-index: 1;
}
.search input {
border: 2px solid var(--graylight);
padding: 0.5rem 2rem 0.5rem 0.5rem;
width: 8rem;
transition: width 200ms 200ms;
}
.search label {
position: absolute;
color: var(--graymedium);
left: 10px;
top: 7px;
display: none;
}
.search input:focus {
width: 18rem;
}
.search-icon {
position: absolute;
right: 8px;
top: 9px;
fill: var(--graymedium);
pointer-events: none;
}
.search input:focus + .search-icon {
fill: var(--darkest);
}
#search-results {
background: white;
border: 1px solid var(--graylight);
list-style: none;
margin: 0;
padding: 0;
box-shadow: 0 0 10px rgba(68, 68, 68, 0.1);
height: 85vh;
overflow: auto;
}
#search-results li {
padding: 0;
margin: 0;
}
#search-results a {
display: block;
padding: 1rem;
font-weight: 600;
}
#search-results li:hover {
background-color: var(--advice);
}
#search-results h3 {
font-size: 1rem;
font-weight: normal;
padding: 0;
margin: 0;
}
#search-results a {
text-decoration: none;
}
#no-results-found {
background: white;
border: 1px solid var(--graylight);
color: var(--graymedium);
list-style: none;
margin: 0;
padding: 2rem;
box-shadow: 0 0 10px rgba(68, 68, 68, 0.1);
}
#no-results-found p {
margin: 0;
}
.help-sections {
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 100%;
padding: 0 0 4rem 0;
list-style: none;
}
.help-sections > li {
position: relative;
margin: 1rem;
background-color: #eee;
flex: 47%;
box-shadow: 0px 8px 20px rgb(28 56 71 / 5%);
border: 1px solid var(--graylight);
border-radius: 8px;
min-height: 12rem;
background-color: white;
}
.illus {
background-size: auto 75%;
background-position: 0.6rem center;
padding-left: 12rem;
background-repeat: no-repeat;
}
.help-sections > li.no-link.illus-contact {
padding-left: 14.6rem;
}
.illus-userguide {
background-image: url(/img/home-userguide.png);
}
.illus-faq {
background-image: url(/img/home-faq.png);
}
.illus-techguide {
background-image: url(/img/home-techguide.png);
}
.illus-contributing {
background-image: url(/img/home-contributing.png);
}
.illus-contact {
background-image: url(/img/home-contact.png);
}
.illus-libraries {
padding-left: 13rem;
background-size: auto 90%;
background-position: 0.6rem center;
background-image: url(/img/contributing-libraries.png);
}
.help-sections > li:hover {
border-color: var(--primary);
}
.help-sections > li > a {
display: block;
padding: 2.6rem;
color: var(--graydark);
text-decoration: none;
}
.help-sections > li h3 {
margin-top: 0;
padding-top: 0;
line-height: 1.2;
}
.help-sections > li p {
color: var(--graymedium);
font-size: 1.1rem;
}
.help-sections > li.no-link {
padding: 2.6rem;
}
.help-sections > li.soon:hover {
border-color: var(--graylight);
}
.help-sections > li.soon h3 {
opacity: 0.4;
}
.help-sections > li .advice {
padding: 1rem;
position: absolute;
top: 1rem;
right: 1rem;
}
.help-sections > li.github {
min-height: auto;
border: none;
border-radius: 0;
box-shadow: none;
border-top: 1px dashed var(--graylight);
border-bottom: 1px dashed var(--graylight);
margin-top: 4rem;
}
.help-sections > li.github a:hover h3 {
color: var(--primarydark);
transition: color 200ms ease-in-out;
}
.help-sections > li.github a:hover svg {
fill: var(--primarydark);
transition: fill 300ms ease-in-out;
}
.help-sections > li.github a {
display: flex;
align-items: center;
}
.help-sections > li.github .content {
margin-left: 2rem;
}
.help-sections > li.github svg {
width: 72px;
height: 72px;
}
.contact-block {
text-align: center;
padding-top: 12rem;
margin-bottom: 6rem;
background-size: auto 75%;
background-position: center top;
background-repeat: no-repeat;
background-image: url(/img/home-contact.png);
}
.contact-block p,
.contact-block h3 {
max-width: initial;
}
.main-container h1 {
margin-top: 0rem;
padding-top: 5rem;
}
.main-container h2 {
margin-top: 0rem;
padding-top: 4rem;
}
.main-container h3 {
margin-top: 0rem;
padding-top: 2rem;
}
.intro-sections {
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 100%;
padding: 0 0 4rem 0;
list-style: none;
}
.intro-sections li {
position: relative;
margin: 1rem 2rem 1rem 0;
background-color: #eee;
flex: 33%;
background-color: white;
box-shadow: 0px 4px 10px rgb(28 56 71 / 5%);
border: 1px solid var(--graylight);
border-radius: 8px;
}
.intro-sections li:hover {
border-color: var(--primary);
}
.intro-sections li > a {
display: block;
padding: 2.6rem;
color: var(--graydark);
text-decoration: none;
}
.intro-sections li h3 {
margin-top: 0;
padding-top: 0;
line-height: 1.2;
}
.intro-sections li p {
color: var(--graymedium);
font-size: 1.2rem;
}
table, tr, th, td {
color: var(--graydark);
padding: 1rem;
vertical-align: top;
border: 1px solid var(--graylight);
border-collapse: collapse;
font-size: 1.10rem;
}
table {
background-color: white;
box-shadow: 0px 4px 20px rgb(28 56 71 / 5%);
}
/* th {
background: rgba(0,0,0,.06);
} */
table>tbody>tr:first-child>td,
table>thead>tr:first-child>th {
font-weight: bold;
background: none repeat scroll 0 0 #ededed;
}
table tr:nth-child(odd) {
background: rgba(0,0,0,.02);
}
@media (max-width: 900px) {
hr {
margin-top: 5rem;
}
.header-title {
display: none;
}
header {
padding: 1rem;
position: relative;
}
header .nav-item:first-child {
display: none;
}
.header-inner {
display: block;
}
.search {
position: relative;
width: 100%;
margin-top: 2rem;
}
.search input {
width: 100%;
font-size: 1rem;
}
.search input:focus {
/* width: calc(100vw - 1.4rem); */
width: 100%;
}
.search input:focus + .search-icon {
display: none;
}
.preheader {
padding: 1rem;
}
.preheader .button {
width: 100%;
}
.home {
display: none;
}
.nav {
margin-left: 0;
}
.main-container.with-sidebar {
display: block;
}
.main-container.with-sidebar .sidebar {
padding: 0;
top: 0;
position: relative;
z-index: 1;
}
.main-container.with-sidebar .sidebar .header {
display: none;
}
.main-container.with-sidebar .sidebar .header.mobile {
display: block;
border: 1px solid var(--graylight);
border-radius: 4px;
padding: 1rem 1rem;
margin: 0;
position: relative;
background: white;
}
.main-container.with-sidebar .sidebar .header:before {
content: "";
position: absolute;
visibility: visible;
z-index: 1;
width: 16px;
height: 16px;
top: 26px;
right: 20px;
background-image: url(/img/caret-down.svg);
background-size: 16px 16px;
background-repeat: no-repeat;
transition: transform 200ms ease-in-out;
}
.main-container.with-sidebar .sidebar #toc {
position: relative;
margin-top: 0;
max-width: none;
z-index: 2;
padding-right: 0;
}
.main-container.with-sidebar .sidebar #toc > ul {
background: white;
border: 1px solid var(--graylight);
color: var(--graymedium);
list-style: none;
margin: 0;
padding: 2rem;
box-shadow: 2px 0 10px rgba(68, 68, 68, 0.1);
display: none;
}
.main-container.with-sidebar .sidebar #toc.open > ul{
display: block;
}
.main-container.with-sidebar .sidebar .open .header:before {
transform: rotate(180deg);
}
.footer-inside {
flex-direction: column;
}
:target[id]::before {
display: inline;
}
}
@media (max-width: 600px) {
hr {
margin-top: 4rem;
}
.main-container h1 {
padding-top: 3rem;
font-size: 3rem;
}
.main-container h2 {
padding-top: 2rem;
font-size: 2rem;
}
.main-container h3 {
padding-top: 1.4rem;
font-size: 1.4rem;
}
header .nav-item {
margin-left: 0.6rem;
margin-right: 0.6rem;
font-size: 1rem;
}
.main-container.with-sidebar .sidebar #toc {
padding: 0;
margin: 0;
}
.help-sections {
flex-direction: column;
}
.help-sections > li {
margin: 0 0 1rem 0;
}
.help-sections > li > a,
.help-sections .illus,
.help-sections > li.no-link.illus-contact {
padding: 1.4rem;
min-height: auto;
}
.help-sections .illus {
background-image: none;
}
}
/* todo: fijar sidebar y header, imgs de bg */