Problem/Motivation

Some of the print styles have no effect and some of them are incomplete.

Proposed resolution

Print.css is currently in the "base" category which makes it one of the first css files to be included in the page. We should move it to "theme" category to make it one of the last css files. This way the all the print styles are able to override the default styles properly.

In addition, message styles and button styles need some additions/changes to make them look nice cross-browser.

User interface changes

Screenshots are from OSX Chrome. I have tested the changes on multiple different browsers on OSX and Win7.

Before:

After:

API changes

None.

Data model changes

None.

Why this should be an RC target

This change allows the css to be overridden correctly for the seven theme. It also makes the print.css location consistent with bartik theme in the yml file.

Issue fork seven-2574037

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

juhog created an issue. See original summary.

juhog’s picture

...

juhog’s picture

This patch moves the print.css into "theme" category.

Attached screenshots show how this change affects message styles.

I have more fixes/tweaks coming up related to print styles. I'll post them in separate patches.

juhog’s picture

This patch tweaks button styles and message styles.

+++ b/core/themes/seven/css/base/print.css
@@ -4,6 +4,7 @@
+    transition-property: none !important;

OSX Chrome needs this. Otherwise .button--primary will have blue borders.

juhog’s picture

StatusFileSize
new155.05 KB

Screenshot related to comment #4.

Status: Needs review » Needs work

juhog’s picture

Issue summary: View changes

Test keeps failing for some strange reason. I had a chat with @YesCT and she noticed that the pifr test (old testbot) succeeds and only the new one fails. I already sent the patch for re-testing but the re-test failed also (both of them the same way, I'm pretty sure). Here's some details about the failing test:

PHP 5.5 & MySQL 5.5 13,975 pass, 1 fail
https://www.drupal.org/pift-ci-job/38929

testUpdateImportSourceRemote
fail: [Other] Line 144 of core/modules/locale/src/Tests/LocaleUpdateTest.php:
Updates for Contrib module one

mradcliffe’s picture

This does seem like a random test failure. I queued up drupalci using php 5.6 and php 5.5 pgsql to see if that makes any difference.

I'll spin up my local testbot, and see if I can get any more details about that failure. I need to rebuild all my containers though as I last built them 2 weeks ago.

juhog’s picture

Issue summary: View changes
mradcliffe’s picture

Issue tags: +Random test failure

PHP-5.6 Mysql 5.5 testbot passes. This does seem like a random test failure so I added the Random test failure tag. I am still rebuilding my drupalci containers locally so I can see if it that particular test fails on a testbot in the U.S.

I have a feeling that drupal.org had a hiccup for getting updates.

juhog’s picture

Issue summary: View changes
juhog’s picture

Issue summary: View changes
mradcliffe’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new1.61 KB

LocaleUpdateTest has had random test failures before and it used to be quite frequent in #2443633: PostgreSQL: Fix locale\Tests\LocaleUpdateTest, #2157927: Intermittent test fails in LocaleUpdateTest::testUpdateImportSourceRemote(), and more recently #2229979: Random test failure in SimpleXMLElement in Locale tests.

I confirmed that on PHP-5.5-mysql-5.5 testbot that I just rebuilt that the locale tests pass, and I am setting this back to Needs Review.

Ninja edit: I added back the tasks in the issue summary to show what you have completed so far with "(done)" appended to the task, @juhog.

mradcliffe’s picture

Issue summary: View changes
mradcliffe’s picture

Issue tags: +Needs beta evaluation

I reviewed the CSS changes for any coding standard regressions, and the patch conforms to CSS changes. Also the patch does what is intended. The two selectors are necessary because the seven theme defines different styles for .button and .button--primary respectively.

All current tests passing. I could not find an existing test that specifically tries to test the DOM for CSS media behavior. CSS Asset grouping already has a unit test that passes.

One thing that still needs to be done is adding a Beta Evaluation into the issue summary so that a core committer can confirm that the category and priority are correctly identified. After that's added, I think this is RTBC unless any front end folks have any specific review comments.

Bojhan’s picture

Category: Task » Bug report
mradcliffe’s picture

This issue should be reviewed and the summary updated with regard to RC triage.

Scheduled a re-test of #4.

vwX’s picture

Hello, I am going to evaluate this issue for rc eligibility.

vwX’s picture

Issue summary: View changes
Issue tags: -Needs beta evaluation +rc target triage, +rc eligible

Hello,

Evaluated this for RC eligibility and believe that it should be included. The reasoning for this is that the patch does not change any code, it makes the seven theme consistent with the bartik theme in regards to the location on the print.css.

::Forgot to note that the summary has been updated.::

mradcliffe’s picture

Issue tags: -rc eligible

I think this is not rc eligible because it is not a non-disruptive coding standard change, doc fix, or library update per https://www.drupal.org/core/d8-allowed-changes#rc. This, however, could be a candidate for rc target for the reason that @vwX gave above.

vwX’s picture

Status: Needs review » Reviewed & tested by the community

Reran test bot and reviewed patch. Agree with comment #16.

xjm’s picture

Issue tags: -Random test failure, -rc target triage

Discussed with @lauriii. Since both Seven and Bartik are going to be treated as internal, this bugfix will potentially be safe to make in a patch release. Since it is not that high-impact, there is not a strong case for it to go in during the RC phase. Thanks!

Also, usually we add the "random test failure" tag to issues that discuss the failure themselves, not just where a random failure result occurs, so removing that tag as well.

Status: Reviewed & tested by the community » Needs work

Bojhan’s picture

Version: 8.0.x-dev » 8.1.x-dev

I assume this means 8.1

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

juhog’s picture

This issue is currently in "Needs work" status. I suppose that's because the tests started failing on October 30 2015. I could try to fix the situation but I'm not quite sure how. Any tips where to start?

joelpittet’s picture

hi @juhog, CSS doesn't get tested, that must be random.

Here's a review to help move this along. Would you mind posting a new patch and we can see how it takes with the test bot (i'll bet it will have no problems)

  1. +++ b/core/themes/seven/css/base/print.css
    @@ -42,12 +43,16 @@
    -  .button, .button--primary {
    -    background: none !important;
    +  .button,
    +  .button--primary {
    +    background-image: none;
    +    border-color: #999;
    +    font-weight: inherit;
    

    I'm curious why the font-weight: inherit; is needed? And wouldn't this make background-color show now? or an image with a more specific selector like .js .form-actions .dropbutton-wrapper .dropbutton-widget .dropbutton-action .button I'm guessing you want to keep it because that button has #fff text, or is that overriden someplace else?

  2. +++ b/core/themes/seven/css/base/print.css
    @@ -42,12 +43,16 @@
       .messages {
         border-width: 1px;
         border-color: #999;
    +    margin-left: 0;
       }
    

    Why only left is adjusted, wouldn't we need to adjust right too, or at least margin-right for RTL?

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mgifford’s picture

Issue tags: +print.css

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

pk188’s picture

Status: Needs work » Needs review
StatusFileSize
new1.4 KB

Re rolled as #4 failed to apply. And fixed #29.

mradcliffe’s picture

I couldn't generate an interdiff between #4 or #33 as the tool errors out due to rejected hunks.

Reviewing the the patch in #33 manually I see the following changes:

1. No longer necessary to fix the input selectors as in patch #4 as that is in core already.
2. No longer necessary to fix the button selectors as in patch #4 as that is in core already. The patch in #33 correctly re-rolls this to include the style changes in #4.
3. #29 is resolved by adding margin-right: auto; in patch #33.

I think that the fix for #29 probably needs frontend review for that?

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

deepakkumar14’s picture

StatusFileSize
new1.57 KB

Rerolled patch.

Maheshwaran.j’s picture

Assigned: Unassigned » Maheshwaran.j
Maheshwaran.j’s picture

StatusFileSize
new25.36 KB

Hi all ,

The patch applies cleanly to 8.5.x. Since I am using Ubuntu I cannot say for W7 or OSx but the patch works as expected. Please find the attachment.

kiruba karan’s picture

Assigned: Maheshwaran.j » Unassigned
Maheshwaran.j’s picture

Status: Needs review » Reviewed & tested by the community

Changing to RTBC as no other review is done.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll
Maheshwaran.j’s picture

Assigned: Unassigned » Maheshwaran.j
Maheshwaran.j’s picture

Assigned: Maheshwaran.j » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.56 KB

Rerolled Patch, Kindly someone test and review.

Status: Needs review » Needs work

The last submitted patch, 44: 2574037-rerolled-8.6x-#43.patch, failed testing. View results

jofitz’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new1.57 KB

The patch from #36 did/does not require a re-roll - it applies cleanly to 8.6.x and passes the tests.

I am re-uploading a copy of the patch from #36 so that it is the latest patch (and therefore the one run by the testbot).

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

sakthivel m’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

#46 Patch Failed

sakthivel m’s picture

Status: Needs work » Needs review
StatusFileSize
new1.53 KB

#54 Please review the patch

yogeshmpawar’s picture

Issue tags: -Needs reroll

Removing Needs reroll tag as it is no longer needed.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

longwave’s picture

Project: Drupal core » Seven
Version: 9.5.x-dev » 1.0.0-alpha1
Component: Seven theme » Code

The Seven theme has been removed from Drupal 10 core. I confirmed that this issue only affects Seven and no other themes included with Drupal core, so I am moving this to the contributed Seven project.

avpaderno’s picture

Version: 1.0.0-alpha1 » 1.0.x-dev
Status: Needs review » Needs work
Issue tags: +Needs merge request
avpaderno’s picture

Issue summary: View changes

immaculatexavier made their first commit to this issue’s fork.

immaculatexavier’s picture

Status: Needs work » Needs review
avpaderno’s picture

avpaderno’s picture

  • avpaderno committed 6ca0cc50 on 2.0.x
    Issue #2574037: Print styles don't override default styles properly
    
avpaderno’s picture

Status: Needs review » Fixed

Thank you!

xjm’s picture

Amending attribution.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.