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 trialJesse Bayer
Front End Web Development Techdegree Graduate 14,702 PointsFor 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
Treehouse Moderator 91,253 PointsI 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. :-)
Sergio Andrés Herrera Velásquez
Courses Plus Student 23,765 PointsNot 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/
Jesse Bayer
Front End Web Development Techdegree Graduate 14,702 PointsJesse Bayer
Front End Web Development Techdegree Graduate 14,702 PointsAlright thank you! From now on if I use it this way I'll make sure to test the other styles and change accordingly.