💻 Tech
Few things I learned when I worked on a UI bug:
- Compound an element’s classes by querying it with
document.querySelectorand using the.operator. For example,document.querySelector('.class1.class2')will return the first element with bothclass1andclass2. - Get how much an element is scrolled by using
element.scrollTopandelement.scrollLeft. - Get the distance between an element and its relative parent by using
element.offsetTopandelement.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.