This isn’t really WordPress specific, but from the server perspective it would add additional http requests for visitors to load additional css files, versus pulling the same site-wide css file from cache.
From a css perspective, I prefer to keep it all in one file. Some people prefer to organize things differently, like all text styles in one file and then layout specific stuff in another. In that case, they may keep layouts specific to certain templates separate.
For simple layout differences, I do something like:
template a:
<div id="main-content" class="full-width">
</div>
template b:
<div id="main-content" class="narrow-width">
</div>
css:
#main-content {
/* common to all content */
}
.full-width {
width:500px;
}
.narrow-width {
width:300px;
}
I keep IDs meaningful to the content, and use classes to define layout.
Related Posts:
- How to add CSS class to custom logo?
- Solutions for generating dynamic javascript / CSS
- Create “File-less” Page Template in Functions.php
- Hide a div that is part of all pages on one specific page
- Editing the custom background CSS
- Why max-width:97.5% on content images?
- add generated stylesheet from parent theme after child-themes style.css
- why does twenty eleven theme mix up the css measurement units?
- Setting up partial Right-to-Left admin interface
- Adding inline styles from a widget
- Can’t edit style.css in subdirectory of my theme?
- Adding dashicon fonts to the admin of pre 3.8 installs
- How to Handle CSS for Multiple Header header.php Files?
- Pagination & get_pages?
- Move my theme style.css into a folder
- Enqueued Stylesheets Effecting Admin Styles
- There’s an image named g.gif somewhere in my WordPress site
- wp_head() not inserting the default stylesheet style.css
- How to highlight the current page in the nav menu?
- First completely customized theme, where should I start?
- Root Sage theme styles are not working!
- Whats the safest way to output custom JavaScript and Css code entered by the admin in the Theme Settings?
- Sub folder CSS that’s read by Admin panel
- Page template across themes
- WordPress 5.8 update problem custom theme styles are overridden by core styles common.min.css
- CSS won’t style output of wp_nav_menu() correctly
- Where is definied the theme location for the main menu in a WordPress template?
- Is it necessary to prefix every css class in a theme framework?
- current-menu-item class not working
- Dequeue a style file which is making website load slow!
- Weekly background code not working
- Where can I access my custom page template?
- WordPress page templates in a directory
- Do I need normalize.css when developing my own WordPress-theme?
- Disable front-page.php template
- How to float an image in Gutenberg
- Can I show all the template files that are being used on my site?
- How do the default themes reference style.css?
- Single Page theme [closed]
- Custom metabox for custom page template
- How to override checkbox styles if these inputs have a unique id [closed]
- How to add material design css in wordpress and woocommerce
- Font Awesome 5 Free – far working but fas is not? [closed]
- How to create a custom page(not a template) in a theme
- How to get javascript slider to work! [closed]
- What is the meaning of WordPress’s recommended css classes and where are they applied?
- How to i style the elements from the TinyMCE
- Using page-id-{ID} from body_class() in local dev, versus live staging
- How do I remove inline style in featured image markup?
- Custom image size vs CSS sizing
- Why is my CSS not loading?
- How to rotate every letter in a title
- Why in the static pages of my theme are showing these information?
- theme style is applied on the dhasboard rather than the website
- SVG in list-style-image breaks when adding fill
- WordPress theme resource won’t load over VPN
- Modify available templates (in dropdown)
- How to style bootstrap container in wordpress theme?
- CSS added through customizer neglects the need of a child theme?
- How to override template files in parent theme?
- LESS not working in WordPress [closed]
- Place title (in correct place) above image with opaque background [closed]
- A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom
- multiple html/css files for wordpress theme?
- CSS preprocessor file messed up after compiled
- Why I obtain different visualization when I run the website on my local machine and on remote server?
- my single.php is mixup on some post for no reason
- How to use the _S framework
- Custom theme template files
- How to use shortcode inside of shortcode in theme
- WordPress Animation Adjustments
- style variations hurt the editing performance
- Why nav_menu_css_class doesn’t work with apply_filters?
- No templates for condition page.php Elementor
- Default customizer colors aren’t displayed outside of the preview
- Show Yoast SEO meta tags in Custom WordPress Templates (Theme)
- Is there a way to add classes to a page when using a Gutenberg reusable block as page layout?
- WordPress doesn’t load css, image and js files after moving local installation folder
- How to generate a rtl.css file for themes?
- Load multiple css simultaneously using functions.php
- overlay post title over post’s featured image
- Problem with Displaying Custom Theme Page’s Content
- Change site title color on individual pages
- Mobile view logo background colour in wordpress
- How to show children pages as array
- Different stylesheet for different pages not working fully
- Why WordPress gets old templates code instead of the last updated ones
- Enqueue Stylesheets After Theme’s “rtl.css”
- WordPress 3.5 + Foundation 5 not working on IE9
- Any disadvandages if I style the wordpress align classes without img and .wp-caption prefix
- adding navigation to genesis themes
- Alternating CSS classes for dynamic content [closed]
- How to reuse parts of WordPress site e.g. header, footer, part of header for multiple WordPress sites?
- Header is not showing full width
- How do I middle-align my header menu items in WordPress [closed]
- How to resize video lightbox popup in wordpress? [closed]
- How can I get rid of the distance when I’m using list-style-type: none? [closed]
- HTML to WORDPRESS [closed]
- How to split the site’s layout without damaging this layout? [closed]
- WordPress search field won’t get wider