Skip to content

Commit

Permalink
chore(front): updates code component hovers; z-indexes; adds post-tit…
Browse files Browse the repository at this point in the history
…le light
  • Loading branch information
dgrebb committed Sep 23, 2023
1 parent 8f39762 commit 97478ba
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 11 deletions.
1 change: 1 addition & 0 deletions front/src/lib/styles/base/colors-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
--celestial: #e3f6ffff;
--celestial-a90: #e3f6ffe5;
--celestial-a75: #e3f6ffbf;
--celestial-a50: #e3f6ff7f;
--celestial-a30: #e3f6ff4c;
--grape: #231151ff;
--eerie-black: #1a2018ff;
Expand Down
1 change: 1 addition & 0 deletions front/src/lib/styles/base/colors-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
--violet: #0b0033ff;
--violet-a90: #0b0033e5;
--violet-a75: #0b0033bf;
--violet-a50: #0b00337f;
--violet-a30: #0b00334c;
--blacktop: #18020cff;
}
29 changes: 23 additions & 6 deletions front/src/lib/styles/base/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,15 @@
color: var(--violet-a75);
}
.post-title {
color: var(--fg-clr);
-webkit-background-clip: text;
-moz-background-clip: text;
background-clip: text;
color: transparent;
text-shadow:
0 0 0 var(--violet),
0.019em -0.011em 0 var(--sunshine),
0.015em -0.011em 2px rgba(255, 255, 255, 0.5),
-1px 1px 2px rgba(0, 0, 0, 0.33);
}
.post-article {
.heading-anchor-link {
Expand Down Expand Up @@ -264,9 +272,11 @@
&:hover,
&:focus {
.title,
.language,
.code-copy-btn {
.language {
color: var(--violet-a75);
}
.code-copy-btn {
color: var(--violet-a50);
&:hover,
&:active,
&:focus-visible {
Expand Down Expand Up @@ -587,7 +597,7 @@
color: var(--celestial-a75);
}
.post-title {
text-shadow: 0 -0.11rem 1.5rem hsl(var(--shadow-color) / 5);
/* text-shadow: 0 -0.11rem 1.5rem hsl(var(--shadow-color) / 5); */
}
.post-article {
.heading-anchor-link {
Expand Down Expand Up @@ -636,14 +646,21 @@
&:hover,
&:focus {
.title,
.language,
.code-copy-btn {
.language {
color: var(--celestial-a75);
&:hover,
&:focus-visible {
color: var(--light);
}
}
.code-copy-btn {
color: var(--celestial-a50);
&:hover,
&:active,
&:focus-visible {
color: var(--light);
}
}
}

> pre {
Expand Down
8 changes: 7 additions & 1 deletion front/src/lib/styles/components/Code/Code.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
'Liberation Mono', 'Courier New', monospace; /* 1 */

&.full {
top: 1px;
right: 1px;
border-top-right-radius: 0.5rem;
border-top-left-radius: 0.5rem;
width: 100%;
Expand All @@ -62,10 +64,14 @@
padding-right: 2.77rem;
}
}
.title,
.language,
.code-copy-btn {
z-index: 9;
}
.code-copy-btn {
position: absolute;
right: 0;
z-index: 7;
transition: color 333ms;
padding: 0.75rem;
line-height: 1.6;
Expand Down
2 changes: 1 addition & 1 deletion front/src/lib/styles/components/posts-grid.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
grid-column: span 6;
z-index: 1;
cursor: pointer;
box-shadow: var(--shadow-elevation-low);
box-shadow: var(--shadow-elevation-medium);
background-position: center top;
background-size: cover;
background-repeat: no-repeat;
Expand Down
5 changes: 3 additions & 2 deletions front/src/lib/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ html {
(-moz-touch-enabled: 1),
(pointer: coarse) {
overflow: auto;
scrollbar-gutter: stable both-edges;
scrollbar-gutter: stable;
}
}

Expand All @@ -92,11 +92,12 @@ body {
md:text-lg;
position: relative;
transition: scrollbar-color 1s;
padding-left: 14px;
height: 100vh;
min-height: 100vh;
overflow: auto;
scroll-behavior: smooth;
scrollbar-gutter: stable both-edges;
scrollbar-gutter: stable;
color: var(--fg-clr);
@media (hover: none),
(hover: on-demand),
Expand Down
2 changes: 1 addition & 1 deletion front/src/lib/styles/pages/post.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
}
}
&.loaded {
z-index: 5;
z-index: 18;
}
}
}
Expand Down

0 comments on commit 97478ba

Please sign in to comment.