radicaloptimism

Bot card flip effect generic template

Jul 20th, 2025 (edited)
3,914
1
Never
19
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 6.58 KB | None | 1 0
  1. I kiss girls on business hours <----- TRUE!
  2.  
  3. <style>
  4.  
  5. /* A simple look for your bot cards that uses the flip card effect! please credit @tigerdropped if you end up using it <3 */
  6.  
  7. /* UPDATED 23/07/25: New colors! Now anchors ALL elements to labels, this code should NEVER break even if the site updates classes. */
  8.  
  9. /* This is a FULLY STYLED template, changing stuff around might be more difficult than intended. I will work on new templates eventually. */
  10.  
  11. /* Removing all bot card backgrounds */
  12. .pp-cc-wrapper,
  13. .pp-cc-wrapper > div:empty {
  14.   background: transparent !important;
  15. }
  16.  
  17. /* Removing box shadow */
  18. .pp-cc-wrapper:hover {
  19.   box-shadow: none;
  20. }
  21.  
  22. /* Spacing between items */
  23. .pp-cc-wrapper > div:not(:empty) {
  24.   gap: 0;
  25. }
  26.  
  27. /* Card background (front and back) */
  28. .pp-cc-wrapper > div:not(:empty)::before {
  29.   position: absolute;
  30.   content: "";
  31.   inset: 0;
  32.   z-index: -2;
  33.   background: #111;
  34.   border-radius: 10px;
  35.   transition: all 500ms;
  36. }
  37.  
  38. /* Adding perspective to .css-1s5evre and its first a element */
  39. .pp-cc-wrapper > div:not(:empty),
  40. .pp-cc-wrapper > div:not(:empty) > a:not(a + a) {
  41.   position: relative;
  42.   perspective: 1000px;
  43. }
  44.  
  45. /* Selecting all elements inside so they can be smoothly animated */
  46. .pp-cc-wrapper > div:not(:empty) * {
  47.   transition: all 500ms;
  48. }
  49.  
  50. .pp-cc-wrapper > div:not(:empty) > a:not(a + a) {
  51.   display: flex;
  52.   flex-flow: column-reverse nowrap;
  53. }
  54.  
  55. /* Go button */
  56. .css-1s5evre > a:first-child::after {
  57.   position: absolute;
  58.   top: 15px;
  59.   right: 13px;
  60.   padding: 4px 8px;
  61.   font-family: Lato;
  62.   font-size: 0.8rem;
  63.   border-radius: 32px;
  64.   border: 2px solid #111;
  65.   content: "Go to bot →";
  66.   color: #111;
  67.   backface-visibility: hidden;
  68.   transform: rotateY(180deg);
  69.   transition: all 500ms;
  70. }
  71.  
  72. .pp-cc-wrapper > div:not(:empty) > a:not(a + a):hover::after {
  73.   background: #111;
  74.   color: #f9f9f9;
  75. }
  76.  
  77. /* Bot image container */
  78. div:has(> .pp-cc-avatar) {
  79.   position: relative;
  80.   margin: 30px 15px 0 15px;
  81.   display: flex;
  82.   justify-content: center;
  83.   align-items: center;
  84.   backface-visibility: hidden;
  85.   transform: rotateY(0);
  86.   width: calc(100% - 30px);
  87.   aspect-ratio: 1 / 1;
  88.   filter: drop-shadow(0 3px 5px #000000BF);
  89. }
  90.  
  91. /* Stupid thing */
  92. div:has(> .pp-cc-avatar)::before {
  93.   display: none;
  94. }
  95.  
  96. /* Bot image background, this extends after flipping */
  97. .pp-cc-wrapper > div:not(:empty)::after {
  98.   position: absolute;
  99.   content: "";
  100.   top: 0; left: 0;
  101.   border-radius: 10px 10px 0 0;
  102.   width: 100%;
  103.   height: 110px;
  104.   z-index: -1;
  105.   background-image: linear-gradient(-20deg, #ddd6f3 0%, #faaca8 100%, #faaca8 100%);
  106.   transition: all 500ms;
  107. }
  108.  
  109. /* Bot image fixes */
  110. .pp-cc-avatar {
  111.   width: 100%;
  112.   aspect-ratio: 1 / 1;
  113.   border-radius: 50%;
  114.   object-position: top;
  115.   inset: unset;
  116. }
  117.  
  118. /* Hiding elements */
  119. .pp-cc-wrapper > div:not(:empty) > a + a, /* username */
  120. .pp-cc-star-line, /* line and star */
  121. div:has(> .pp-cc-tokens-count), /* token count */
  122. div:has(> .pp-cc-tokens-count) ~ div /* all event related items */ {
  123.   display: none;
  124. }
  125.  
  126. /* targetting all bot name containers */
  127. div:has(> .pp-cc-name) {
  128.   width: 100%;
  129.   /* You can either keep it on the flow, or use position: absolute to move it anywhere. */
  130.   backface-visibility: hidden;
  131.   padding: 10px 10px 0 10px;
  132. }
  133.  
  134. /* All bot names style */
  135. .pp-cc-name {
  136.   color: #f9f9f9;
  137.   text-align: center;
  138.   font-size: 1rem;
  139.   font-family: Lato;
  140.   font-weight: bold;
  141.   letter-spacing: unset;
  142.   text-transform: unset;
  143.   text-shadow: unset;
  144. }
  145.  
  146. /* Tags container */
  147. .pp-cc-tags {
  148.   position: absolute;
  149.   backface-visibility: hidden;
  150.   transform: rotateY(180deg); /* already rotated, hence will be hidden */
  151.   pointer-events: none;
  152.   position: absolute;
  153.   bottom: 0;
  154.   height: 100%;
  155.   padding: 0;
  156.   margin: 0;
  157.   display: flex;
  158.   align-items: flex-end;
  159.   justify-content: center;
  160. }
  161.  
  162. .pp-cc-tags a {
  163.   pointer-events: auto;
  164. }
  165.  
  166. /* Tag list container */
  167. .pp-cc-tags > ul {
  168.   margin: 10px;
  169.   justify-content: center;
  170.   align-items: center;
  171. }
  172.  
  173. /* Limitless container */
  174. li:has(> .pp-tag-limitless) {
  175.  margin: 0;
  176.  flex: 1 1 100%;
  177. }
  178.  
  179. /* Normal tags container fixes */
  180. .pp-cc-tags li {
  181.   margin: 0;
  182. }
  183.  
  184. /* All tags style */
  185. .pp-cc-tags span {
  186.   display: flex;
  187.   line-height: 1;
  188.   width: 100%;
  189.   min-height: unset;
  190.   height: auto;
  191.   padding: 4px 8px;
  192.   border: 2px solid #0000;
  193.   border-radius: 32px;
  194.   background: #111;
  195.   font-family: Lato;
  196.   color: #f9f9f9;
  197. }
  198.  
  199. /* All tags hover */
  200. .pp-cc-tags a:hover span {
  201.   border: 2px solid #111;
  202.   background: transparent;
  203.   color: #111;
  204. }
  205.  
  206. /* Description box */
  207. div:has(> .pp-cc-description) {
  208.   margin: 10px;
  209.   padding: 5px 0;
  210.   padding-left: 8px;
  211.   border-left: 2px solid #f9f9f9;
  212.   backface-visibility: hidden;
  213.   z-index: 1;
  214. }
  215.  
  216. /* Description style */
  217. div:has(> .pp-cc-description) * {
  218.   color: #f9f9f9 !important;
  219.   font-family: Lato !important;
  220.   font-weight: light;
  221.   text-align: justify;
  222. }
  223.  
  224. /* Chat count */
  225.  
  226. div:has(> span > .pp-cc-ribbon) {
  227.   top: 6px;
  228.   right: unset;
  229.   width: 100%;
  230.   backface-visibility: hidden;
  231. }
  232.  
  233. /* Fixes */
  234. div:has(> span > .pp-cc-ribbon) > span {
  235.   width: 100%;
  236.   display: flex;
  237.   justify-content: center;
  238. }
  239.  
  240. .pp-cc-ribbon,
  241. .pp-cc-ribbon-wrap {
  242.   display: contents;
  243. }
  244.  
  245. .pp-cc-chats {
  246.   color: #111;
  247.   font-family: Lato;
  248.   background: transparent;
  249. }
  250.  
  251. /* Styling other elements (like the hidden ones) is up to you, decide if you want them to flip or not. */
  252.  
  253. /* we use the bot card main container selector for our hover effects */
  254. .pp-cc-wrapper:hover :is(
  255.   div:has(> .pp-cc-avatar),
  256.   div:has(> .pp-cc-name),
  257.   div:has(> .pp-cc-description),
  258.   div:has(> span > .pp-cc-ribbon)
  259. ),
  260. .pp-cc-wrapper:hover > .css-1s5evre::before,
  261. .pp-cc-wrapper:hover > .css-1s5evre::after {
  262.   transform: rotateY(180deg);
  263.   /* the "front-side" of the card will be hidden after hovering, you can nest more elements using commas inside the :is(), but you can't nest ::before or ::after inside it */
  264. }
  265.  
  266. .pp-cc-wrapper:hover > div:not(:empty)::after {
  267.   height: 100%;
  268.   border-radius: 10px;
  269. }
  270.  
  271. .pp-cc-wrapper:hover .pp-cc-tags,
  272. .pp-cc-wrapper:hover > div:not(:empty) > a:first-child::after {
  273.   transform: rotateY(360deg); /* the back-side will be visible, you can nest as much flipped elements as you want in this selector so they can be shown on hover. */
  274. }
  275.  
  276. /* SAFE TAP FOR MOBILE */
  277.  
  278. .pp-cc-wrapper::before {
  279.   z-index: 5;
  280.   content: "";
  281.   position: absolute;
  282.   width: 100%;
  283.   height: 100%;
  284.   top: 0;
  285.   left: 0;
  286.   pointer-events: auto;
  287.   transition: all 200ms;
  288. }
  289.  
  290. .pp-cc-wrapper:hover::before {
  291.   z-index: -2;
  292. }
  293.  
  294.  
  295. </style>
Advertisement
Comments
  • # text 0.20 KB | 1 0
    1. Please remember to credit my profile or at least link this resource so others can use it. There's so many profiles doing the flip effect WRONG, and they tend to be borderline unusable/unreadable. Thank you.
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment