Currently the theme applies drop shadows to images. In some situations I would prefer the images not have a drop shadow applied. Is there a way to not apply drop shadows to specific images?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

westis’s picture

Assigned: Unassigned » westis

Yup, I'm actually trying to accomplish this myself. Have written a thread here: https://drupal.org/node/2040535

The issue is to add a class to images that should not have borders/drop shadows. I haven't yet tested the patch in the above thread, but will do that when I get time. Then we just need to add a style for the class "noborder" to the theme.

Will look at this next week.

westis’s picture

I've added a request to add the patch for the Picture module, to include a class for an image (and then style that class in CSS Injector for example, to remove the border around the image): https://drupal.org/node/2107409

Finnaholm’s picture

Issue summary: View changes

There is an issue with the Media module (not Picture) - it's not cooperating well with the WYSIWYG-editors. Properties are not saved since the images are not regular tags. See:

https://drupal.org/node/1801308
https://drupal.org/node/2067063

Until the Media module is properly patched, to remove the border one need to change the editor to plain text or use the "edit html" feature and then manually add the "noborder" class - either directly to the image properties or to a paragraph tag surrounding the image.

The only thing changed in the cm_theme is the addition of noborder class to the css:

.noborder img { box-shadow: none; }

kreynen’s picture

According to comments on #2067063: Wysiwyg integration is broken the dev release of Media back in Nov 2013 fixed the main issues.

@jwilson3 confirmed that it was working if the patch for #2126697: Wysiwyg -- Alt and Title fields require some special handling. was added.

Have you tested the dev version? The dev version with that patch?

kreynen’s picture

Assigned: westis » Unassigned
Issue tags: +cmd-release-blocker
Finnaholm’s picture

I have tried the dev version now and I can confirm it does work (without the additonal patch).

Now to test the dev version some more to make sure it doesn't introduce new problems.

libkuman’s picture

Issue tags: -cmd-release-blocker +cmd-release-blocker cmd
kreynen’s picture

Issue tags: -cmd-release-blocker cmd +cmd-release-blocker, +cmd
bagelche’s picture

To get rid of the drop shadows, I used this line in CSS Injector:

#main img { box-shadow: 0 0 0; }

which gets rid of drop shadows across the board in the theme. It doesn't address the desire/need for a mechanism to have drop shadows on some issues through classes or another method.

kreynen’s picture

Assigned: Unassigned » kreynen
kreynen’s picture

Status: Active » Needs work
Issue tags: -cmd +cmd-starter

I've added a textarea to the settings form at admin/appearance/settings/cm_theme_zen to add or remove the CSS classes and/or ids you want the dropshadow treatment on. I've removed the dropshadows applied to img from the css and sass file and then dynamically add them in the html.tpl.php.

While this gets the job done, it would be nice to have some checkboxes of human readable options for people to click that could add dropshadows to "Images in Full Page", "Images in Teaser", etc.

adding cmd-starter since anyone with some basic PHP skills could build on this

kreynen’s picture

Priority: Normal » Major
Issue tags: +cmd-next-release

I had a working version of this, but it never got committed. Recreating now.

kreynen’s picture

Status: Needs work » Needs review
FileSize
41.86 KB

This IS in the current dev snapshot. Configuration can be found at admin/appearance/settings/cm_theme_zen