Kivory
Kivory
Explore posts from servers
KPCKevin Powell - Community
Created by Kivory on 1/10/2025 in #front-end
What's wrong with my JS code here?
well the font size didnt change haha
18 replies
KPCKevin Powell - Community
Created by Kivory on 1/10/2025 in #front-end
What's wrong with my JS code here?
let parent = document.querySelectorAll('.main-container');

const mutationObserver = new MutationObserver(entries => {
let paras = document.querySelectorAll('.user-message');
paras.forEach((para) => {
let compStyles = window.getComputedStyle(para);
let computedFontFamily = compStyles.getPropertyValue('font-family');
if (computedFontFamily == "Madeena"){
para.style.fontSize = "40px";
}
})
})

mutationObserver.observe(parent, {childList: true})
let parent = document.querySelectorAll('.main-container');

const mutationObserver = new MutationObserver(entries => {
let paras = document.querySelectorAll('.user-message');
paras.forEach((para) => {
let compStyles = window.getComputedStyle(para);
let computedFontFamily = compStyles.getPropertyValue('font-family');
if (computedFontFamily == "Madeena"){
para.style.fontSize = "40px";
}
})
})

mutationObserver.observe(parent, {childList: true})
Okay, tried this, didn't work though, not sure what's wrong
18 replies
KPCKevin Powell - Community
Created by Kivory on 1/10/2025 in #front-end
What's wrong with my JS code here?
im not familiar. can you link me something on this?
18 replies
KPCKevin Powell - Community
Created by Kivory on 1/10/2025 in #front-end
What's wrong with my JS code here?
definitely is the case
18 replies
KPCKevin Powell - Community
Created by Kivory on 1/10/2025 in #front-end
What's wrong with my JS code here?
ah. should I wrap it in a function and make it run everytime one of the divs is created?
18 replies
KPCKevin Powell - Community
Created by Kivory on 1/9/2025 in #front-end
How do I make an animation where a div goes from height: 0px; to [its regular height]?
yes pretty much
22 replies
KPCKevin Powell - Community
Created by Kivory on 1/9/2025 in #front-end
How do I make an animation where a div goes from height: 0px; to [its regular height]?
unsure if this is the most optimal approach
22 replies
KPCKevin Powell - Community
Created by Kivory on 1/9/2025 in #front-end
How do I make an animation where a div goes from height: 0px; to [its regular height]?
might've figured it out. used max-height instead of height, and made it go from 0 to a size much larger than my div is ever gonna get, as recommended by someone on stack overflow
22 replies
KPCKevin Powell - Community
Created by Kivory on 1/9/2025 in #front-end
How do I make an animation where a div goes from height: 0px; to [its regular height]?
like i want it to not have any size at all, then it appears in the middle and pushes all the things above it upwards as it increases the height
22 replies
KPCKevin Powell - Community
Created by Kivory on 1/9/2025 in #front-end
How do I make an animation where a div goes from height: 0px; to [its regular height]?
visually it does the job, but the problem is that it doesn't push the stuff around it, which is part of the intended effect
22 replies
KPCKevin Powell - Community
Created by Kivory on 1/9/2025 in #front-end
How do I make an animation where a div goes from height: 0px; to [its regular height]?
tried, same problem as auto
22 replies
KPCKevin Powell - Community
Created by Kivory on 1/9/2025 in #front-end
How do I make an animation where a div goes from height: 0px; to [its regular height]?
unless i misunderstood
22 replies
KPCKevin Powell - Community
Created by Kivory on 1/9/2025 in #front-end
How do I make an animation where a div goes from height: 0px; to [its regular height]?
well i'd like to not have it limited as the height can depend on the content inside
22 replies
KPCKevin Powell - Community
Created by Kivory on 1/9/2025 in #front-end
How do I make an animation where a div goes from height: 0px; to [its regular height]?
don't know if i explained that very well
22 replies
KPCKevin Powell - Community
Created by Kivory on 1/9/2025 in #front-end
How do I make an animation where a div goes from height: 0px; to [its regular height]?
i tried doing that, and that does achieve the desired visual effect, but it still has it so the div takes up the auto height compared to the rest of the content around it
22 replies
KPCKevin Powell - Community
Created by Kivory on 1/9/2025 in #front-end
How do I make an animation where a div goes from height: 0px; to [its regular height]?
Obviously this is a start:
@keyframes expand{
0%{
height: 0px;
}
to{
height: [something here];
}
}
@keyframes expand{
0%{
height: 0px;
}
to{
height: [something here];
}
}
22 replies
KPCKevin Powell - Community
Created by Kivory on 11/23/2024 in #front-end
Decreasing window width (of browser) causes <body> to stop stretching to fit the entire page?
it's kind of just meant to be in the background, not interrupting any of the other elements
13 replies
KPCKevin Powell - Community
Created by Kivory on 11/23/2024 in #front-end
Decreasing window width (of browser) causes <body> to stop stretching to fit the entire page?
Found it. I have an element I have purely for decorative purposes with a position: absolute; that's causing this. Is there a way to make it so that this element just "gets ignored" during window resizing?
13 replies
KPCKevin Powell - Community
Created by Kivory on 11/23/2024 in #front-end
Decreasing window width (of browser) causes <body> to stop stretching to fit the entire page?
Ah. I thought even when this happens that the <body> tag would still stretch
13 replies
KPCKevin Powell - Community
Created by Kivory on 11/23/2024 in #front-end
Decreasing window width (of browser) causes <body> to stop stretching to fit the entire page?
can you explain further? I'm quite a beginner.
13 replies