Jump to content
Sign in to follow this  
tintabum

dynamic.css and child theme bug

Recommended Posts

tintabum

Hi all. Bug #1 1. activate platformbase theme. 2. goto settings - inline checkbox is UNCHECKED 3. open page in browser - all dynamic css is INLINE - BUG! Bug #2 4. go to platformpro directory and make /css/dynamic.css file writable 5. change something in design section and press save 6. new style never store in pro folder after I make this file writable - BUG! Bug #3 7. dynamic.css load from pro directory, not a child theme directory - BUG! Correct way: dynamic.css must be stored in child theme /css directory. Bug #4 - css order loading: step 1 - load pro css step 2 - load base css with overrides step 3 - load dynamic which restore pro css and disables my overrides in child theme - BUG! Correct way: load pro css load dynamic css load theme css And make option to turn dynamic.css feature off who not need it.

Share this post


Link to post
Share on other sites
Simon

What version and is this multisite?

Share this post


Link to post
Share on other sites
tintabum

I'm new customer. Yesterday I bought this versions: PlatformPro 1.5.2 PlatformBase 1.4.1 I don't know about multisite, I think no. I'm trying customize template using your docs - modifying only child theme.

Share this post


Link to post
Share on other sites
Simon

I'll have a look when I get home, enabling inline css disables dynamic

Share this post


Link to post
Share on other sites
tintabum

correct. issue with dynamic.css place and load order. I use base theme, so dynamic.css must be stored in base theme folder. This never happens. Also if I make dynamic.css writebale in pro folder it never updates with new values from Settings. My change visible only when inline mode ON and I add my fixes to Custom Code. I want see my changes stored in dynamic.css placed to child theme folder (or I lost my changes with framework update) and overrides in child/style.css should works properly too. Load order should be changed to: 1. pro/style.css 2. child/css/dynamic.css - override framework styles 3. child/style.css - add custom styles and overrides of base styles.

Share this post


Link to post
Share on other sites
Simon

right, your changes will not be lost when you upgrade, dynamic.css is dynamic, it is recreated if any settings change or it does not exist. If the file is not writable it falls back to printing in the head. The load order is wrong, its been corrected in the latest development builds. Here is a workaround for you:

	function late_styles() {
	echo "n";
	}
	add_action( 'wp_head', 'late_styles', 25 );
	add_action( 'wp_print_styles', create_function( '', "wp_dequeue_style('pagelines-stylesheet');") );
	[/code]

This loads the base style last in wp-head and removes the duplicate.

Share this post


Link to post
Share on other sites
tintabum

>>If the file is not writable it falls back to printing in the head. few tests (base is my current theme): 1. if pro/css/dynamic.css is NOT WRITABLE and inline UNCHECKED - no warns about file not writable and all dynamic styles is inline. Well at least it show my current style. 2. if pro/css/dynamic.css is WRITABLE and inline UNCHECKED - no inline css and also no new styles in dynamic.css. I think this should be fixed too.

Share this post


Link to post
Share on other sites
tintabum

>> Here is a workaround for you: I added to base/functions.php. Load order is right, but I see bug in css path:

Share this post


Link to post
Share on other sites
Simon

whoops should be get_stylesheet_uri()

Share this post


Link to post
Share on other sites
ceft

Im sorry for coming in late I am having this same problem up making changes in the Dynamic.css and when i am in the plateform setting it defaults my dynamic.css back to its original codes. I am not as advanced with writing function and code as it seems you guys are but can you please write out the final solution to being able to edit the dynamic.css styles and not have them default back when also using the platform settings? thank you for any and all help! -John

Share this post


Link to post
Share on other sites
catrina

Is the custom code section not working for you correctly? Have you been making direct changes to the dynamic.css file?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×