Advertisement
inklimg

/~angel code

Mar 9th, 2024 (edited)
1,308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 11.83 KB | None | 0 0
  1. /*
  2. * ángel's profile CSS but with comments explaining everything (shocked emoji)
  3.  
  4. * last updated April 6th, 2024 3:36 PM EST
  5.  
  6. * also this is prone to change a lot so don't copy and paste UNLESS you're okay with just using the current code (and if you do credit me!! and remove all the comments I think they break everything)... I'm mostly just sharing the source so that people get an understanding of how to customize their profile ^_^
  7.  
  8. * to customize your profile you put CSS into the about by using <style> and </style> tags
  9.  
  10. * 07/30/24 obviously this is outdated but i'm gonna keep it for archiving purposes
  11. */
  12.  
  13. /* header font */
  14. @font-face {
  15.     font-family: 'Akira'; /* ok so just to get this out of the way using double quotes (") broke everything so I switched everything to single quotes (') */
  16.     src: url('https://file.garden/ZRgh3nzfnhFDJvPp/Akira-Expanded-Demo.otf') format('opentype');
  17. }  
  18.  
  19. /* font for my name in the about */
  20. @font-face {
  21.     font-family: 'Xcelsion Italic';
  22.     src: url('https://file.garden/ZRgh3nzfnhFDJvPp/xcelsionital.otf') format('opentype');
  23. }
  24.  
  25. /* body font */
  26. @font-face {
  27.     font-family: 'Nexa';
  28.     src: url('https://file.garden/ZRgh3nzfnhFDJvPp/Nexa-Heavy.ttf') format('truetype');
  29. }
  30.  
  31. /* colors I reuse a lot */
  32. :root {
  33.     --blue1: hsla(218, 56%, 84%, 1); /* accent color 1 */
  34.     --blue2: hsla(218, 55%, 64%, 1); /* accent color 2 */
  35.     --m-color: hsla(0, 0%, 100%, 1); /* main color */
  36. }
  37.  
  38. /* a way to declare variables! I saw on stack overflow that you can use this to animate radial gradients, unfortunately firefox android doesnt support this so... sorry firefox android users. Anyways I used this variable for the y-position of the background gradient */
  39. @property --y {
  40.     syntax: '<percentage>'; /* this means that it's a percentage */
  41.     inherits: false; /* this variable cannot be inherited */
  42.     initial-value: 0%; /* this is what it's value is */
  43. }
  44.  
  45. html,
  46. body {
  47.     background: transparent; /* make sure background isnt covering up ::after element */
  48.     color: hsla(0, 0%, 20%, 1) !important; /* main text color */
  49.     line-height: 1.25 !important; /* make line spacing a little less than the default */
  50. }  
  51.  
  52. /* actual background color, I used a pseudo-element so that I could animate it */
  53. body::after {
  54.     content: '';
  55.     display: block;
  56.     min-height: 100dvh;
  57.     width: 100vw;
  58.     background-image: radial-gradient(75% 75% at center var(--y), var(--m-color) 10%, var(--blue1) 60% 100%); /* background gradient, 75% 75% is the size of the circle, "at center var(--y)" means that it's horizontally centered and it's y-position is determined by the --y variable */
  59.     animation: bgmove 15s infinite linear; /* here is the animation */
  60.     position: fixed; /* make sure it doesn't move when you scroll */
  61.     top: 0;
  62.     left: 0;
  63.     z-index: -1; /* make sure its behind EVERYTHING */
  64. }
  65.  
  66. /* background move animation */
  67. @keyframes bgmove {
  68.     /* change the value of --y for this animation */
  69.     0% {
  70.         --y: -50%;
  71.     }
  72.     50% {
  73.         --y: 100%;
  74.     }
  75.     100% {
  76.         --y: 150%;
  77.     }
  78. }
  79.    
  80. *:not(body, h2) { /* this selector selects everything that isnt the username basically */
  81.     font-family: 'Nexa' !important; /* apply font to everything... that isn't a header */
  82.     perspective: 1000px; /* this gives the rotating that I did on the main part a more 3D effect. Why did I apply it to everything? I didn't know what to apply it to because no inspect element */
  83. }
  84.  
  85. /* the container for everything excluding the top bar */
  86. main {
  87.     padding: 0.5rem !important; /* I added the padding so that on mobile the entire thing wouldnt be touching the sides of the screen */
  88.     width: auto !important; /* not entirely sure why i added this */
  89.     max-width: 500px !important; /* set a MAX-WIDTH so that it isnt too big for the screen on mobile, and also because I wanted it to be smaller than the default */
  90.     transform: rotateY(15deg); /* cool effect */
  91.     margin-top: 1.5rem !important; /* I didn't like how close it was to touching the top bar */
  92. }
  93.  
  94. /* username header */
  95. h2.no-margin {
  96.     font-family: 'Akira'; /* give header font */
  97.     text-transform: capitalize; /* make first letter of header capitalized */
  98.     margin-bottom: -0.5rem !important; /* make header closer to main box */
  99.     font-size: 3rem !important; /* make header text size bigger */
  100.     filter: drop-shadow(1px 1px 0 var(--blue2)) drop-shadow(1px 1px 0 var(--blue2)) drop-shadow(1px 1px 0 var(--blue2)) drop-shadow(1px 1px 0 var(--blue1)) drop-shadow(1px 1px 0 var(--blue1)) drop-shadow(1px 1px 0 var(--blue1)); /* cool drop shadow */
  101. }
  102.  
  103. /* cloud emoji before my user */
  104. h2.no-margin::before {
  105.     content: '\2601'; /* hex code for cloud emoji */
  106.     display: inline-block;
  107.     height: 1em;
  108.     width: 1em; /* using em so its relative to the size of the header text */
  109.     margin-right: 0.75rem; /* make it further away from text */
  110.     /* I am too lazy to find pixels. the styles below just make the cloud emoji pure white */
  111.     color: transparent; /* i guess when you use background-clip: text; the color needs to be transparent */
  112.     background: var(--m-color);
  113.     background-clip: text;
  114. }
  115.  
  116. /* horizontal rulers outside of main box | profile picture | text under nickname that shows user | table headers */
  117. hr:not(.card *), .avatar, #user-real-name, thead {
  118.     display: none !important; /* hide all of that */
  119. }
  120.  
  121. /* divider that's inside of the main box */
  122. .card hr {
  123.     height: 4px !important; /* "width" of divider */
  124.     border: none !important; /* instead of using border properties, I just made it a block so that i could make it a gradient */
  125.     background: linear-gradient(to right, var(--m-color) 0%, var(--blue1) 25% 75%, var(--m-color) 100%);
  126. }
  127.  
  128. /* main box */
  129. .card:not(#description) { /* every card that is not the description (the about area) */
  130.     --card-bg: var(--m-color); /* card background variable. its just white */
  131.     background: var(--card-bg) !important;
  132.     border-radius: 30px !important;
  133.     box-shadow: 0 0 5px 0 var(--card-bg), 0 0 10px 0 var(--card-bg), 0 0 14px 0 var(--card-bg), 0 0 14px 0 var(--card-bg), 0 -15px 5px -10px var(--blue1); /* blurry box effect */
  134.     padding: 0.9rem !important;
  135.     margin: 0 0 1rem 0 !important; /* make it further away from the links at the bottom */
  136. }
  137.  
  138. /* #description is the container for the about! I never thought I'd use ::first-line but here we are */
  139. #description .flex-item::first-line {
  140.     line-height: 0.8 !important; /* make the line height of ONLY the first line a little less since the font size for my name makes it taller than usual */
  141. }
  142.  
  143. /* my name in the about!!! */
  144. #description strong {
  145.     font-family: 'Xcelsion Italic' !important;
  146.     font-size: 1.5em;
  147.     /* gradient text */
  148.     color: transparent;
  149.     background-image: linear-gradient(to right, var(--blue1), var(--blue2));
  150.     background-clip: text;
  151. }
  152.  
  153. /* the container for the 2 drop downs that show stats/info */
  154. #stats-or-info {
  155.     display: flex; /* put both of the dropdowns next to each other */
  156.     flex-direction: row; /* make sure its left to right and not top to bottom */
  157. }
  158.  
  159. /* the drop downs */
  160. #stats-or-info details {
  161.     width: 50%; /* make them both half of the width */
  162.     box-shadow: 0 0 10px -5px lightgray; /* cool shadow */
  163.     overflow: hidden;
  164.     border-radius: 30px !important;
  165. }
  166.  
  167. /* change border color of everything inside of the drop downs including the drop down menus themself */
  168. #stats-or-info :is(details, details *) {
  169.     border-color: var(--blue1);
  170. }
  171.  
  172. /* make everything related to the dropdowns have a white background */
  173. #description, #stats-or-info details, #stats-or-info details :is(summary, table, table td, table tr) {
  174.     background: white !important;
  175. }
  176.  
  177. /* animation for when you open the dropdown */
  178. details[open] table {
  179.     animation: grow 0.5s ease 1 forwards;
  180. }
  181.  
  182. details table tr:last-child(2) {
  183.     border-bottom: none;
  184. }
  185.  
  186. /* "role: /MEMBER/" thing AND buttons (aside from the one that opens the menu in the top left corner). I wanted them to be styled the same way */
  187. button:not([title='Menu']), .chip.badge {
  188.     background: radial-gradient(100% 100% at top, hsla(218, 57%, 95%, 1) 40%, hsla(218, 60%, 80%, 1) 79%) !important; /* radial gradient to give a sort of shiny effect */
  189.     box-shadow: inset 0 -1px 2px 0.5px var(--m-color); /* inset box shadow to add a highlight */
  190.     border: 1.5px solid var(--blue2) !important;
  191.     display: inline-block !important;
  192.     padding: 0 0.75rem !important;
  193.     border-radius: 10px !important;
  194. }
  195.  
  196. /* give links, buttons, the member thing, and svgs all the same text color. the svg part is mostly just to target the settings icon. you know I always wondered why the property for text color is just "color" and not "font-color" or something */
  197. a, button, .chip.badge, svg {
  198.     color: var(--blue2);
  199. }
  200.  
  201. /* give the stats/info container, about section, all paragraphs, and flex items paddings and margins of 0 */
  202. #stats-or-info, #description, p, .flex-item {
  203.     margin: 0 !important;
  204.     padding: 0 !important;
  205. }
  206.  
  207. /* top bar */
  208. .toolbar {
  209.     background: linear-gradient(to right, var(--blue1), var(--m-color));
  210. }
  211.  
  212. /* button that opens the menu */
  213. button[title='Menu'] {
  214.     border-style: hidden;
  215.     border-right-style: solid;
  216. }
  217.  
  218. /* change the border of the top bar */
  219. .toolbar :is(.button, button) { /* so you might notice I added ".button" here too, that's because if you look at the top bar theres a border in between "Stellular" and "angel". SO I needed to use border properties to adjust both that and the border along the bottom of the entire top bar */
  220.     border-color: hsla(218, 57%, 70%, 1) !important;
  221.     border-width: 2px !important;
  222.     transition: opacity 0.5s; /* this transition is really just for the buttons but I didnt want to add a whole other declaration */
  223. }  
  224.  
  225. /* hover effect for buttons in top bar */  
  226. :is(.button, button):hover {
  227.     opacity: 50%; /* make them 50% transparent */
  228.     /* these next styles were added because there's already a style implemented for when you hover the buttons which changes the background and border color, so here I reset them to be what I want */
  229.     border-color: hsla(218, 57%, 70%, 1) !important;
  230.     background: inherit !important;
  231. }  
  232.  
  233. /* the rest of this is just styling my own stuff that I added in the markdown */
  234.  
  235. /* container for iframe and text */
  236. .about-container {
  237.     gap: 0.5rem; /* make sure iframe and text arent touching */
  238. }
  239.  
  240. /* make sure all flex items are half the width of container (since theres only 2 of them) */
  241. .flex-item {
  242.     display: block; /* just to be sure, since e#class# uses a <span> element which is not a block by default, meaning you can't add a set height and width */
  243.     width: 50%;
  244. }
  245.  
  246. /* youtube video frame */
  247. iframe { /* iframes are weird */
  248.     display: block; /* why aren't these blocks by default??? */
  249.     height: 100%;
  250.     border: 2.5px solid var(--blue1); /* WHY do they have default borders???? anyways this is my custom border */
  251.     border-radius: 10px;
  252. }
  253.  
  254. /* grow from top animation */
  255. @keyframes grow {
  256.     0% {
  257.         transform: scale(0%);
  258.         transform-origin: top center;
  259.     }
  260.     100% {
  261.         transform: scale(100%);
  262.         transform-origin: top center;
  263.     }
  264. }
  265.  
  266. /* responsiveness */
  267. @media screen and (max-width: 600px) {
  268.     main {
  269.         width: 93vw !important; /* make the "main" (basically everything excluding the top bar) 90% of the screen width on small mobile devices */
  270.     }  
  271.     #description .flex, #stats-or-info {
  272.         flex-direction: column; /* on small mobile screens, make the iframe and the text stack on top of each other instead of be next to each other as well as the drop down menus */
  273.     }
  274.     .flex-item, #stats-or-info details {
  275.         width: 100%; /* make flex items 100% the width of the container, since the flex container is a column on mobile */
  276.     }
  277. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement