Ok thanks. Iāve always used āCompiled CSSā when working and now I wonder if that is a mistake.
Here is one example. I built a custom Intercom-like dashboard and it only works when compiled CSS is turned on.
And With Compiled CSS Turned Off
Below Iāve attached the CSS for this app. Maybe a quick surface scan and you could tell what Iāve been doing wrong. Ultimately Iād love to integrate your solution from this thread and moving forward use the best practices regarding CSS.
Summary of CSS
.background {
position:fixed;
margin-top:0;
background:#5498dc;
width:100%;
height:100%;
top:5.5em;
right:0;
z-index:-1;
}
.hover-markup,
.hover-buyin,
.hover-available {
position: relative;
display: inline-block;
}
.tooltiptext,
.tooltiptext2,
.tooltiptext3 {
visibility: hidden;
width: 300px;
background-color: white;
color: #4a4f40;
text-align: center;
padding: 20px;
border-radius: 5px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
font-family: Arial, sans-serif;
font-size: 12px;
line-height: 1.5;
position: absolute;
bottom: 115%;
left: 40%;
}
.hover-markup:hover .tooltiptext,
.hover-buyin:hover .tooltiptext,
.hover-available:hover .tooltiptext,
.hover-markup:hover .tooltiptext2,
.hover-buyin:hover .tooltiptext2,
.hover-available:hover .tooltiptext2,
.hover-markup:hover .tooltiptext3,
.hover-buyin:hover .tooltiptext3,
.hover-available:hover .tooltiptext3 {
visibility: visible;
opacity: 1;
}
@keyframes popIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.hover-markup:hover .tooltiptext,
.hover-buyin:hover .tooltiptext,
.hover-available:hover .tooltiptext,
.hover-markup:hover .tooltiptext2,
.hover-buyin:hover .tooltiptext2,
.hover-available:hover .tooltiptext2,
.hover-markup:hover .tooltiptext3,
.hover-buyin:hover .tooltiptext3,
.hover-available:hover .tooltiptext3 {
animation: popIn 0.2s forwards;
}
.tooltiptext2 {
z-index: 200;
left: -50%;
}
.tooltiptext3 {
z-index: 200;
left: -250%;
}
.library-default ul {
border-style: none;
}
.library-default li {
border-width: 0px;
font-weight: normal;
}
.library-default li.selected {
font-weight: 700;
border-bottom: 2px solid var(--gv-text-contextual-accent);
color: var(--gv-text-contextual-accent);
}
.overlay {
position: relative;
top: 0px;
z-index: 9999;
margin-top: -45px;
}
@media (max-width: 900px) {
.overlay {
margin-top: -92px;
}
}
div[class*="container-padding-md"] {
max-width: 92vw;
}
@media (max-width: 800px) {
div[class*="container-padding-md"] {
max-width: 100vw;
}
}
div[class*="single-column justify-center"],
div[class*="renderer___StyledDiv6"] {
max-width: 92vw;
}
@media (max-width: 1000px) {
div[class*="single-column justify-center"],
div[class*="renderer___StyledDiv6"] {
max-width: 100vw;
}
}
.clips {
position: relative;
top: 26px;
z-index: 999;
margin-top: 0px;
left: 220px;
}
@media (max-width: 500px) {
.clips {
left: 340px;
}
}
.dashboard {
z-index: 101;
}
.avatars {
position: relative;
top: 23px;
left: -21px;
z-index: 100;
margin-top: 0px;
}
@media (max-width: 1030px) {
.avatars {
top: -2px;
left: 13px;
}
}
.piece {
top: 12px;
}
@media (max-width: 2500px) {
.create {
top: -14px;
}
}
.custom-progress [class*="wire-page-progress___StyledDiv"] > p {
display: none;
}
.library-view ul {
border-style: none;
}
.library-view li {
border-width: 0px;
}
.library-view li.selected, .library-view:not(:has(.selected)) li:first-child {
font-weight: 700;
background: none;
border-radius: 0px;
border-bottom: 2px solid var(--gv-text-contextual-accent);
color: var(--gv-text-contextual-accent);
}
.tags {
position: absolute;
left: -9999px;
}
.imgcc section > div > div > div:has(button[aria-label="1"]) {
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 200 200' xml:space='preserve' height='200px' width='200px'><rect width='200' height='200' style='fill:%23731258;' /></svg>");
}
.full-container {
height: 100%;
}
.library-main div[class*="card-collection-card___StyledDiv6"]:has(button[aria-label="ā
"]) {
background: #731258;
}
.dashboard{
z-index: 999;
}
.buy {
position: relative;
top: 26px;
z-index: 100;
margin-top: 0px;
}
.arrows {
top: 47px;
z-index: 999;
margin-top: 0px;
left: 6px;
position: relative;
}
@media (max-width: 500px) {
.arrows {
top: 88px;
}
}
.stickyfilters {
position: -webkit-sticky;
position: sticky;
top: 0px;
z-index: 9;
margin-top: 0px;
}
@media (max-width: 1137px) {
.stickyfilters {
position: relative;
}
}
.center-choice div {
align-items: center;
}
.writer {
display: inline-block;
overflow: hidden;
border-right: .07em solid black;
white-space: nowrap;
letter-spacing: .03em;
line-height: 1.2;
padding: 0.003em 0;
width: auto;
max-width: 0;
animation:
typing 2s steps(30, end) forwards,
blink-caret .75s step-end infinite;
}
@keyframes typing {
from { max-width: 0; }
to { max-width: 100%; }
}
@keyframes blink-caret {
from, to { border-color: transparent; }
50% { border-color: white; }
}
.grid .oneToOne {
grid-template-columns: repeat(2, minmax(0px, 1fr));
}
.amount {
position: relative;
top: 23px;
z-index: 100;
margin-top: 0px;
left: 0px;
}
.key-input-market textarea[class*="wire-field"] {
-webkit-text-security: disc;
}
.key-input-market {
position: relative;
top: 23px;
z-index: 100;
margin-top: 0px;
left: 0px;
}
.regular-premium ul {
border-style: none;
}
.regular-premium li {
border-width: 0px;
}
.regular-premium li.selected, .library-view:not(:has(.selected)) li:first-child {
font-weight: 700;
background: none;
border-radius: 0px;
border-bottom: 2px solid var(--gv-text-contextual-accent);
color: var(--gv-text-contextual-accent);
}
@keyframes pulse {
0% {
border-color: #731258;
transform: scale(1);
}
50% {
border-color: #9b3f6c; /* A lighter shade for the pulsing effect */
transform: scale(1.05);
}
100% {
border-color: #731258;
transform: scale(1);
}
}
.tooltip-container {
--background: #333333;
--color: #e8e8e8;
position: relative;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
font-size: 14px;
font-weight: 600;
color: white;
padding: 0.7em 1.8em;
border-radius: 8px;
text-transform: uppercase;
height: 35px;
width: 180px;
display: grid;
place-items: center;
border: 2px solid #731258;
animation: pulse 1.5s infinite;
}
.text {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: grid;
place-items: center;
transform-origin: -100%;
transform: scale(1);
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.tooltip-container span:last-child {
position: absolute;
top: 0%;
left: 100%;
width: 100%;
height: 100%;
border-radius: 8px;
opacity: 1;
background-color: var(--background);
z-index: -1;
border: 2px solid var(--background);
transform: scale(0);
transform-origin: 0;
transition: all 0.1s cubic-bezier(0.23, 1, 0.32, 1);
display: grid;
place-items: center;
}
.tooltip {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
padding: 0.1em 0.6em;
opacity: 0;
pointer-events: none;
transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
background: var(--background);
z-index: -1;
border-radius: 8px;
scale: 0;
transform-origin: 0 0;
text-transform: capitalize;
font-weight: 400;
font-size: 16px;
box-shadow: rgba(0, 0, 0, 0.25) 0 8px 15px;
}
.tooltip::before {
position: absolute;
content: "";
top: 100%;
left: 50%;
transform: translateX(-50%);
border-left: 0.3em solid transparent;
border-right: 0.3em solid transparent;
border-top: 0.3em solid var(--background);
}
.tooltip-container:hover .tooltip {
top: -100%;
opacity: 1;
visibility: visible;
pointer-events: auto;
scale: 1;
animation: shake .5s ease-in-out both;
}
.tooltip-container:hover {
box-shadow: rgba(0, 0, 0, 0.25) 0 8px 15px;
color: white;
border-color: transparent;
}
.tooltip-container:hover span:last-child {
transform: scale(1);
left: 0;
}
.tooltip-container:hover .text {
opacity: 0;
top: 0%;
left: 100%;
transform: scale(0);
}
@keyframes shake {
0% {
rotate: 0;
}
25% {
rotate: 7deg;
}
50% {
rotate: -7deg;
}
75% {
rotate: 1deg;
}
100% {
rotate: 0;
}
}
.start-here {
position: relative;
top: 32px;
z-index: 100;
margin-top: -32px;
}
.package {
position: relative;
top: 29px;
}
.hendonmob {
position: relative;
top: -47px;
left: 100px;
}
.intercom .oneToOne {
grid-template-columns: repeat(2, minmax(0px, 1fr));
}
.send-message-text {
font-size: 13px;
font-weight: bold;
transition: color 0.15s ease; /* Adjust the duration and easing as needed */
}
.send-message-text:hover {
color: #51a4ef;
}
@keyframes openAnimation {
0% {
transform: scale(0.5) translate(0, 0);
opacity: 0;
}
100% {
transform: scale(1) translate(0, 0);
opacity: 1;
}
}
.animated-window {
animation: openAnimation 0.25s ease-out;
transform-origin: bottom right;
}
@keyframes closeAnimation {
0% {
transform: scale(0.5) translate(0, 0);
opacity: 0;
}
100% {
transform: scale(1) translate(0, 0);
opacity: 1;
}
}
.animated-close {
animation: closeAnimation 0.1s ease-out;
transform-origin: bottom right;
animation-direction: reverse;
animation-fill-mode: forwards;
}
.animated-close-hidden {
display: none;
}
.marketplace {
top: -230px;
z-index: 100;
margin-top: -30px;
}
.signup {
top: -290px;
z-index: 100;
margin-top: -30px;
}
.hover-button {
position: absolute;
top: 30px;
right: -7px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.hover-button {
display: inline-block;
float: right;
margin-right: 17px;
background-color: transparent;
padding: 5px 10px;
border-radius: 10px;
font-family: Arial, sans-serif;
color: black;
cursor: pointer;
text-align: left;
padding-left: 10px;
font-size: 13px;
width: 325px;
transition: color 0.1s ease, background-color 0.1s ease;
position: relative;
}
.hover-button:hover {
color: #1E90FF;
background-color: rgba(173, 216, 230, 0.3);
}
.hover-button::after {
content: '';
position: absolute;
top: 50%;
right: 19px;
transform: translateY(-50%) rotate(45deg);
width: 6px; /* Adjusted size */
height: 6px; /* Adjusted size */
border-top: 1.5px solid #4285f4; /* Adjusted thickness */
border-right: 1.5px solid #4285f4; /* Adjusted thickness */
}
.new-button {
position: absolute;
top: 467px;
right: 15px;
text-align: right;
font-size: 22px;
font-family: poppins, serif;
z-index: 9;
white-space: nowrap;
overflow: hidden;
}
.new-button-two {
position: absolute;
top: 489px;
right: 15px;
text-align: right;
font-size: 22px;
font-family: poppins, serif;
z-index: 9;
white-space: nowrap;
overflow: hidden;
}
.new-window {
position: absolute;
top: -105px;
right: 17px;
text-align: right;
font-size: 22px;
font-family: poppins, serif;
z-index: -2;
white-space: nowrap;
overflow: hidden;
}
.message {
position: absolute;
top: 119px;
right: 17px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.whatisstake {
position: absolute;
top: -101px;
right: 21px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.howdoistake {
position: absolute;
top: -64px;
right: 21px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.newplayerprofile {
position: absolute;
top: -27px;
right: 21px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.newplayerpost {
position: absolute;
top: 10px;
right: 21px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.whereseeresults {
position: absolute;
top: 47px;
right: 21px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.whatifdontplay {
position: absolute;
top: 97px;
right: 21px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.howdosell {
position: absolute;
top: 134px;
right: 21px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.deposit {
position: absolute;
top: 171px;
right: 21px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.refund {
position: absolute;
top: 216px;
right: 21px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.winnings {
position: absolute;
top: 261px;
right: 21px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.intercom {
position: -webkit-sticky;
position: sticky;
bottom: 0px;
z-index: 1;
margin-top: -625px;
}
.right-button {
position: fixed;
bottom: 128px;
right: 12px;
z-index: 9999;
background-color: transparent;
width: 119px;
height: 85px;
white-space: nowrap;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
/* Default styles for .help-icon and .help-text */
.right-button .help-icon {
width: 24px;
height: 24px;
border: 1px solid #007bff;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
font-weight: bold;
}
.right-button .help-text {
font-size: 12px;
margin-top: 5px;
}
/* Styles for the status-on class */
.right-button.status-on .help-icon,
.right-button.status-on .help-text {
color: #007bff; /* Your blue color */
border-color: #007bff;
}
/* Styles for the status-off class */
.right-button.status-off .help-icon,
.right-button.status-off .help-text {
color: black;
border-color: black;
}
.middle-button {
position: fixed;
bottom: 128px;
right: 138px;
z-index: 9999;
background-color: transparent;
width: 119px;
height: 85px;
white-space: nowrap;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
/* Default styles for .help-icon and .help-text */
.middle-button .message-icon {
width: 0;
height: 0;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
border-left: 15px solid black;
display: flex;
justify-content: center;
align-items: center;
}
.middle-button .message-text {
font-size: 12px;
margin-top: 5px;
}
/* Styles for the status-on class */
.middle-button.status-on .message-icon {
border-left-color: #007bff; /* Your blue color */
}
.middle-button.status-on .message-text {
color: #007bff; /* Your blue color */
}
/* Styles for the status-off class */
.middle-button.status-off .message-icon {
border-left-color: black;
}
.middle-button.status-off .message-text {
color: black;
}
.left-button {
position: fixed;
bottom: 128px;
right: 258px;
z-index: 9999;
background-color: transparent;
width: 119px;
height: 85px;
white-space: nowrap;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
/* Default styles for .home-icon and .home-text */
.left-button .home-icon {
width: 24px;
height: 24px;
background-color: black;
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
}
.left-button .home-text {
font-size: 12px;
margin-top: 5px;
}
/* Styles for the status-on class */
.left-button.status-on .home-icon {
background-color: #007bff; /* Your blue color */
}
.left-button.status-on .home-text {
color: #007bff; /* Your blue color */
}
/* Styles for the status-off class */
.left-button.status-off .home-icon {
background-color: black;
}
.left-button.status-off .home-text {
color: black;
}
.homebackdrop {
position: absolute;
top: 198px;
right: 17px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.welcomemessage {
position: absolute;
top: 39px;
right: 17px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.header-home {
position: absolute;
top: -84px;
right: 8px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.help-header {
position: absolute;
top: -84px;
right: 0px;
text-align: left;
font-size: 22px;
font-family: poppins, serif;
z-index: 2;
white-space: nowrap;
overflow: hidden;
}
.grid-three .threeColumns {
grid-template-columns: repeat(3, minmax(0px, 1fr));
}