We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Over-riding hard-wired graphics within core theme files

Development and Programming

russlipton's avatar
russlipton
305 posts
15 years ago
russlipton's avatar russlipton

Is it possible to over-ride html/css that is currently hard-wired into Default’s PHP theme files?

At the moment, I am thinking especially of calls to specific graphical elements (e.g., the search form button; paging icons for the edit screen, etc). So far as I know, I can’t ‘force’ a customized theme to display (path to) a search form graphic within the themes third-party directory … nor turn off display of the icon from the core file. The intense pinkness of the default graphics is troublesome for customizaations.

Given CSS processing hierarchies, I suspect there are four solutions:

  1. EllisLab to redesign the hard-wired graphics to be color-neutral (black, gray, etc). Easiest and fine by me. While I would prefer the option of supplying custom graphics myself, this could be a quick, graceful solution in the next build.

  2. Migrate invocation of the hard-wired icons away from the core files in future EE builds. But I’m guessing from code inspection that this may not be so clean/simple for EE 2.1 as would appear.

  3. Use a CSS hack as yet unknown to me to overlay or otherwise manipulate the final appearance of CP pages.

  4. I could offer users of custom themes the option of applying awkward hacks personally. They could copy a few customized icons into Default’s own image directory. This would avoid breaking licensing by public redistribution of Default’s own folders/files by me, but is unpleasant for all.

Help appreciated.

       
ender's avatar
ender
1,644 posts
15 years ago
ender's avatar ender

remember that a later CSS rule will override a previous CSS rule with the same selector. You might be able to whip up a stylesheet and an accessory or such to include it in the head after the main theme stylesheet has been loaded.

       
russlipton's avatar
russlipton
305 posts
15 years ago
russlipton's avatar russlipton

Yes, indeed, thanks and I tried that. But some of these, at least, are inline, which trumps all.

….. cf also the login/associated PHP /account files. There, styles are defined in the file’s own HEAD, but styles inserted into the HEAD from the third-party directory will be processed before, not after, these. In other words, styles I define are assembled before login.php is processed.

AFAIK.

Further instruction/corrections welcome. With me, a little knowledge of CSS is definitely dangerous.

       
ender's avatar
ender
1,644 posts
15 years ago
ender's avatar ender

the only other thing I could really think of to override that stuff would be to use some jQuery that runs on page load. Not really ideal but it would probably get the job done.

       
russlipton's avatar
russlipton
305 posts
15 years ago
russlipton's avatar russlipton

@ender: again, thanks - this thought also occurred to me, but it feels a bit like using a bazooka to swipe a gnat. Sigh. I am hoping staff/developers will weigh in with some ideas.

       
Shellster's avatar
Shellster
33 posts
15 years ago
Shellster's avatar Shellster

This may be outdated by now, but worst-case scenario you could write your CSS rules with the !important declaration attached, which will automatically override the inline styles that are being applied. Unless of course, the inline styles already have a !important declaration attached.

Example:

CSS:

p { color: #000 !important; }

HTML:

Hello.

The text would still show up black because of !important.

Unfortunately IE 6 and 7 (in quirks mode only/no doc-type) won’t recognize this addition and will simply use the last rule that was declared.

Hope that helps for future reference!

       
russlipton's avatar
russlipton
305 posts
15 years ago
russlipton's avatar russlipton

Hey, help is never outdated. Oh yeah, I’ve got so many !important declarations that almost !nothing !is !unimportant ….

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.