-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pseudo selectors before or after element properties? #79
Comments
@nalabdou , have you read the title of issue? :) I'm asking which order is correct, do I add pseudo selectors for an element before element properties or after? |
I suppose as long as you choose something consistent, it’s fine? conceptually it seems like I’d probably want “before”s to go at the top, and “after”s to go at the bottom. |
I always use mine after the element itself |
I think this is a question of personal patterns. I always write the Element Properties and than I go to the included elements. In this way I have a better overview about everything. But however you do it, you have to follow consistent, then it is better to read. |
it doesn't matter you can choose any of the two because writing pseudo selectors after or before element will make no difference. |
I use it like that... either for |
test ok |
i test for two situation, both goes will |
I usually pick the second one since it defines the pseudo-elements later after defining all the styling |
I think this is based on personal preference, as I normally write my pseudo selectors after |
from a maintainability perspective, the second code snippet is better because it places the border property first, then follows it with any pseudo-element selectors like :before. Makes the code easier to read in my opinion |
you can put it anywhere you'd like, the code will not be affected by doing this |
this:
or this:
The text was updated successfully, but these errors were encountered: