Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS The Selectors Solution

Jesse Bayer
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jesse Bayer
Front End Web Development Techdegree Graduate 14,702 Points

For the border step

I used:

input[placeholder="Enter email..."]:focus { border: solid 3px blue; }

It worked the same way as the solution, I just want to make sure that this isn't a bad way of doing it.

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

I don't think of it as a bad way of doing it. As long as it works well with any other pseudo styles that you're using, such as the background colour of the input field you're using. Does the style do the job effectively that the input field is in fact in keyboard focus? If that's true, it's a good style. :-)

Not really an issue in terms of functionality, however, in order to keep css easy to read, there are some methodologies like BEM and some others which ask for an order on the css file, and that would skip those methodologies.

Here is an article from CSS tricks on some proposals going around for CSS https://css-tricks.com/methods-organize-css/