I was wondering about two things that affect overriding the default css styles.
First, if your plugin absolutely needed to load your stylesheet in the footer which means that it will always trump the theme’s styles and anything added to the customizer’s Add CSS feature.
Secondly, the use of overqualifying selectors for example the inputs have their classes .yikes-easy-mc-text and .yikes-easy-mc-email, why not just apply the styles to these classes instead of using .yikes-easy-mc-form .yikes-easy-mc-text. The .yikes-easy-mc-form isn’t necessary. Also things like using .yikes-easy-mc-form [input type=”text”] instead of just styling the class you gave it .yikes-easy-mc-text.
Just a thought, but it could prevent developers from using the anti pattern of using !important to override the styles.
- The topic ‘CSS Specificity issues’ is closed to new replies.