Recent Posts

370written posts
elliearned bits
offlinecurrently
elli
Senior Member
elli Avatar
pharaoh leap Avatar
The specific script I was trying to work with, though, wanted to interact with classes inside posting templates, so like member-posted content. The Style Tag Plugin must convert the psuedo-HTML you write into a post's content into real HTML at some point, since you can inspect it on browser and it'll show up like any HTML - so I was wondering, if the script ran after that conversion, if it could still work as intended. Buuuuuut apparently not. Unfortunately, I'm absolute TRASH with javascript, so I dunno if it's just because the order of operations was all out of whack (which is to say, if the Jcink script I was using was trying to identify HTML in a post that was still being read in psuedo-HTML), or if I'd messed up something when converting it for Proboards use, or if it was. Just. Something else entirely. *stares at hands*

it was the order of execution, yeah. you can listen for the specific element to exist before making changes to it. the mutation observer API works best for this purpose but is an advanced concept. check it out:

bobbyhadz.com/blog/javascript-wait-for-element-to-exist
last edit on Nov 1, 2023 21:52:20 GMT by elli
After over 17 years, I've decided to move on from ProBoards. If you need to contact me, find me on my website.
370written posts
elliearned bits
offlinecurrently
elli
Senior Member
elli Avatar
i've been hesitating to finish a basic navigation menu for like two weeks and idk what's wrong with me. this is a pattern i've written a dozen times by now - it should take less than an hour. it seems i've reached a point in my career (life?) where i could easily code just about anything, but i find myself second-guessing every decision. so much wasted time!! for nothing. stupid. frustrating.
After over 17 years, I've decided to move on from ProBoards. If you need to contact me, find me on my website.
370written posts
elliearned bits
offlinecurrently
elli
Senior Member
elli Avatar
citrinitas Avatar
when you know how to do something, know it is within your skillset but you just... can't bring yourself to do it. like you can't even mentally prepare yourself to do it. you just can't.

haha. hhha... *sobbing*

and it's getting worse as i get older
After over 17 years, I've decided to move on from ProBoards. If you need to contact me, find me on my website.
370written posts
elliearned bits
offlinecurrently
elli
Senior Member
elli Avatar
siel Avatar
love googling around for a fix to my problem and stumbling on a github issue with angry comments spanning several YEARS lmao. (there was no clear answer in the end but it was entertaining at least)
thanks, this issue was hilarious. i love further down, there's even a merge from microsoft to to fix an icon in azure data studio. fwiw removing the viewbox attribute absolutely breaks the scaling behavior of an SVG and this maintainer is a ding-dong.
After over 17 years, I've decided to move on from ProBoards. If you need to contact me, find me on my website.
370written posts
elliearned bits
offlinecurrently
elli
Senior Member
elli Avatar
siel Avatar
i'm still so noob with animations and how/when they use GPU and what it means for performance. even recently, learning how to use the performance tab of chrome dev tools was a wild ride for me. i found this article pretty helpful as an intro for some of the tips you've mentioned (though it's from 2016, not sure if a lot has changed since then). sharing in case it helps anyone else! www.smashingmagazine.com/2016/12/gpu-animation-doing-it-right/

thank you!! this is such a good link - it actually explains why transform3d works. i didn't realize that it creates a new compositing layer 🤔 i'll have to be mindful of that info.
After over 17 years, I've decided to move on from ProBoards. If you need to contact me, find me on my website.
370written posts
elliearned bits
offlinecurrently
elli
Senior Member
elli Avatar
just a few random tips in the hopes that, by repeating them, the concepts will finally stick in my mind. i've learned and re-learned this information at least three times by now.

when animating CSS properties, make sure that you've explicitly declared the base state.

for example, if i'm animating a box shadow that appears on hover and the base state is effectively `box-shadow: initial`, i still ought to declare the box shadow property as though it were invisible:

.animate {
 box-shadow: 0 0 0 rgba(0, 0, 0, 0);
 transition: box-shadow 0.4s;
}

.animate:hover {
 box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

the same goes for transform animations, which are especially janky on text with no base state. use `translate3d(x, y, z)` instead of `translateX` or `translateY` which triggers hardware acceleration -> smoother animation.

.animate {
 transform: translate3d(0, 0, 0);
 transition: transform 0.2s;
}

.animate:hover {
 transform: translate3d(0, -1em, 0);
}

avoid animating margins and top/bottom/left/right - prefer transform where possible.

sometimes `backface-visibility: hidden` helps - it depends on the animation.

selectively use `will-change: transform` for heavy transform animations, as a last resort.

anyway, we'll see if i remember next time i have to animate something. 🫠
last edit on Jun 5, 2023 22:12:18 GMT by elli
After over 17 years, I've decided to move on from ProBoards. If you need to contact me, find me on my website.
370written posts
elliearned bits
offlinecurrently
elli
Senior Member
elli Avatar
flare Avatar
also small addition but cssgrid.io/ is also a really good source. its 4 hours free content on just grids, all subtitled, very in-depth and not dry at all.
if anyones also interested, the creator, wes bos, also has videos on javascript & css flex as well.
good link! i love wes. seconded - his js content is great for anyone trying to break into the language. check out "javascript30," as well as "beginner javascript" and "es6 for everyone" if you have some money to spend.

wesbos.com/courses
last edit on Mar 15, 2023 0:36:10 GMT by elli
After over 17 years, I've decided to move on from ProBoards. If you need to contact me, find me on my website.