💻 Tech
Few things I learned when I worked on a UI bug:
- Compound an element’s classes by querying it with
document.querySelector
and using the.
operator. For example,document.querySelector('.class1.class2')
will return the first element with bothclass1
andclass2
. - Get how much an element is scrolled by using
element.scrollTop
andelement.scrollLeft
. - Get the distance between an element and its relative parent by using
element.offsetTop
andelement.offsetLeft
.
🥦 Health
If you want to deter yourself from eating ultra-processed foods, read the ingredients list. As you eat, read what you are consuming. You’ll realize you don’t know a lot of what you’re eating, so you’ll probably think twice before eating it again.