Skip to content

Commit

Permalink
last fixes px to rem
Browse files Browse the repository at this point in the history
  • Loading branch information
AkinariHex committed Aug 11, 2024
1 parent 05fe822 commit da95c86
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

--foreground-nodata-hsl: 240, 3%, 22%;

--background-navbar-tooltip-hsl: 240, 6%, 10%;
--background-navbar-tooltip-hsl: 240, 3%, 12%;

--mods-NM-bg: 226, 99%, 65%;
--mods-NM-bg-row: 226, 99%, 65%, 0.15;
Expand Down
30 changes: 14 additions & 16 deletions components/NavBar/Tooltip/Tooltip.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,32 @@
.parent {
position: absolute;
z-index: 1000;
top: calc(100% - 10px);
right: -44px;
min-width: 110px;
top: calc(100% - 0.6rem);
left: calc(
-1 * (1.9rem + (1.4rem / 2))
); /* calc(-1 * (profile image width + (horizontal padding of content below / 2))) */
white-space: nowrap;
opacity: 0;
padding-top: 8px;
padding-top: 0.7rem;
visibility: hidden;
}

.tooltipContent {
padding: 15px;
padding: 1.2rem 1.4rem;
background-color: hsla(var(--background-navbar-tooltip-hsl));
color: hsla(var(--foreground-inactive-hsl));
border-radius: 8px;
border-radius: 0.85rem;
box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.1);
font-size: 1.15rem;
font-size: 1.1rem;
display: flex;
font-weight: 400;
flex-direction: column;
gap: 10px;
gap: 0.8rem;
}

.tooltipContainer:hover > .parent {
opacity: 1;
top: calc(100% - 2px);
top: calc(100% - 0.15rem);
visibility: visible;
transition: all 0.2s ease-out;
}
Expand All @@ -42,16 +43,13 @@
justify-content: center;
}

.tooltipContent > div > span {
.tooltipContent > div {
cursor: pointer;
transition: color 0.2s ease, background-color 0.2s ease;
transition: color 0.2s ease;
border-radius: 4px;
color: hsla(var(--foreground-inactive-hsl));
}

:root .tooltipContent > div > span:hover {
color: #888;
}

[data-theme='dark'] .tooltipContent > div > span:hover {
.tooltipContent > div:hover {
color: hsla(var(--foreground-active-hsl));
}
4 changes: 2 additions & 2 deletions components/NavBar/UserLogged/UserLogged.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import { useUser } from '@/util/hooks';
import Image from 'next/image';
import styles from '../NavBar.module.css';
import Tooltip from './../Tooltip/Tooltip';
import ThemeSwitcher from '../ThemeSwitcher/ThemeSwitcher';
import Tooltip from './../Tooltip/Tooltip';
const tooltipContent = (
<>
<div>Friends</div>
{/* <div>Friends</div> */}
<div>Sign out</div>
<div className={styles.iconContainer}>
<ThemeSwitcher />
Expand Down

0 comments on commit da95c86

Please sign in to comment.