Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Vue.js Basics!
You have completed Vue.js Basics!
Preview
In this video, we'll add flair and detail to the accordion menu by using v-bind to conditionally add or remove CSS classes from our Vue template.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
depending upon whether a menu
item's state is open or closed.
0:00
Looking at our finished example again,
you'll notice that when I open a media
0:03
item, the arrow points up, and when I
close a media item, the arrow points down.
0:06
Also notice on the side here, each item
is color-coded, depending on its type.
0:12
We'll use Vue class findings to
accomplish both of these things.
0:18
First, let's tackle the arrows.
0:22
In our style.css file, we're targeting two
pseudo elements called more and after.
0:23
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up