Skip to content

Commit

Permalink
Fix link-grid overflow & darkmode note color
Browse files Browse the repository at this point in the history
* See: #30
  • Loading branch information
stevenjoezhang committed Jun 16, 2020
1 parent b9968b6 commit 44ba30e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
13 changes: 8 additions & 5 deletions source/css/_common/scaffolding/tags/link-grid.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,30 @@
display: grid;
gap: 1.5rem 1.5rem;
grid-template-columns: 1fr 1fr;
padding: 1.5rem;
margin-bottom: 20px;
padding: 1rem;

+mobile() {
grid-template-columns: 1fr;
}

.link-grid-container {
border: solid $grey-lighter;
box-shadow: 1rem 1rem .5rem gray;
height: 5rem;
box-shadow: 1rem 1rem .5rem rgba(0, 0, 0, .5);
min-height: 5rem;
// Fix issue #30
min-width: 0;
padding: .5rem;
position: relative;
transition: background .3s;

&:hover {
animation: shake .5s;
background: rgba(230, 244, 250, .5);
background: var(--card-bg-color);
}

&:active {
box-shadow: .5rem .5rem .25rem gray;
box-shadow: .5rem .5rem .25rem rgba(0, 0, 0, .5);
transform: translate(.2rem, .2rem);
}

Expand Down
20 changes: 9 additions & 11 deletions source/css/_common/scaffolding/tags/note.styl
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,8 @@
}

h2, h3, h4, h5, h6 {
if ($note-icons) {
margin-top: 3px;
} else {
margin-top: 0;
}

border-bottom: initial;
margin-bottom: 0;
margin: 0;
padding-top: 0;
}

Expand All @@ -54,7 +48,6 @@
left: .3em;
position: absolute;
top: calc(50% - 1em);
font-family-icons();
}
}
}
Expand All @@ -63,6 +56,11 @@
&.{$type} {
if ($note-style == 'flat') {
background: lookup('$note-bg-' + $type);
if (hexo-config('darkmode')) {
@media (prefers-color-scheme: dark) {
background: mix(lookup('$note-bg-' + $type), $body-bg-color-dark, 10%);
}
}
}

if ($note-style == 'modern') {
Expand All @@ -72,11 +70,11 @@

a, span.exturl {
&:not(.btn) {
border-bottom: 1px solid lookup('$note-modern-text-' + $type);
border-bottom-color: lookup('$note-modern-text-' + $type);
color: lookup('$note-modern-text-' + $type);

&:hover {
border-bottom: 1px solid lookup('$note-modern-hover-' + $type);
border-bottom-color: lookup('$note-modern-hover-' + $type);
color: lookup('$note-modern-hover-' + $type);
}
}
Expand All @@ -93,7 +91,7 @@

if ($note-icons) {
&:not(.no-icon)::before {
content: lookup('$note-icon-' + $type);
font-family-icons(lookup('$note-icon-' + $type));

if ($note-style != 'modern') {
color: lookup('$note-text-' + $type);
Expand Down

0 comments on commit 44ba30e

Please sign in to comment.