Refactor base styles
This commit is contained in:
parent
4a6047adbb
commit
0aa3d40604
9 changed files with 158 additions and 247 deletions
276
assets/css/components/content.css
Normal file
276
assets/css/components/content.css
Normal file
|
@ -0,0 +1,276 @@
|
|||
|
||||
/* Tables
|
||||
/* ---------------------------------------------------------- */
|
||||
|
||||
table {
|
||||
border-collapse: separate;
|
||||
margin: 0 0 var(--margin) 0;
|
||||
width: 100%;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
th {
|
||||
color: var(--color-base);
|
||||
font-size: 0.9em;
|
||||
font-weight: var(--font-bold);
|
||||
padding: 0 0.7em 0.4em 0.7em;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0.4em 0.7em;
|
||||
border-left-width: 0;
|
||||
border-top-width: 0;
|
||||
}
|
||||
|
||||
td:first-child {
|
||||
border-left-width: 1px;
|
||||
}
|
||||
|
||||
tbody tr {
|
||||
border: solid 1px var(--color-border);
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
tbody tr:first-child td {
|
||||
border-top-width: 1px;
|
||||
}
|
||||
|
||||
tbody tr:nth-child(2n + 1) {
|
||||
background-color: var(--color-bg);
|
||||
}
|
||||
|
||||
tbody td {
|
||||
border: solid 1px var(--color-border);
|
||||
border-left-width: 0;
|
||||
border-top-width: 0;
|
||||
}
|
||||
|
||||
tfoot {
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
|
||||
/* Cards
|
||||
/* ---------------------------------------------------------- */
|
||||
|
||||
.kg-card {
|
||||
margin: 7vw 0;
|
||||
}
|
||||
|
||||
.kg-embed-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.kg-image {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.kg-card figcaption {
|
||||
padding: 1.5rem;
|
||||
font-size: 1.3rem;
|
||||
line-height: 1.4em;
|
||||
font-weight: 600;
|
||||
color: var(--color-base);
|
||||
text-align: center;
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
|
||||
/* Wide cards
|
||||
/* ---------------------------------------------------------- */
|
||||
|
||||
.kg-width-wide {
|
||||
position: relative;
|
||||
width: 75vw;
|
||||
min-width: 100%;
|
||||
margin-left: calc(50% - 50vw);
|
||||
margin-right: calc(50% - 50vw);
|
||||
transform: translateX(calc(50vw - 50%));
|
||||
}
|
||||
|
||||
.kg-width-full {
|
||||
position: relative;
|
||||
width: 94vw;
|
||||
min-width: 100%;
|
||||
margin-left: calc(50% - 50vw);
|
||||
margin-right: calc(50% - 50vw);
|
||||
transform: translateX(calc(50vw - 50%));
|
||||
}
|
||||
|
||||
.kg-width-full figcaption {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.kg-width-full {
|
||||
width: 100vw;
|
||||
}
|
||||
.kg-width-full figcaption {
|
||||
padding-left: 6vw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Galleries
|
||||
/* ---------------------------------------------------------- */
|
||||
|
||||
.kg-gallery-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
width: 75vw;
|
||||
min-width: 100%;
|
||||
margin-left: calc(50% - 50vw);
|
||||
margin-right: calc(50% - 50vw);
|
||||
transform: translateX(calc(50vw - 50%));
|
||||
}
|
||||
|
||||
.kg-gallery-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.kg-gallery-image img {
|
||||
display: block;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.kg-gallery-row:not(:first-of-type) {
|
||||
margin: 0.75em 0 0 0;
|
||||
}
|
||||
|
||||
.kg-gallery-image:not(:first-of-type) {
|
||||
margin: 0 0 0 0.75em;
|
||||
}
|
||||
|
||||
.kg-gallery-card + .kg-image-card.kg-width-wide,
|
||||
.kg-gallery-card + .kg-gallery-card,
|
||||
.kg-image-card.kg-width-wide + .kg-gallery-card,
|
||||
.kg-image-card.kg-width-wide + .kg-image-card.kg-width-wide {
|
||||
margin-top: calc( -7vw + 0.75em );
|
||||
}
|
||||
|
||||
/* Code Cards
|
||||
/* ---------------------------------------------------------- */
|
||||
|
||||
.kg-code-card {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.kg-code-card pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
/* Bookmark Cards
|
||||
/* ---------------------------------------------------------- */
|
||||
|
||||
.kg-bookmark-card {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.kg-bookmark-container {
|
||||
display: flex;
|
||||
min-height: 148px;
|
||||
color: #131313;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
|
||||
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);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.kg-bookmark-container:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.kg-bookmark-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
flex-basis: 100%;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.kg-bookmark-title {
|
||||
color: #131313;
|
||||
font-size: 1.6rem;
|
||||
line-height: 1.5em;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.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-thumbnail {
|
||||
position: relative;
|
||||
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;
|
||||
|
||||
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 {
|
||||
content: "•";
|
||||
margin: 0 6px;
|
||||
}
|
||||
|
||||
.kg-bookmark-publisher {
|
||||
display: block;
|
||||
max-width: 240px;
|
||||
color: #343f44;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue