Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

3 Column Preview w/ Expanding Cards (JS)

Fraser Watt 1,790

@fraserwat

Desktop design screenshot for the 3-column preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


The HTML / CSS part didn't take me too long so I made the "Learn More" cards expand with a bit of (useless) extra info.

Pretty straight forward on the mobile version, but on Desktop has growing cards, a little transition, etc. My problem here is the transition is quite jittery - any ideas on how to smoothen this all out whilst still keeping the growing cards?

Community feedback

Michal 665

@mbart13

Posted

one small suggestion:

this:

const inactiveCards = carCards.filter(function (car) {
        return car !== activeCard
    })

can be replaced with this:

const inactiveCards = carCards.filter(car => car !== activeCard)

doesn't it look better? ;)

1

Fraser Watt 1,790

@fraserwat

Posted

@mbart13 very nice!

0
Rayane 1,935

@RayaneBengaoui

Posted

Hello Fraser Watt,

Congrats for completing the challenge ! I like the idea of the transition with the cards 🙂

To make it smoother I think that defining the width of cards with flex-basis instead of width would work better as you use the flex property to resize them with .active and .inactive. So by replacing width : 100% in .car-category class by flex-basis:33%, it should do the work I guess.

Then you would just have to add an opacity transition on the text to make it even better.

Let me know if it helped ! 😉

Overall, well done for the challenge and happy coding ! 😃

1

Fraser Watt 1,790

@fraserwat

Posted

@RayaneBengaoui Ah brilliant, its amazing how such a small change can make a big difference - thanks! V helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord