More typograhic spacing work and colours

This commit is contained in:
David Darnes 2019-11-07 17:09:46 +07:00
parent cb772ce363
commit 8c1a8591f2
4 changed files with 89 additions and 98 deletions

View file

@ -2,7 +2,7 @@
/* Main
/* ---------------------------------------------------------- */
.gh-main {
margin: 2rem 0;
margin-bottom: 2rem;
}
/* Content grid
@ -55,56 +55,45 @@
/* ---------------------------------------------------------- */
.gh-content table {
border-collapse: separate;
margin: 0 0 var(--margin) 0;
border-collapse: collapse;
width: 100%;
font-size: 0.8em;
}
.gh-content th {
color: var(--color-base);
font-size: 0.9em;
font-weight: var(--font-bold);
padding: 0 0.7em 0.4em 0.7em;
padding: 0.5em 0.8em;
text-align: left;
font-size: .75em;
text-transform: uppercase;
}
.gh-content td {
padding: 0.4em 0.7em;
border-left-width: 0;
border-top-width: 0;
}
.gh-content td:first-child {
border-left-width: 1px;
}
.gh-content tbody tr {
border: solid 1px var(--color-border);
border-left: 0;
border-right: 0;
}
.gh-content tbody tr:first-child td {
border-top-width: 1px;
}
.gh-content tbody tr:nth-child(2n + 1) {
background-color: var(--color-bg);
background-color: rgba(0,0,0,0.1);
padding: 1px;
}
.gh-content tbody td {
border: solid 1px var(--color-border);
border-left-width: 0;
border-top-width: 0;
.gh-content tbody tr:nth-child(2n + 2) td:last-child {
box-shadow:
inset 1px 0 rgba(0,0,0,0.1),
inset -1px 0 rgba(0,0,0,0.1);
}
.gh-content tfoot {
border-width: 0;
.gh-content tbody tr:nth-child(2n + 2) td {
box-shadow: inset 1px 0 rgba(0,0,0,0.1);
}
.gh-content tbody tr:last-child {
border-bottom: 1px solid rgba(0,0,0,.1);
}
/* Post header
/* ---------------------------------------------------------- */
.gh-page.no-image {
margin-top: 2rem;
}
.gh-header {
grid-row-gap: 2rem;
@ -118,6 +107,7 @@
.gh-excerpt {
grid-row: 2 / 3;
margin-bottom: 1.5em;
}
.gh-image {
@ -128,6 +118,10 @@
margin-top: 2rem;
}
.gh-image + .gh-title {
color: #fff;
}
.gh-post-footer {
margin: 2rem 0;
}
@ -157,7 +151,8 @@
.gh-content h5 + .kg-card,
.gh-content h6 + .kg-card,
.gh-content table + .kg-card,
.gh-content blockquote + .kg-card {
.gh-content blockquote + .kg-card,
.gh-content blockquote {
margin-top: 1.5em;
}
@ -169,6 +164,8 @@
.gh-content hr {
margin: 2em 0;
border-color: currentColor;
opacity: 0.2;
}
.gh-content ul,
@ -177,6 +174,22 @@
padding-left: 1.9em;
}
.gh-content blockquote {
position: relative;
padding-left: 1.5em;
}
.gh-content blockquote::before {
content: "";
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: .5em;
background: currentColor;
opacity: 0.3;
}
/* Cards
/* ---------------------------------------------------------- */
@ -192,7 +205,8 @@
margin-top: 0;
}
:not(.kg-card):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + .kg-card {
:not(.kg-card):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + .kg-card,
.gh-post-footer {
margin-top: 7vw;
}
@ -200,24 +214,27 @@
margin-top: 7vw;
}
.gh-post-footer {
margin-bottom: 7vw;
}
.kg-card figcaption {
padding: 1.5rem 1.5rem 0;
font-size: 1.3rem;
line-height: 1.4em;
font-weight: 600;
color: var(--color-base);
text-align: center;
opacity: 0.4;
}
.gh-canvas > pre {
overflow: scroll;
border-radius: 5px;
box-shadow: 0 2px 6px -2px rgba(0,0,0,.1), 0 0 1px rgba(0,0,0,.4);
padding: 16px 20px;
border-radius: 5px;
background: rgba(255,255,255,0.6);
box-shadow: 0 2px 6px -2px rgba(0,0,0,.1), 0 0 1px rgba(0,0,0,.4);
}
.kg-embed-card {
display: flex;
flex-direction: column;
@ -273,9 +290,12 @@
.kg-bookmark-container {
display: flex;
flex-wrap: wrap;
flex-direction: row-reverse;
min-height: 148px;
color: #131313;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
color: currentColor;
background: rgba(255,255,255,0.6);
font-family: inherit;
text-decoration: none;
border-radius: 5px;
box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.4);
@ -287,80 +307,52 @@
}
.kg-bookmark-content {
display: flex;
flex-direction: column;
flex-grow: 1;
flex-basis: 100%;
align-items: flex-start;
justify-content: flex-start;
flex-basis: 0;
flex-grow: 999;
padding: 20px;
order: 1;
}
.kg-bookmark-title {
color: inherit;
font-size: 1.6rem;
line-height: 1.5em;
font-weight: 600;
}
.kg-bookmark-metadata {
margin-top: .5em;
align-items: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.kg-bookmark-description {
display: -webkit-box;
font-size: 1.4rem;
line-height: 1.5em;
margin-top: 10px;
color: #54666d;
font-weight: 400;
max-height: 44px;
overflow-y: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.kg-bookmark-icon {
display: inline-block;
width: 1em;
height: 1em;
vertical-align: text-bottom;
margin-right: .5em;
margin-bottom: .05em;
}
.kg-bookmark-thumbnail {
position: relative;
display: flex;
flex-basis: 24rem;
flex-grow: 1;
min-width: 33%;
max-height: 100%;
}
.kg-bookmark-thumbnail img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 0 3px 3px 0;
max-width: 100%;
height: auto;
vertical-align: bottom;
object-fit: cover;
}
.kg-bookmark-metadata {
display: flex;
align-items: center;
margin-top: 14px;
color: #343f44;
font-size: 1.4rem;
font-weight: 500;
}
.kg-bookmark-icon {
width: 20px;
height: 20px;
margin-right: 6px;
}
.kg-bookmark-author {
line-height: 1.5em;
}
.kg-bookmark-author:after {
.kg-bookmark-author::after {
content: "•";
margin: 0 6px;
}
.kg-bookmark-publisher {
display: block;
max-width: 240px;
color: #343f44;
white-space: nowrap;
overflow: hidden;
margin: 0 .5em;
}

View file

@ -60,7 +60,7 @@ img {
input,
button,
select,
textarea, {
textarea {
font: inherit;
}
@ -78,7 +78,6 @@ hr {
blockquote {
margin: 1.5em 0;
padding: 0 1.6em 0 1.6em;
border-left: var(--color-bg) 0.5em solid;
}
blockquote p {