Skip to content

Instantly share code, notes, and snippets.

@digitaljavelina
Forked from ttscoff/linkding-cards.css
Last active February 26, 2026 00:25
Show Gist options
  • Select an option

  • Save digitaljavelina/4d6e11611023cd4889b371f4dddb4d9b to your computer and use it in GitHub Desktop.

Select an option

Save digitaljavelina/4d6e11611023cd4889b371f4dddb4d9b to your computer and use it in GitHub Desktop.
Custom CSS to give linkding a dark, card-based layout
/*
Card-based layout for Linkding v1.43+ (Lit elements)
Adapted from Brett Terpstra's original (MIT License)
Updated for v1.45 HTML structure where:
- li[ld-bookmark-item] → ul.bookmark-list > li[data-bookmark-id]
- [ld-bulk-edit] → ld-bookmark-page.active
- Preview image is now a sibling of .content (not inside .title)
*/
/* ===== Theme Colors ===== */
body {
--fbc-blue-60: #001219;
--fbc-blue-70: #001219;
background: #001219;
}
:root {
--primary-color: #94d2bd;
--primary-text-color: #fff;
--btn-primary-bg-color: #005f73;
--btn-primary-hover-bg-color: #0a9396;
--btn-primary-text-color: #fff;
--btn-link-text-color: #94d2bd;
--btn-link-hover-text-color: #0fd9de;
--checkbox-checked-bg-color: #005f73;
--checkbox-bg-color: rgba(0, 95, 115, 0.75);
--tab-active-color: #94d2bd;
--tab-highlight-color: #0a9396;
--tab-hover-color: #0a9396;
--focus-outline: #94d2bd;
--input-border-color: #1e493a;
--btn-border-color: #1e493a;
--body-color: #001219;
--body-color-contrast: #002633;
--text-color: #ccc;
--secondary-text-color: #888;
--border-color: #333;
--secondary-border-color: #222;
--alternative-color: #94d2bd;
--alternative-color-dark: #0a9396;
--secondary-link-color: #94d2bd;
--bookmark-title-color: #fff;
--bookmark-description-color: #aaa;
--bookmark-actions-color: #94d2bd;
--bookmark-actions-hover-color: #0fd9de;
}
/* ===== Global link & button colors ===== */
a {
color: #94d2bd;
}
.btn {
color: #94d2bd;
}
.btn.btn-primary {
background: #005f73;
color: #fff;
}
.btn.btn-primary:hover {
background: #0a9396;
}
/* ===== Logo ===== */
header h1 {
transform: rotate(-5deg) translate(-7px, -13px);
}
header h1::after {
color: #ca6702;
content: " redux";
left: 0;
opacity: 0.8;
position: absolute;
top: 1em;
}
/* ===== Tag cloud / Side panel ===== */
/* The side panel uses .col-1 and slides in from the right on hover */
.side-panel.col-1 {
background: rgba(0, 18, 25, 0.95);
border-radius: 8px 0 0 8px;
border: solid 2px rgba(10, 147, 150, 0.85);
height: calc(100vh - 159px);
left: 100%;
opacity: 0.5;
overflow-y: auto;
padding: 30px;
position: fixed;
top: 149px;
transition: all 0.2s ease-in-out;
width: 60vw;
z-index: 20;
}
.side-panel.col-1:hover,
.side-panel.col-1:focus-within {
margin-left: -57vw;
opacity: 1;
transition: all 0.2s ease-in-out;
}
section.content-area.col-1 .content-area-header,
.side-panel.col-1 .section-header {
background: rgba(0, 18, 25, 0.95);
border-color: rgba(10, 147, 150, 0.85);
border-radius: 8px 8px 0 0;
border-style: solid;
border-width: 2px 2px 0 2px;
border-bottom: 0;
cursor: pointer;
display: block;
margin-bottom: 0;
padding: 0 20px;
position: fixed;
transform: rotate(-90deg) translate(-30px, -88px);
}
.side-panel.col-1 h2 {
color: #0a9396;
}
.tag-cloud .unselected-tags a {
border-radius: 15px;
border: solid 1px rgba(0, 95, 115, 0.3);
color: #005f73;
display: inline-block;
font-weight: 500;
margin: 0 0 0.25em 0 !important;
padding: 0 6px;
transition: all 0.3s ease-in-out;
}
.tag-cloud .unselected-tags a:hover,
.tag-cloud .unselected-tags a:focus,
.tag-cloud .unselected-tags a:visited:hover,
.tag-cloud .unselected-tags a:visited:focus {
background: rgba(148, 210, 189, 0.8);
box-shadow: 0 0 4px rgba(148, 210, 189, 0.35);
text-decoration: none;
transform: scale(1.1);
transition: all 0.15s ease-in-out;
}
.tag-cloud .highlight-char {
color: #0a9396;
}
.tag-cloud a {
font-weight: 500;
}
/* ===== Layout: Full width, no grid columns ===== */
.bookmarks-page.grid {
display: block;
}
.container {
max-width: 100%;
}
/* Make the main area full width since sidebar is a fixed overlay */
.bookmarks-page main.col-2 {
grid-column: span var(--grid-columns, 12);
}
/* ===== Bookmark list: Flex-wrap card grid ===== */
ul.bookmark-list {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 0;
margin-top: 10px;
}
/* ===== Individual bookmark cards ===== */
ul.bookmark-list > li {
/* Override the default horizontal flex to vertical for card layout */
flex-direction: column-reverse;
background-color: rgba(0, 95, 115, 0.09);
border-radius: 8px;
border: solid 1px #333;
margin: 0 10px 10px 0;
min-width: 250px;
overflow: hidden;
padding: 0;
position: relative;
width: 100%;
}
/* Responsive card widths */
@media screen and (min-width: 770px) {
ul.bookmark-list > li {
width: calc(50% - 10px);
}
}
@media screen and (min-width: 900px) {
ul.bookmark-list > li {
width: calc(33.33% - 10px);
}
}
@media screen and (min-width: 1300px) {
ul.bookmark-list > li {
width: calc(25% - 10px);
}
}
/* ===== Content area (below image in visual order due to column-reverse) ===== */
ul.bookmark-list > li > .content {
display: block;
padding: 10px;
padding-bottom: 70px;
position: relative;
min-height: 120px;
}
/* ===== Title ===== */
ul.bookmark-list > li .title {
background: none;
}
ul.bookmark-list > li .title a {
width: 100%;
color: #fff;
white-space: normal;
overflow: visible;
text-overflow: unset;
}
ul.bookmark-list > li .title a[data-tooltip]:focus::after,
ul.bookmark-list > li .title a[data-tooltip]:hover::after {
background: #005b7f;
border-color: #005f73;
}
/* Favicon */
ul.bookmark-list > li .title img.favicon {
transition: transform 0.2s ease-in-out;
}
ul.bookmark-list > li .title:hover img.favicon {
transform: translateY(-50%) scale(1.3);
transition: transform 0.2s ease-in-out;
}
/* ===== URL display ===== */
ul.bookmark-list > li .url-display,
ul.bookmark-list > li .url-path {
color: #94d2bd;
}
/* ===== Preview image: Sits on top of card (column-reverse puts it visually first) ===== */
ul.bookmark-list > li > .preview-image {
width: 100%;
height: 200px;
border: 0;
border-radius: 0;
margin: 0;
object-fit: cover;
flex: 0 0 200px;
}
ul.bookmark-list > li > .preview-image.placeholder {
background: linear-gradient(0deg, #93d2bd 0%, #006275 100%);
height: 200px;
display: flex;
align-items: center;
justify-content: center;
}
ul.bookmark-list > li > .preview-image.placeholder .img {
mask: none;
-webkit-mask: none;
background-color: transparent;
}
/* ===== Description ===== */
ul.bookmark-list > li .description {
color: #aaa;
margin: 0.5em 0;
}
ul.bookmark-list > li .description.separate {
-webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
max-height: 4.3em;
overflow: hidden;
transition: all 0.2s linear;
}
ul.bookmark-list > li .description.separate:hover {
-webkit-mask-image: linear-gradient(180deg, #000 60%, #000);
max-height: 15em;
transition: all 0.3s ease-in-out;
z-index: 11;
position: relative;
}
/* ===== Tags ===== */
ul.bookmark-list > li .tags {
margin: 0.5em 0;
}
ul.bookmark-list > li .tags a,
ul.bookmark-list > li .tags a:link,
ul.bookmark-list > li .tags a:visited,
ul.bookmark-list > li .tags a:hover,
ul.bookmark-list > li .tags a:focus {
background: #005f73;
border-radius: 15px;
color: #94d2bd;
font-size: 90%;
padding: 3px 6px;
text-decoration: none;
transition: all 0.1s linear;
}
/* ===== Actions bar: Pinned to bottom of card ===== */
ul.bookmark-list > li .actions {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: auto;
min-height: 40px;
padding: 8px 10px;
box-sizing: border-box;
font-size: var(--font-size-sm);
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 4px 8px;
}
ul.bookmark-list > li .actions a,
ul.bookmark-list > li .actions button.btn-link {
color: #94d2bd;
padding: 0 4px;
text-decoration: none;
}
ul.bookmark-list > li .actions a:hover,
ul.bookmark-list > li .actions button.btn-link:hover {
color: #0fd9de;
}
/* Remove button (destructive) */
ul.bookmark-list > li .actions button.btn-link[name="remove"] {
color: #dc2917;
opacity: 0.6;
}
ul.bookmark-list > li .actions button.btn-link[name="remove"]:hover {
opacity: 1;
}
/* Extra actions */
ul.bookmark-list > li .extra-actions {
display: flex;
gap: 4px;
align-items: center;
}
ul.bookmark-list > li .extra-actions button.btn-link {
opacity: 0.5;
}
ul.bookmark-list > li .extra-actions button.btn-link:hover,
ul.bookmark-list > li .extra-actions button.btn-link:focus {
opacity: 1;
}
/* Hide the "|" separator spans in actions */
ul.bookmark-list > li .actions > span:not(.confirmation) {
display: none;
}
/* ===== Bulk edit mode (v1.45: ld-bookmark-page.active) ===== */
ld-bookmark-page.active ul.bookmark-list > li .form-checkbox.bulk-edit-checkbox {
cursor: pointer;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
transform: none;
z-index: 10;
opacity: 0;
margin: 0;
padding: 0;
}
/* Remove left padding in card mode during bulk edit */
ld-bookmark-page.active ul.bookmark-list > li {
padding-left: 0 !important;
}
/* ===== Notes ===== */
ul.bookmark-list .notes {
background: #333;
border-radius: 4px;
margin: 0.5em 0;
}
/* ===== Pagination ===== */
.bookmark-pagination.sticky {
background: #001219;
}
.bookmark-pagination.sticky::before {
background: #001219;
}
/* ===== Dark backgrounds for inputs/forms ===== */
input, select, textarea, .form-input, .form-select {
background: rgba(0, 18, 25, 0.8);
color: #fff;
border-color: #1e493a;
}
/* ===== Modal/dialog dark theme ===== */
dialog, .modal {
background: #001e2b;
color: #fff;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment