Style.css in parent theme / child theme (file size / repeated statements)


#1

Hi,

I’m quite new to rtPanel, so sorry in advance for asking any stupid questions.

I’ve downloaded rtPanel theme and the rtPanel child theme. There’s a few things I noticed and have questions on:

  1. I noticed that rtPanel child theme also functions complete without rtPanel theme, so it is not really a child theme in the WP sense, is it?

  2. The file size of style.css generated by rtPanel child theme is about 355KB, i.e. more than twice as large as the file size of style.css of rtPanel theme (165KB). Why is that?

  3. When I look at the generated styles with the Web developer toolbars of the FF, Chrome or IE, I notice that for each element the list is endlessly long with many many repeated statements of

    *, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } as well as

    html, body {font-size: 100%;} Why is that?

Thanks in advance for your support!

René


#2

Hello rene,

Following are the answers of your questions.

  1. rtPanel child theme contains assets folder as it is from parent theme, Since we are using grunt, sass and foundation you can easily overwrite CSS variables in child theme. So no need of parent theme styles here. Also we have include more files in ‘lib’ folder which contains example of slider, theme options page, taxonomies, custom post types etc. This makes developers life easy.

  2. About child theme style.css: Yes it was large sized because of some issue of foundation with sass. It is corrected now. Thank you for noticing and mentioned here.

  3. Some CSS components repeated many time because of some issues with sass and foundation. But its fixed now.

I really appreciate your efforts and notify above issues.

You can download latest copy of rtPanel child theme from here https://github.com/rtcamp/rtpanel-child-theme

Feel free to let us know if you found any other issues.

Thanks


#3

Hello Sagar,

thanks a lot for your quick answer! And thanks for the quick fix of rtPanel!

I have another question regarding the strategy using rtPanel for a current project. So far I have downloaded rtPanel parent theme from wordpress.org and rtPanel child theme from github and modified the child theme to suit my purposes.

Now I’m working on a theme that needs to have the ability to have child themes itself. Would you recommend modifying rtPanel parent theme for that purpose and using rtPanel child theme for my own child themes?

Regarding your question of other issues:

So far I have only noticed some unresolved mixin errors in assets/rtpanel/scss/plugins/_buddypress.scss where an undefined mixin border-radius is referenced 5 times on lines 105, 121, 194, 195, and 199. Should I file a PR on github for such purposes?

Thanks, René


#4

One further question: In your latest commit to the child theme, you commented out the import of rtPanel styles, see

But without the import, style.css will be empty.


#5

Hello Rene,

I will suggest you to use latest rtPanel. You can download if from [here][1].

We have already uploaded latest version on WordPress repo. You can check status [here][2].

About parent theme changes:

If you are using rtPanel theme as parent theme itself then I will recommend you to do not make changes in parent theme directly, Since you lost your changes after updates.

If you will rename rtPanel theme to your theme then you can make changes in it and use your own child themes. But your will not able to get future updates of rtPanel.

About PR on github:

Yes you can create issues related to rtPanel.

I can not reproduce your mentioned issue. Please try again after update Sass and Compass.

About empty style.css

Actually it depends on developer. If you want to modified some styles of parent theme you can simply add you styles here. If you want to make lot of changes like layout, colors and other settings provided by foundation then you can simply enable full css and update Sass variables.

Let me know for further assistance.

Thanks [1]: https://github.com/rtcamp/rtpanel [2]: https://themes.trac.wordpress.org/ticket/23348


#6