The Bartik theme removes the visual indicator (pink background) for unpublished nodes.

node.css has a .node-unpublished style (line 2):

.node-unpublished { 
  background-color: #FFF4F4;
}

That is overwritten by bartik's style.css when the class "node-full" is present (line 605):

.node-full {
  background: none repeat scroll 0 0 transparent;
  ...
}

I added the following style to a custom stylesheet:

.node-full.node-unpublished {
  background-color: #FFF4F4;
}

Would this be a reasonable addition to bartik's style.css?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

_vid’s picture

_vid’s picture

Version: 7.17 » 7.x-dev
Status: Active » Needs review
antoniotorres’s picture

Status: Needs review » Reviewed & tested by the community

Applied the patch and everything works and looks good.

theMusician’s picture

FileSize
12.3 KB
14.68 KB

The patch does indeed add the pink background. I have attached an image prior to the patch and one after the patch.

No patch:
No patch

With patch:
Patch applied and pink background appears.

It certainly appears that the light pink background should be included on full nodes as unpublished comments have the light pink background.

_vid’s picture

Nice thanks for reviewing it.
By the way I made the patch from a diff and so I suppose this will be the correct commit line:
git commit --author="vid <vid@631512.no-reply.drupal.org>"

David_Rothstein’s picture

Status: Reviewed & tested by the community » Needs review

Looks like this is fixed in Drupal 8 already, but for Drupal 7 really needs more reviews and cross-browser testing. We especially need to be very careful to make sure that a fix for this won't break subthemes.

This also looks like it has been discussed in great detail in #862854: No styling for sticky, so I'll leave a note there pointing to this issue.

At first glance it's not clear why we'd override the .node-full override again (rather than removing it), although given the discussion in #862854: No styling for sticky the approach here might be more backwards-compatible?

gaurav-mathur’s picture

Assigned: Unassigned » gaurav-mathur
Issue summary: View changes
gaurav-mathur’s picture

Assigned: gaurav-mathur » Unassigned
FileSize
8.2 KB

I applied the patch on my setup and everything works good.

Saman Malik’s picture

Patch Failed to apply

Checking patch themes/bartik/css/style.css...
error: while searching for:
  border: none;
  padding: 0;
}
.node-teaser .content {
  clear: none;
  line-height: 1.6;

error: patch failed: themes/bartik/css/style.css:607
error: themes/bartik/css/style.css: patch does not apply
poker10’s picture

Actually the patch from #1 still applies, see: https://www.drupal.org/pift-ci-job/2592523

apaderno’s picture

I can confirm the provided patch still applies to the 7.x branch.