CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • editing civicrm css
Pages: [1]

Author Topic: editing civicrm css  (Read 795 times)

civieric

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: WordPress
  • MySQL version: 5.5.32
  • PHP version: 5.4.17
editing civicrm css
March 25, 2014, 08:54:09 am
I want to edit the civicrm css file (http://genesis.cyberacc.com/wp-content/plugins/civicrm/civicrm/css/civicrm.css?r=Y9JG5). When I go to the plugin editor page in WP it doesn't show there.

Is there anyway to access it via the WP plugin editor or must I fall back to command line vi or to FTP?

Thanks.

civieric

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: WordPress
  • MySQL version: 5.5.32
  • PHP version: 5.4.17
Re: editing civicrm css
March 25, 2014, 09:17:15 am
Well I went in with vi and changed what seemed to be the right css setting, but I don't get a new menu color.

I changed 'color' from #fff to #5d677b in wp-content/plugins/civicrm/civicrm/css/civicrm.css:

#civicrm-menu,
#root-menu-div ul {
        background-color: #5d677b;
        list-style: none;
        margin: 0;
        padding: 0;

Is there some other place I should make this change?

Thanks.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: editing civicrm css
March 25, 2014, 09:46:18 am
I would strongly advise you to not edit civicrm.css. Editing any file within the civicrm directory is what we call "hacking core" and is a bad idea™ for all these reasons.

Here are some alternatives:
  • Add the css rule to your wordpress css file. Use a more specific selector than the one civicrm.css uses and it will work.
  • Upload a new css file for your overrides and ask civicrm to include it for you (Administer >> System Settings >> Resource URLs)
Try asking your question on the new CiviCRM help site.

civieric

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: WordPress
  • MySQL version: 5.5.32
  • PHP version: 5.4.17
Re: editing civicrm css
March 25, 2014, 10:18:21 am
OK. Sounds reasonable.

(Adding a rule to the wordpress css core is not "hacking the core" but adding it to the civicrm css is hacking the core? ;)  )

Are there any published alternative "skins" available for CiviCRM in WP?

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: editing civicrm css
March 25, 2014, 02:03:37 pm
Quote
Adding a rule to the wordpress css core is not "hacking the core" but adding it to the civicrm css is hacking the core? ;)
Well a lot of WP themes don't offer a better solution. I wouldn't call it a best practice but it does seem to be a pretty widespread practice in the WP world.
If you want a maintainable WP site then I recommend creating a custom css file for theme overrides.

Quote
Are there any published alternative "skins" available for CiviCRM in WP?
Nope. CiviCRM isn't built to be skinnable unfortunately. This is something we could do better. And "we" includes you and everyone else in the community - this is open-source after all :)
Try asking your question on the new CiviCRM help site.

civieric

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: WordPress
  • MySQL version: 5.5.32
  • PHP version: 5.4.17
Re: editing civicrm css
March 25, 2014, 02:36:33 pm
Right.

If I create an alternative skin, I'll share it. Based on what has been said here, I take it that would consist of a detailed and self-consistent override css? Right now the only thing I'm looking at changing is the background color on the menu and maybe making it a bit bigger and maybe changing the font. If I get that working I can probably just post that override css in this thread.

I always work with child themes in WP but I think with my first client I'm just going to use a default theme since their CiviCRM will be separate from their main site, at least initially till we sort out hosting etc.

Thanks.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: editing civicrm css
March 25, 2014, 07:14:50 pm
This doesn't affect the menu, but you might be interested to see the theme improvements in 4.5.The font is certainly more readable.
Check http://wordpress.sandbox.civicrm.org

And in a future version there is talk of moving to bootstrap-based theming so that just might give us skins for free.
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • editing civicrm css

This forum was archived on 2017-11-26.