Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"options.style_selector" won't overwrite from child theme #66

Open
BoweFrankema opened this issue Oct 10, 2012 · 1 comment
Open

"options.style_selector" won't overwrite from child theme #66

BoweFrankema opened this issue Oct 10, 2012 · 1 comment

Comments

@BoweFrankema
Copy link
Contributor

I'm trying to change the CSS selector for a bunch of options in my child theme. In this case the header option set.

Core Feature

[infinity-header-layout]
type = "default"
title = "Header Styles"
description = "Customize the layout and colors of the header"
options.section = "header"
options.style_selector = "#header"

My Features.ini overwrite in child theme

 [infinity-header-layout]
options.style_selector = ".top-wrap"

This has no effect. The option does not break but it still puts the CSS under #header.

@MrMaz
Copy link
Member

MrMaz commented Oct 12, 2012

I figured out why this is happening. Its a really weird situation that probably won't get resolved until we rewrite some of the config loading stuff.

I know the rest is way complex, these are notes for myself.

This is happening only for options which are created using the suboption syntax like [myfeature.someopt]

The problem is that the options.setting syntax sets up defaults for options to apply when they are configured. Since the suboptions get created the first time a feature needs them, they might get initially created before all of the features.ini are loaded. If no overrides are set for a suboption, they are not configured again, which means the overriding defaults are never applied.

Loading all features.ini before all options.ini does not have an affect, since the suboptions are created based on what is found in features.ini as each file loads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants