summaryrefslogtreecommitdiff
path: root/src/select/select.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/select/select.c')
-rw-r--r--src/select/select.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/select/select.c b/src/select/select.c
index 0c31ae4..9efc912 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -442,9 +442,11 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
state.pw = pw;
/* Iterate through the top-level stylesheets, selecting styles
- * from those which apply to our current media requirements */
+ * from those which apply to our current media requirements and
+ * are not disabled */
for (i = 0; i < ctx->n_sheets; i++) {
- if ((ctx->sheets[i]->media & media) != 0) {
+ if ((ctx->sheets[i]->media & media) != 0 &&
+ ctx->sheets[i]->disabled == false) {
error = select_from_sheet(ctx, ctx->sheets[i], &state);
if (error != CSS_OK)
goto cleanup;