A web style sheet is a form of separation of presentation and content for web design in which the markup (i.e., HTML or XHTML) of a webpage contains the page's semantic content and structure, but does not define its visual layout (style). Instead, the style is defined in an external style sheet file ...

learn more… | top users | synonyms

3
votes
1answer
96 views

Enqueue Stylesheets After Theme's “rtl.css”

I am currently developing a theme with internationalization support, and would like to load stylesheets after my theme's rtl.css (an alternative style.css loaded for languages with a right-to-left ...
1
vote
3answers
2k views

Can't edit style.css in subdirectory of my theme?

I want to edit a file style.css but the theme editor shows this: /* ---------- Reset Tags ----------- */ @import url("css/reset.css"); /* ---------- Reset Tags ----------- */ @import ...
12
votes
3answers
2k views

How important is it to enqueue a theme's stylesheet?

I have trawled the net looking for an answer to this, but for some reason all I can find are actual examples, but without that particular explanation, which is clear say in the case of scripts. Can ...
6
votes
4answers
220 views

Do I actually need to link my theme's style.css in the theme files

So I am developing a wordpress theme using a series of LESS files for the CSS. These compile using codekit to a combined and minifed stylesheet that I use for the theme's styling. I understand a ...
5
votes
8answers
7k views

How can I version the main CSS file?

How can I instruct wordpress to use a filename other than 'styles.css' for my main stylesheet - for example, styles-1.css? I'd like to do this for versioning and caching purposes.
5
votes
4answers
2k views

Enqueue Google Web Fonts Without Messing Up Symbols In URL

Enqueuing Google Web Fonts the usual way, i.e., using the wp_enqueue_style function like so... function wpse_google_webfonts() { wp_enqueue_style( 'google-webfonts', ...
5
votes
1answer
199 views

How to work with custom styles saved in theme option?

I am creating a theme where user can save custom styles from theme customizer through settings API. Those style info are saved in options table as serialized data. When Custom skin is active I will ...
3
votes
3answers
373 views

Stylesheet switching and caching

I'm implementing a site that allows users to switch stylesheets (to show a high contrast version for people with vision impairments). The switcher essentially just changes the <link>ref to ...
2
votes
2answers
1k views

how to make stylesheet appear in theme editor?

I have a stylesheet in my theme in the css subdir of the theme dir (css/style.css). The question is how to make this .css file appear in the theme editor of the WordPress admin. (I know using the web ...
0
votes
2answers
878 views

Hook 'wp_enqueue_scripts' priority has no effect

In a theme I am working there are up to 3 Stylesheets. I am using the hook 'wp_enqueue_scripts'. The order of the stylesheets is important for overwriting styles. I have a code like this: ...
1
vote
3answers
148 views

To enqueue or not to enqueue

What is the best way to link to a CSS file in WordPress? Method 1: Use the following whenever needed <link href="<?php echo get_template_directory_uri(); ?>/my-style.css" rel="stylesheet" ...
0
votes
1answer
30 views

Check and dequeue if multiple stylesheets exists using wp_style_is?

I need to dequeue styes for 3 plugins that load the same font stylesheet so i come up with the following function that of course not working: add_action('wp_enqueue_scripts', 'dequeue_by_handles', ...
0
votes
1answer
53 views

How to dequeue a stylesheet by src, not handle?

I'm trying to develop a Wordpress plugin that will dequeue/deregister Font Awesome stylesheets added to a theme by certain plugins that users may install, if the theme already make use of Font ...
0
votes
1answer
1k views

get_stylesheet_uri returns wrong path

I am using the roots theme. Inside scripts.php, the stylesheets are loaded using the wp_enqueue_style-function. wp_enqueue_style('roots_bootstrap', get_template_directory_uri() . ...
0
votes
1answer
482 views

How can I style a certain element only when wptouch is active?

I just installed the wptouch plugin for auto-styling my blog in mobile devices. How can I style a certain element on my page to be hidden when this view is active? I.e., in particular, on my blog ...
0
votes
1answer
1k views

what could cause get_stylesheet_directory_uri() to fail?

On my new worpress install, I have code that reads <img src="<?php get_stylesheet_directory_uri(); ?>/images/logo.jpg" /> This code worked, untill I started using a subdomain (went ...
0
votes
2answers
1k views

How do you modify CSS files via admin panel?

All theme styles are in style.css file. Let's say first line looks like: body { background-color: #fff; } Now, I've created an option in admin panel named body_bg. User types #000 there and I ...
0
votes
2answers
2k views

How to add CSS style sheet dynamically in wordpress

When certain conditions are met (e.g. post vs. page or a category is tagged, etc) I would like to load an additional CSS file. This file would, in theory, change link colors. Or perhaps change the ...