Generally speaking, you want to load your general stylesheet (style.css
) first and follow it with your more specific stylesheet(s) (style-premium.css
). However, the actual details of how CSS cascades are more complex than that and your specific stylesheet can still be overridden by the general stylesheet:
- if the
!important
declaration is used - based on the specificity of individual selectors
You can learn more about how the cascade works via W3.org or this CSS tutorial, which even deals with your question directly:
It’s also useful to note that external stylesheets placed underneath
each other also cascade — that is, the styles in the lowest stylesheet
overrides those in the higher stylesheets.
Related Posts:
- Versioning @import of parent theme’s style.css
- Attributing a version number to a child theme’s main stylesheet
- how do I queue my Child stylesheet/s *after* every Parent stylesheet/statement?
- Why is the Child Theme Stylesheet Not Loading?
- Give priority to child theme stylesheet
- How can I make new .css file in child theme override styles in child theme’s style.css
- Style.css in child theme is loaded before Bootstrap
- Overwrite CSS with without deleting it
- Hide post meta data on a specific category
- bbpress change the word forum, topic, reply in the forum to another word I choose
- Customizing default Mediaelement player
- Child Theme vs. Jetpack Editor
- Child theme works in local environment but is not working on remote
- How do add a the style-mobile css from the main theme to the child theme?
- Child theme style.css isn’t overwriting parent style.css
- How to use custom stylesheet only for a template in child theme
- Order of stylesheets in child theme
- Is it possible to add a ribbon in the background of h1 on every page?
- Child theme problem
- Child Theme with multiple css files
- Custom Background by Page IDs
- CSS Styling a specific page
- What is the correct workflow for modifying child themes?
- What are the best practices for maintaining and deploying several parent themes?
- css media query question [closed]
- How to customize the WordPress 2014 theme, to have page using less horizontal margin?
- How can I get this child theme stylesheet to properly load? Or if it is correct, why doesn’t my child theme appearance match the parent?
- child theme appears again when I put the header with parent name.
- Child theme not importing parent styles
- Set a link in child theme style.css to jump to #main [closed]
- How to create a non-responsive WordPress Theme Using Genesis Framework?
- Two stylesheets acting on one element
- WordPress Child Theme – twentyeleven
- Modify Twentyeleven child theme CSS – How to change body font size?
- Enqueuing multiple stylesheets with a child theme
- How to override styles from child theme if all the styles are in a folder?
- How to activate the child theme in WordPress?
- How to create my own style.css file in an wordpress child-theme
- Modifying posts based on category in TwentyTwentyTwo theme
- Opinions and recommendations on the best barebones base theme [closed]
- How to override JavaScript files in child theme?
- Where are Additional CSS files stored
- How to add code to Header.php in a child theme?
- Why does my child theme CSS get called twice?
- Is it ever okay to include inline CSS in plugins?
- How to add crossorigin and integrity to wp_register_style? (Font Awesome 5)
- Customizing a WordPress theme without changing it?
- How to *remove* a parent theme page template from a child theme?
- How do I make my child theme re-apply the settings that were customised when its parent was active?
- How do themes provide support for child themes?
- Preserving theme settings in child theme
- Is it possible to make grandchild themes?
- How to cache bust a child theme style.css
- Child themes CSS priority problems without using !important
- Is a text-domain necessary for a child theme
- How to modify single.php in a child theme?
- Cannot get Child Theme to load latest version of style.css
- Issues enqueueing parent & child theme stylesheets with revised Codex method
- How do I cleanly override a plugin’s CSS with a child theme?
- @package & @subpackage: how to use with child themes
- How to override function in child theme
- How to include own css on wordpress tinymce editor?
- Hiding Parent Theme
- get_stylesheet_directory() vs get_template_directory() for child theme
- Theme Customization API and child themes
- Hide a div that is part of all pages on one specific page
- How to customize the default HTML for WordPress Attachments
- get_parent_theme_file_path vs. get_template_directory
- How to Add Customizer Setting in Child Theme
- Git vs Child Theme
- Child theme does not overwrite parent themes style.css
- how to call files in child theme?
- Get Parent Theme Author Name
- How to add extra attribute to stylesheet link?
- Is it possible to change the attributes of a registered style or script before it fires?
- Get parent theme version
- Optimal approach for replacing the 8 header images in a child theme?
- How to add ‘class’ attribute into shortcode [audio]?
- How do I remove specific styles from the parent theme css using the child theme css?
- Is this the best (and only) option to style CSS for a given post type?
- How to transfer changes to a child theme?
- WordPress master + child themes + Git workflow
- Best practices – Should I create a child theme vs. customizing a framework theme? (such as HTML5 reset)
- How to use parent theme’s enqueue methods
- How do I override a parent theme’s language files with a child theme?
- something like is_childtheme()
- Do all files in child theme override the parent?
- Child theme showing a blank page
- Child theme preview missing
- Child Theme Performance
- is there a simple way to list every templates / php files used to generate a specific page?
- How could child theme be different than parent theme if I haven’t made changes?
- add generated stylesheet from parent theme after child-themes style.css
- How to solve “Warning: Use of undefined constant” when overriding a parent theme function in the child theme?
- Do I need to update the child theme too after updating the parent?
- Adding HTML within an image title attribute
- get_template_directory vs get_stylesheet_directory
- Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import – How?
- FireFox Inspector :: find CSS file related to
- Theme customizer: How do you grab the value later?