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.
| Comment | File | Size | Author |
|---|---|---|---|
| #54 | 2574037.54.patch | 1.53 KB | sakthivel m |
| #46 | 2574037-46.patch | 1.57 KB | jofitz |
| #38 | ubuntu-performance-print-page.png | 25.36 KB | Maheshwaran.j |
| #36 | 2574037-36-rerolled.patch | 1.57 KB | deepakkumar14 |
| #33 | print-styles-dont-override-default-styles-properly-2574037-33.patch | 1.4 KB | pk188 |
Issue fork seven-2574037
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
Comment #2
juhog commented...
Comment #3
juhog commentedThis 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.
Comment #4
juhog commentedThis patch tweaks button styles and message styles.
OSX Chrome needs this. Otherwise .button--primary will have blue borders.
Comment #5
juhog commentedScreenshot related to comment #4.
Comment #8
juhog commentedTest 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
Comment #9
mradcliffeThis 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.
Comment #10
juhog commentedComment #11
mradcliffePHP-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.
Comment #12
juhog commentedComment #13
juhog commentedComment #14
mradcliffeLocaleUpdateTest 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.
Comment #15
mradcliffeComment #16
mradcliffeI 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.
Comment #17
Bojhan commentedComment #18
mradcliffeThis issue should be reviewed and the summary updated with regard to RC triage.
Scheduled a re-test of #4.
Comment #19
vwX commentedHello, I am going to evaluate this issue for rc eligibility.
Comment #20
vwX commentedHello,
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.::
Comment #21
mradcliffeI 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.
Comment #22
vwX commentedReran test bot and reviewed patch. Agree with comment #16.
Comment #23
xjmDiscussed 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.
Comment #26
Bojhan commentedI assume this means 8.1
Comment #28
juhog commentedThis 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?
Comment #29
joelpittethi @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)
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 .buttonI'm guessing you want to keep it because that button has #fff text, or is that overriden someplace else?Why only left is adjusted, wouldn't we need to adjust right too, or at least margin-right for RTL?
Comment #31
mgiffordComment #33
pk188 commentedRe rolled as #4 failed to apply. And fixed #29.
Comment #34
mradcliffeI 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?
Comment #36
deepakkumar14 commentedRerolled patch.
Comment #37
Maheshwaran.j commentedComment #38
Maheshwaran.j commentedHi 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.
Comment #39
kiruba karan commentedComment #40
Maheshwaran.j commentedChanging to RTBC as no other review is done.
Comment #42
lauriiiComment #43
Maheshwaran.j commentedComment #44
Maheshwaran.j commentedRerolled Patch, Kindly someone test and review.
Comment #46
jofitzThe 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).
Comment #53
sakthivel m commented#46 Patch Failed
Comment #54
sakthivel m commented#54 Please review the patch
Comment #55
yogeshmpawarRemoving Needs reroll tag as it is no longer needed.
Comment #58
longwaveThe 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.
Comment #59
avpadernoComment #60
avpadernoComment #63
immaculatexavier commentedComment #64
avpadernoComment #66
avpadernoComment #68
avpadernoThank you!
Comment #69
xjmAmending attribution.