You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: css/css-best-practices/readme.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,11 +64,11 @@ ul.button-group li.button {
64
64
65
65
A common use case is to target input types. For example `input[type="text"]`.
66
66
67
-
It's important to realize that the element selector is not necessary here. If you think about it, we are actually increasing the specificity needlessly.
67
+
It's important to realize that the element selector is not necessary here. If you think about it, we are actually increasing the specificity needlessly. Attribute selectors have the same specificity as a class. The above example has the same specificity as `input.someClass`
68
68
69
-
All we really need is `[type="text"]`
69
+
All we really need is `[type="text"]`, because that is sufficient for targeting text inputs.
70
70
71
-
So for that reason,*attribute selectors should be used alone*, just like classes.
71
+
In summary:*attribute selectors should be used alone*, just like classes.
0 commit comments