Skip to content

Commit

Permalink
New CSS snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
semanticdata committed Feb 23, 2024
1 parent c306248 commit 3d62461
Show file tree
Hide file tree
Showing 18 changed files with 544 additions and 239 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
/*
Remove external link anchor.
*/

.internal-link {
text-decoration: none;
}

.external-link {
background: none;
padding-right: 0;
}
}
35 changes: 0 additions & 35 deletions .obsidian/snippets/[editor] Frontmatter tweaks.css

This file was deleted.

33 changes: 33 additions & 0 deletions .obsidian/snippets/[editor] Frontmatter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
Frontmatter tweaks
Style frontmatter to be less prominent than the body of the note.
https://github.com/replete/obsidian-minimal-theme-css-snippets
*/

.cm-s-obsidian .cm-def:nth-of-type(1) {
/* both --- */
font-size: 50%;
}
.cm-s-obsidian .cm-line:nth-of-type(1) .cm-def {
/* first --- */
color: var(--blockquote-color);
}
.cm-s-obsidian .cm-line:nth-of-type(1) ~ .cm-line .cm-def {
/* last --- */
color: var(--blockquote-color);
}

.cm-s-obsidian .cm-hmd-frontmatter {
font-size: 75%;
}
.cm-s-obsidian span.cm-meta {
opacity: 0.6;
}

/* Editor: Override Syntax Highlighter Frontmatter styles */
.cm-s-obsidian .cm-line .cm-hmd-frontmatter.cm-atom {
/* color: var(--text-normal); */
}
.cm-s-obsidian .cm-line .cm-hmd-frontmatter ~ .cm-hmd-frontmatter {
color: var(--blockquote-color);
}
19 changes: 19 additions & 0 deletions .obsidian/snippets/[editor] Internal links.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
Add translucent background to internal links.
*/
/* OG code */
/* .cm-s-obsidian span.cm-hmd-internal-link,
a.internal-link {
background-color: #8f9fa937;
padding: 0 0.1em;
margin: auto -0.1em;
border-radius: 3px;
} */

.cm-s-obsidian span.cm-hmd-internal-link,
a.internal-link {
background-color: #8f9fa937;
/* padding: 0 0.1em; */
/* margin: auto -0.1em; */
border-radius: 0.15em;
}
25 changes: 0 additions & 25 deletions .obsidian/snippets/[editor] Table tweaks.css

This file was deleted.

72 changes: 72 additions & 0 deletions .obsidian/snippets/[editor] Tables.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
Style tables.
*/

:root {
--table-border-color: var(--text-faint);
}

/* Border color */
.cm-s-obsidian .cm-table-widget th,
.cm-s-obsidian .cm-table-widget td {
border-color: var(--table-border-color);
}

/* Bold header row */
.cm-s-obsidian .cm-table-widget th {
font-weight: bold;
}

/* lighten alternate row background */
.markdown-rendered tbody tr:nth-child(odd) {
background-color: #2a3a3a80;
}

div.table-wrapper {
max-width: 100%;
margin: 0 auto;
border: none;
outline: 0.2rem solid black;
border-radius: 0.2rem;
}

div.cm-embed-block.cm-table-widget.markdown-rendered
div.table-wrapper
table.table-editor
thead
tr
th,
div.cm-embed-block.cm-table-widget.markdown-rendered
div.table-wrapper
table.table-editor
tbody
tr
td
div.table-cell-wrapper {
padding: 1em;
font-size: 1.2em;
}

/* From previous version of Anodyne */
table thead {
background-color: var(--cus-table-header);
font-weight: bold;
}

table tr:nth-child(2n),
thead {
background-color: var(--cus-table-gap-tr);
}

.cm-active.cm-line {
background: var(--cus-highlight-cursor-line);
}

.nav-file-title.is-active::before {
border-left: 4px solid hsl(var(--interactive-accent-hsl));
content: '';
position: absolute;
left: 0px;
top: 0;
height: 100%;
}
110 changes: 0 additions & 110 deletions .obsidian/snippets/[editor] Typography fixes.css

This file was deleted.

64 changes: 64 additions & 0 deletions .obsidian/snippets/[plugin] Calendar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
Calendar plugin tweaks
https://github.com/replete/obsidian-minimal-theme-css-snippets
*/

.view-content:has(#calendar-container) {
padding: 0;
}

#calendar-container {
padding: 0 8px 8px 8px;
}

#calendar-container .year {
color: var(--text-muted);
}
#calendar-container td,
#calendar-container .day {
border-radius: 0 !important;
}
#calendar-container .day {
padding-top: 0;
padding-bottom: 0;
}
#calendar-container .day.active {
outline: 1px solid var(--tx3);
}
#calendar-container .day.active .filled,
#calendar-container .day.today.active .filled {
fill: var(--tx1, var(--text-normal)) !important;
}
#calendar-container .day.active .hollow,
#calendar-container .day.today.active .hollow {
stroke: var(--tx1, var(--text-normal)) !important;
}
#calendar-container .day.today .filled {
fill: var(--text-muted) !important;
}
#calendar-container .day.today .hollow {
stroke: var(--text-muted) !important;
}

#calendar-container .day.today {
color: var(--text-bold);
font-weight: 700;
outline: 2px solid var(--color-background-day-active);
}
.theme-dark #calendar-container .day.today {
/* outline:2px solid var(--tx3); */
}

#calendar-container .day.today.active {
/* color:var(--text-bright); */
}
#calendar-container .day:active {
background: var(--tx2, var(--text-muted));
}
#calendar-container .day.adjacent-month {
/* color:var(--tx2) */
}

#calendar-container .weekend {
background: var(--bg2, var(--background-primary));
}
Loading

0 comments on commit 3d62461

Please sign in to comment.