radicaloptimism

Notification Menu: The Complete Template [UPDATED]

Aug 30th, 2025 (edited)
2,992
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 17.26 KB | None | 0 0
  1. <style>
  2.  
  3. /* ★ — The complete template for the new Notification menu in janitor.ai! — ★ */
  4. /* ★ Made by: @tigerdropped! */
  5. /* ★ Credits optional but highly appreciated, just share the link to this pastebin so more people can benefit from it. */
  6.  
  7.  
  8. /* ★ — NOTES: */
  9. /* - THERE'S CURRENTLY A BUG, which causes the menu to not show up for mobile in certain instances, this happens when the 'backdrop-filter:' property is removed from '.pp-top-bar'. A fix for it is provided in this template. */
  10. /* - This template is specifically designed to avoid the randomly generated numbers of the new elements, in an attempt to minimize instances of code breaking due to sudden class changes. However, I can't guarantee it will work 100% since the devs can change them in any way they want, but I tried my best. */
  11. /* - I tried labelling and explaining to the best of my capacity, if you have any questions, don't be afraid to reach out to me on discord: .radicaloptimism */
  12. /* - If you find any errors, let me know through discord too! */
  13.  
  14.  
  15.  
  16. /* ★ — Rework start! — ★ */
  17.  
  18. /* ★ — Notifications button */
  19. /* This section includes everything needed to fully style the notification button, the bell, and the notification number. */
  20.  
  21. /* ✩ — Notifications button container */
  22. /* Aside from containing the button, it also helps to anchor the menu. Best to not modify. */
  23. [class*="notificationsContainer"] { }
  24.  
  25.  
  26. /* ✩ — Actual Button */
  27. /* For accesibility purposes, please make your button easily noticeable, avoid low contrast colors so people can distinguish it without issue. */
  28. [class*="notificationsButton"] {
  29.   background: #111;
  30.   color: #f9f9f9;
  31.   border: 1px solid;
  32.   border-radius: 999px;
  33.   transition: all 500ms;
  34.   min-width: 2.5rem;
  35.   min-height: 2.5rem;
  36.   padding: 0rem; /* Default value is 0.5rem */
  37. }
  38.  
  39. /* ✩ — Button pointer events */
  40. /* Remember that there is no hover state on mobile and tablet. Please don't go overboard with effects. */
  41. /* On hover */
  42. [class*="notificationsButton"]:hover {
  43.   background: #f9f9f9;
  44. }
  45.  
  46. /* On active click */
  47. [class*="notificationsButton"]:active {
  48.   background: #f9f9f9;
  49.   transform: scale(0.9);
  50. }
  51.  
  52.  
  53. /* ✩ — Notification bell Icon */
  54. /* For Accesibility make sure there is enough contrast to make the bell visible. */
  55. [class*="notificationIcon"] {
  56.   font-size: 1.5rem; /* controls bell size */
  57.   color: #f9f9f9;
  58.   transition: all 500ms;
  59. }
  60.  
  61. /* On hover & active click */
  62. [class*="notificationsButton"]:is(:hover, :active) [class*="notificationIcon"] {
  63.   color: #111;
  64. }
  65.  
  66. /* Notification number */
  67. [class*="notificationsBadge"] {
  68.   display: flex;
  69.   align-items: center;
  70.   justify-content: center;
  71.   /* ↑ center the number */
  72.  
  73.   top: 0; /* controls the position */
  74.   right: 0;
  75.   background: #ef4444;
  76.   color: #f9f9f9;
  77.   font: 600 0.75rem/0.7 Poppins, sans-serif;
  78.   padding: 0 0.25rem;
  79.   width: auto;
  80.   min-width: 1.25rem;
  81.   aspect-ratio: 1; /* ensures a perfect circle */
  82.   height: auto;
  83.   border-radius: 999px;
  84.   box-shadow: unset;
  85.   border: unset;
  86. }
  87.  
  88.  
  89.  
  90. /* ★ — Notification Menu — ★ */
  91. /* In this section I will list EVERYTHING pertaining to the actual menu. This will include the different states of it (Empty, loading, having notifications). */
  92.  
  93. /* ★ — Main container of menu — ★ */
  94. /* This container acts as the rounded box that holds everything that makes up the menu. It controls the main background, the border-radius, the popup animation, etc. */
  95. [class*="notificationsPopover"] {
  96.   max-width: 400px; /* avoid making it too wide. Default width value is 380px */
  97.   background: #111;
  98.   border: unset;
  99.   box-shadow: 0 0 0.625rem #111111;
  100.   /* animation: _slideIn_fdp8b_1 .25s cubic-bezier(.34,1.56,.64,1); */
  101.   /* You can make your own intro animation with @keyframes, but PLEASE don't make it annoying, think about Accesibility. */
  102. }
  103.  
  104. /* ✩ — Fix for menu on mobile/tablets in case 'backdrop-filter' has been removed. */
  105. @media only screen and (max-width: 768px),
  106.                 only screen and (max-width: 480px) {
  107.   [class*="notificationsPopover"] {
  108.     top: 3rem; /* Your header size + 0.5rem */
  109.   }
  110. }
  111.  
  112. /* ✩ — Removing the gradient from the background of the container */
  113. [class*="notificationsPopover"]::before { content: unset; }
  114.  
  115.  
  116.  
  117. /* ★ — Loading state — ★ */
  118. /* ✩ — Loading section main container */
  119. [class*="_loadingState_"] {
  120.   /* No reason to modify this. */
  121. }
  122.  
  123. /* ✩ — Loading section spinner */
  124. [class*="_loadingSpinner_"] {
  125.   border: 3px solid #f9f9f940;
  126.   border-top: 3px solid #f9f9f9; /* lighter color */
  127. }
  128.  
  129. /* ✩ — Loading section text (if applicable) */
  130. [class*="_loadingMessage_"] {
  131.   color: #f9f9f9;
  132.   font-family: 'DM Sans';
  133. }
  134.  
  135.  
  136.  
  137. /* ★ — Empty state — ★ */
  138. /* ✩ — Empty section main container + text style */
  139. [class*="_emptyState_"] {
  140.   font: 400 1rem Poppins, sans-serif;
  141.   color: #f9f9f980
  142. }
  143.  
  144. [class*="_emptyState_"]::first-letter {
  145.   text-transform: uppercase;
  146. }
  147.  
  148.  
  149.  
  150. /* ★ — Menu header */
  151. /* This section includes: The title of the menu, the container of the buttons, the buttons themselves, and the popup to delete notifications. */
  152.  
  153. /* ✩ — Main container for header */
  154. [class*="popoverHeader"] {
  155.   padding: 1rem;
  156.   border-bottom: 1px solid #f9f9f980;
  157.   background: unset;
  158.   box-shadow: unset;
  159. }
  160.  
  161. /* ✩ — Header text */
  162. [class*="popoverTitle"] {
  163.   font: italic 100 2rem/0.7 'DM Serif Text', serif;
  164.   color: #f9f9f9;
  165.   letter-spacing: unset;
  166.   text-transform: capitalize;
  167. }
  168.  
  169.  
  170. /* ★ — Header buttons */
  171. /* ✩ — Button container */
  172. [class*="headerActions"] {
  173.   gap: 0.25rem;
  174. }
  175.  
  176. /* ✩ — General button style */
  177. /* For accesibility purposes, please make sure the buttons--and the icons--are easily noticeable. */
  178. [class*="headerActions"] button {
  179.   width: 2rem;
  180.   height: 2rem;
  181.   padding: 0.375rem;
  182.   font-size: 1.5rem;
  183.   background: #111;
  184.   border-color: unset;
  185.   box-shadow: unset;
  186.   color: #f9f9f9;
  187.   border: 1px solid;
  188.   border-radius: 999px;
  189.   transition: all 500ms;
  190. }
  191.  
  192. /* On hover */
  193. [class*="headerActions"] button:hover {
  194.   background: #f9f9f9;
  195.   color: #111;
  196.   border: 1px solid #0000;
  197.   box-shadow: unset;
  198.   /* Extra transform */
  199. }
  200.  
  201. /* ✩ — Per button adjustments */
  202. /* Delete All */
  203. button[class*="deleteAllButton"] {
  204.   color: #ef4444;
  205. }
  206. /* On hover */
  207. button[class*="deleteAllButton"]:hover {
  208.   background: #ef4444;
  209. }
  210.  
  211. /* Mark all as read */
  212. button[class*="markAllReadButton"] {
  213.   color: #4ade80;
  214. }
  215. /* On hover */
  216. button[class*="markAllReadButton"]:hover {
  217.   background: #4ade80;
  218. }
  219.  
  220. /* Close popup */
  221. button[class*="closeButton"] {
  222.   padding: 0.25rem;
  223.   font-size: 2rem;
  224. }
  225. /* On hover */
  226. button[class*="closeButton"]:hover {
  227.  
  228. }
  229.  
  230.  
  231. /* ★ — Delete All Notifications Popup — ★ */
  232. /* When deleting all notifications, a little window appears asking you to confirm the choice. I hate this thing. But oh well, here's all the necessary things to style it. */
  233. /* ✩ — Popup Dim */
  234. [class*="modalOverlay"] {
  235.   background: #11111180;
  236.   backdrop-filter: blur(8px); /* using 'unset' can help with improving perfomance. Backdrop-filter sucks. */
  237.   animation: unset; /* has a fade in that does nothing except cause lag. Please don't animate backdrop-filter. */
  238. }
  239.  
  240. /* ✩ — Popup main container */
  241. [class*="modalContainer"] {
  242.   max-width: 400px; /* avoid making this too wide. Default value is 360px. */
  243. }
  244.  
  245. /* ✩ — Popup box */
  246. /* This includes the first styled box for the popup. It controls: background, border, radius, etc. */
  247. [class*="modalContent"] {
  248.   background: #111;
  249.   border-radius: 1.5rem;
  250.   box-shadow: unset;
  251.   border: unset;
  252.   min-width: 300px;
  253.   overflow: hidden;
  254.   animation: unset; /* another useless animation */
  255. }
  256.  
  257. /* ✩ — Popup header */
  258. /* Box */
  259. [class*="modalHeader"] {
  260.   padding: 1rem;
  261.   border-bottom: 1px solid #f9f9f980;
  262. }
  263.  
  264. /* Popup header text */
  265. [class*="modalTitle"] {
  266.   font: italic 100 1.5rem/0.7 'DM Serif Text', serif;
  267.   color: #f9f9f9;
  268.   letter-spacing: unset;
  269. }
  270. [class*="modalTitle"]::first-letter { text-transform: uppercase; }
  271. [class*="modalTitle"]::after { content: "?"; }
  272.  
  273. /* Close button */
  274. [class*="modalClose"] {
  275.   width: 2rem;
  276.   height: 2rem;
  277.   padding: 0.25rem;
  278.   font-size: 2rem;
  279.   background: #111;
  280.   border-color: unset;
  281.   box-shadow: unset;
  282.   color: #f9f9f9;
  283.   border: 1px solid;
  284.   border-radius: 999px;
  285.   transition: all 500ms;
  286. }
  287.  
  288. [class*="modalClose"]:hover {
  289.   background: #f9f9f9;
  290.   color: #111;
  291.   border: 1px solid #0000;
  292.   transform: scale(1.05);
  293. }
  294.  
  295.  
  296. /* ✩ — Popup body */
  297. /* This is the container prior to that red box with the warning. */
  298. [class*="modalBody"] {
  299.   padding: 1rem;
  300. }
  301.  
  302. /* ✩ — Popup warning */
  303. /* Box */
  304. [class*="modalWarning_"] {
  305.   color: #ef4444;
  306.   border: 1px solid;
  307.   background: unset;
  308.   border-radius: 999px;
  309.   padding: 0.5rem 0.625rem;
  310.   gap: 0.5rem;
  311.   align-items: center;
  312. }
  313.  
  314. /* Icon */
  315. [class*="modalWarningIcon"] {
  316.   margin: 0;
  317.   color: #ef4444;
  318.   font-size: 1rem; /* Controls size. Default is 1rem */
  319. }
  320.  
  321. /* Text */
  322. [class*="modalWarningText"] {
  323.   color: #f9f9f9;
  324.   font: 400 0.875rem/0.7 Poppins, sans-serif;
  325. }
  326.  
  327. /* ✩ — Popup footer (button container) */
  328. /* Main container */
  329. [class*="modalFooter"] {
  330.   padding: 0 1rem 1rem 1rem;
  331.   border: unset; /* has a border-top: value otherwise */
  332.   gap: 0.75rem;
  333. }
  334.  
  335. /* Footer general button style */
  336. [class*="modalContent"] [class*="modalFooter"] button[type="button"][class*="modalButton"] {
  337.   height: auto;
  338.   padding: 0.75rem;
  339.   font: 600 1rem/0.7 Poppins, sans-serif;
  340.   background: #111;
  341.   border-color: unset;
  342.   box-shadow: unset;
  343.   color: #f9f9f9;
  344.   border: 1px solid;
  345.   border-radius: 999px;
  346.   transition: all 500ms;
  347. }
  348.  
  349. [class*="modalContent"] [class*="modalFooter"] button[type="button"][class*="modalButton"]::first-letter { text-transform: uppercase; }
  350.  
  351. [class*="modalContent"] [class*="modalFooter"] button[type="button"][class*="modalButton"]:hover {
  352.   background: #f9f9f9;
  353.   color: #111;
  354.   border: 1px solid #0000;
  355.   box-shadow: unset;
  356.   transform: unset;
  357. }
  358.  
  359. /* ✩ — Per footer button styling */
  360. /* Cancel */
  361. [class*="modalContent"] [class*="modalFooter"] button[type="button"][class*="modalButton"][class*="secondary"] {
  362.  
  363. }
  364. /* On hover */
  365. [class*="modalContent"] [class*="modalFooter"] button[type="button"][class*="modalButton"][class*="secondary"]:hover {
  366.  
  367. }
  368.  
  369. /* Delete All */
  370. [class*="modalContent"] [class*="modalFooter"] button[type="button"][class*="modalButton"][class*="danger"] {
  371.   color: #ef4444;
  372. }
  373. /* On hover */
  374. [class*="modalContent"] [class*="modalFooter"] button[type="button"][class*="modalButton"][class*="danger"]:hover {
  375.   background: #ef4444;
  376.   color: #111;
  377. }
  378.  
  379.  
  380.  
  381. /* ★ — NOTIFICATIONS LIST — ★ */
  382. /* Finally, after all that filler, this is the section that includes everything related to the actual notification boxes. */
  383. /* ✩ — Notification list main container */
  384. [class*="notificationsList"] {
  385.   max-height: 550px; /* don't make this too tall because phones exist. Default value is 450px */
  386. }
  387.  
  388.  
  389. /* ✩ — Scrollbar */
  390. /* It's highly advised to not modify scrollbars, if you do, make sure they are easily noticeable, avoid low contrast colors, and specially avoid hiding them, it's bad practice, most people need the visual to know something can be scrolled. */
  391. /* Important to note that -webkit- scrollbars are non-standard, some browsers will NOT show the style you input below. */
  392. [class*="notificationsList"]::-webkit-scrollbar {
  393.  
  394. }
  395.  
  396. [class*="notificationsList"]::-webkit-scrollbar-thumb {
  397.   background: #f9f9f9;
  398. }
  399.  
  400. [class*="notificationsList"]::-webkit-scrollbar-track {
  401.  
  402. }
  403.  
  404.  
  405.  
  406. /* ★ — Notification Item */
  407. /* ✩ — Main box */
  408. #root [class*="notificationItem"] {
  409.   background: unset;
  410.   padding: 0.5rem;
  411.   gap: 0.5rem;
  412.   border-bottom: 1px solid #f9f9f980;
  413.   align-items: center;
  414.   transition: unset;
  415. }
  416. #root [class*="notificationItem"]:last-child,
  417. #root [class*="notificationItem"]:nth-last-child(2):has(+ [class*="loadMoreWrapper"]) { border-bottom: unset; }
  418.  
  419. /* ✩ — Unread Indicator */
  420. [class*="unreadIndicator"] {
  421.   width: 6rem; /* default is 3px. Don't make this too wide if you're going to use a solid color. */
  422.   background: radial-gradient(circle at 6rem 50%, #0000 62.5%, #f9f9f940) 200% 200%;
  423.   box-shadow: unset;
  424.   border-radius: unset;
  425. }
  426.  
  427. /* ✩ — Avatar section */
  428. /* Fix */
  429. [class*="avatarSection"] { display: contents; }
  430.  
  431. /* Actual avatar section */
  432. [class*="avatarContainer"] {
  433.   min-width: 5rem;
  434.   height: auto;
  435.   aspect-ratio: 1;
  436.   transition: transform 500ms, filter 500ms;
  437. }
  438.  
  439. /* Character avatar */
  440. [class*="characterAvatar"] {
  441.   width: 4rem; /* can't be wider than previous selector */
  442.   height: auto;
  443.   aspect-ratio: 1;
  444.   border-radius: 999px;
  445.   object-position: top;
  446.   box-shadow: unset;
  447.   border: unset;
  448. }
  449.  
  450. /* User avatar */
  451. [class*="userAvatar"] {
  452.   bottom: 0;
  453.   right: 0; /* controls position */
  454.   min-width: unset;
  455.   width: 2rem;
  456.   aspect-ratio: 1;
  457.   height: auto;
  458.   object-position: top;
  459.   border-radius: 999px;
  460.   box-shadow: unset;
  461.   border: unset;
  462. }
  463.  
  464. /* ★ — Dogshit hover effects for avatar section */
  465. /* I REALLY can't stress enough how bad these effects are. Please leave this section as is. I only left the one for the clickable section since it is actually useful to convey it's clickable. */
  466. /* When hovering the notification item class */
  467. [class*="notificationItem"]:hover *:is([class*="characterAvatar"], [class*="userAvatar"]) {
  468.   box-shadow: unset;
  469.   transform: unset;
  470. }
  471.  
  472. /* When hovering clickable avatar container */
  473. a[class*="avatarContainer"]:hover {
  474.   transform: scale(1.05);
  475.   filter: drop-shadow(0 0 0.5rem #f9f9f940);
  476. }
  477.  
  478.  
  479.  
  480. /* ★ — Notification content */
  481. /* Fix */
  482. [class*="contentWrapper"] [class*="content"] { display: contents; }
  483.  
  484. /* ✩ — Main container for notification content */
  485. /* General style, this will act as the "default style" meaning, the seen notifications. The unread variant will overwrite any styling you add to this. */
  486. [class*="contentWrapper"] {
  487.   flex-flow: column;
  488.   padding: 0.5rem 0.75rem;
  489.   gap: 0.5rem;
  490.   border-radius: 1rem;
  491. }
  492. /* Variant for unread notifications */
  493. [class*="contentWrapperUnread"] {
  494.   background: #f9f9f908;
  495. }
  496.  
  497. /* ✩ — Pointer effects for Main Container */
  498. [class*="contentWrapper"]:hover {
  499.   background: #f9f9f916;
  500. }
  501.  
  502. /* Custom effect to dim read notifications */
  503. [class*="notificationItem"]:not(:has([class*="unreadIndicator"])) *:is([class*="avatarContainer"], [class*="contentWrapper"]) { filter: grayscale(0.75) opacity(0.5); }
  504.  
  505.  
  506.  
  507. /* ★ — Notification content text styling */
  508. /* ✩ — Notification title */
  509. /* General style, this will act as the "default style" meaning, the seen notifications. The unread variant will overwrite any styling you add to this. */
  510. [class*="_subject_"] {
  511.   font: 600 0.875rem 'Poppins', sans-serif;
  512.   color: #f9f9f9;
  513. }
  514.  
  515. /* Unread variant */
  516. [class*="subjectUnread"] {
  517.   background-color: salmon;
  518. }
  519.  
  520.  
  521. /* ✩ — Notification body */
  522. /* General style, this will act as the "default style" meaning, the seen notifications. The unread variant will overwrite any styling you add to this. */
  523. [class*="_body_"] {
  524.   font: 400 0.75rem 'Poppins', sans-serif;
  525.   color: #f9f9f9;
  526. }
  527.  
  528. /* Unread variant */
  529. [class*="subjectUnread"] + [class*="_body_"] {
  530.   /* No clue what use case this could have. */
  531. }
  532.  
  533.  
  534. /* ✩ — Notification title */
  535. /* General style, this will act as the "default style" meaning, the seen notifications. The unread variant will overwrite any styling you add to this. */
  536. [class*="_timestamp_"] {
  537.   font: 400 0.75rem 'Poppins', sans-serif;
  538.   color: #f9f9f980;
  539. }
  540.  
  541. /* Unread variant */
  542. [class*="subjectUnread"] ~ [class*="_timestamp_"] {
  543.   /* No clue what use case this could have. */
  544. }
  545.  
  546.  
  547.  
  548. /* ★ — Archive button section */
  549. /* This is a floating button that only appears when you hover over the notification. */
  550. [class*="archiveSection"] {
  551.   padding: 1rem;
  552.   top: unset;
  553.   bottom: 0;
  554. }
  555.  
  556. /* Section pointer effect */
  557. [class*="notificationItem"]:hover [class*="archiveSection"] {
  558.   /* This is just a transition between opacity: 0 & 1 */
  559. }
  560.  
  561.  
  562. /* ✩ — Archive button */
  563.  [class*="archiveButton"] {
  564.   width: 2rem;
  565.   height: 2rem;
  566.   padding: 0.25rem;
  567.   font-size: 1rem;
  568.   background: #111;
  569.   border-color: unset;
  570.   box-shadow: unset;
  571.   color: #ef4444;
  572.   border: 1px solid;
  573.   border-radius: 999px;
  574.   transition: all 500ms;
  575. }
  576. /* On hover */
  577. [class*="archiveButton"]:hover {
  578.   background: #ef4444;
  579.   color: #111;
  580.   border: 1px solid #0000;
  581.   box-shadow: unset;
  582.   transform: scale(1.05);
  583. }
  584.  
  585.  
  586.  
  587. /* ★ — Load More Section */
  588. /* ✩ — Main container */
  589. [class*="loadMoreWrapper"] {
  590.   padding: 0.5rem;
  591.   border-top: 1px solid #f9f9f980;
  592. }
  593.  
  594.  
  595. /* ✩ — Load More Button */
  596. [class*="loadMoreButton"] {
  597.   width: 100%;
  598.   height: auto;
  599.   padding: 0.75rem 0.875rem;
  600.   font: 600 1rem/0.7 Poppins, sans-serif;
  601.   background: #111;
  602.   border-color: unset;
  603.   box-shadow: unset;
  604.   color: #f9f9f9;
  605.   border: 1px solid;
  606.   border-radius: 999px;
  607.   transition: all 500ms;
  608. }
  609.  
  610. [class*="loadMoreButton"]::first-letter { text-transform: uppercase; }
  611.  
  612. #root [class*="loadMoreButton"]:hover {
  613.   background: #f9f9f9;
  614.   color: #111;
  615.   border: 1px solid #0000;
  616.   box-shadow: unset;
  617.   transform: unset;
  618. }
  619.  
  620.  
  621. /* ★ — END OF TEMPLATE — ★ */
  622.  
  623. </style>
Advertisement
Add Comment
Please, Sign In to add comment