Archive
-
Picture Element Practice
March 4 2021
I've been wanting to get more familiar with the picture element and the srcset attribute, so I made use of a photo of this little bird I spotted on a wire outside my window today. The photo should be square if your device is in portrait orientation, and the photo should be a wide crop if your device is in landscape orientation. -
Object-fit and scaling images within an overflow container
March 3 2021
I'm still not used to using object-fit, so I wanted to play around with it a bit. I made use of it in this post along with transitions to try and recreate this effect I've seen on a number of sites. I'm not sure if this cannot be done with a background image as well, but I took a shot at it using just an img and overflow:hidden set on the wrapping picture element. Something feels wrong about applying the overflow to the picture element, so I probably wouldn't use this same technique on a live site -
Simple Flexbox Header
March 2 2021
I did some practice with Flexbox on Treehouse today and thought I'd try reworking the practice that I followed. I made sure to make use of the supports feature query, and I tried nested media queries this time around. It looks like they worked! -
100 Days of Code - Week 3
March 1 2021
I’ve made it through another week of the 100 Days of Code challenge. There’s nothing fancy within these posts, but I did learn a few new things related to CSS and JavaScript this week.
-
Simple Button Animation Name Swap
March 1 2021
I wanted to see how difficiult it might be to swap out a button's animation. Turns out it is not as difficult as I anticipated. I learned about the CSSKeyframesRule via MDN today, so I think I'll find a way to make use of it for something like this rather than the approach I took today. -
Adding more books to the bookshelf
February 28 2021
I did a quick review on arrays today and the practice got me thinking about how I might approach adding books to yesterday's bookshelf. Unfortunately I didn't use any arrays in what I ended up building and I made use of prompts instead of a modal when prompting for information about the book that would be added. I had fun building it though, and the JavaScript worked after fixing 1 typo on a variable name. I'm quite proud of that. -
Goofing around with grid and more
February 27 2021
Today I wanted to try and build a display of books that would animated when you hovered over them, and when you clicked on them they would display the cover image and more. I quickly got a bit discouraged at the thought of working through how complex that would be, so I went with something more simple. I was watching/listening to this week's new episode of You Look Nice Today while building this. It provided me with plenty of potential titles for books. I'll get back to finishing this idea at a later time. -
Fun with pseudo-elements
February 26 2021
Today I learned a few more uses for the ::before and ::after pseudo-elements. I also learned more about what you can style within the ::selection pseudo-element. -
Wrong about CSS Variable fallbacks
February 25 2021
I was doing it all wrong and thought the default you can provide when using CSS variables served as a fallback for older browsers. I'm glad I discovered the right way to do it, and boy do I feel silly for now realizing it earlier. -
Practice with the matchMedia method
February 24 2021
Media queries in CSS are extremely handy and essential when building websites nowadays. I wondered if it was possible to make use of them in some way using JavaScript, and luckily the always handy MDN Web Docs introduced me to the matchMedia method.