Sub-issue of #1190252: [573] Use csslint as a weapon to beat the crappy CSS out of Drupal core
Inline with the CSS cleanup efforts of the HTML5 initiative, using CSSLint at http://csslint.net provides a quick way to code-sniff our css and tweak styles.

  1. Copy and paste the the stylesheet(s) below into the css lint tool at http://csslint.net and test.
  2. Fix any warnings or errors the tool finds.
  3. Patch Drupal 8 locally and make sure the css changes have not broken anything visually.
  4. Create patch and upload for the testbot.

Files: modules/book/book.css and book-rtl.css

Comments

droplet’s picture

Status: Active » Closed (won't fix)
csslint: There are 1 problems in core/modules/book//book.admin.css.

book.admin.css
1: warning at line 10, col 1
Don't use IDs in selectors.
.js #edit-book-pick-book {


csslint: No errors in core/modules/book//book.theme-rtl.css.


csslint: No errors in core/modules/book//book.theme.css.

This is for .js :(

droplet’s picture

Status: Closed (won't fix) » Active

wait. this is different meaning.

disasm’s picture

core/modules/book/book.theme.css - pass
core/modules/book/book.theme-rtl.css - pass
core/modules/book/book.admin.css - 1 warning:
Don't use IDs in selectors.
.js #edit-book-pick-book {

I grep'd the codebase for 'edit-book-pick-book' and got no results.

guy_schneerson’s picture

Status: Active » Needs review
StatusFileSize
new339 bytes

this is the first patch by the Brighton Drupal Group by @guy_schneerson and @dixhuit hope it helps.
It replaces the id with a class selector for the book submit button on the edit page.
Please let us know if we missed out anything.

Status: Needs review » Needs work
Issue tags: -Novice, -html5

The last submitted patch, clean_up_css_for_book-1662956-4.patch, failed testing.

guy_schneerson’s picture

Status: Needs work » Needs review
Issue tags: +Novice, +html5
dddbbb’s picture

OK, that looks like it's passed this time. Guy, what did you change or do differently?

guy_schneerson’s picture

@dixhuit the issue behind the issue Random test failures in SearchCommentTest its like a Fellini movie

dddbbb’s picture

Ahaaaah.

michaellenahan’s picture

@guy_schneerson, @dixhuit - I looked at Random test failures in SearchCommentTest but I can't work out what problem is being described there.

What was the difference between the first patch you submitted for testing and the second one? The patch seems so simple that it's odd that it would cause a test failure.

guy_schneerson’s picture

@michaellenahan didn't change a thing, only pressed the Re-test.
the "random test" issue suggests that this error comes up randomly for no good reason, Re-testing made it go away

droplet’s picture

That is random failed tests. Do not need to care about it :)

#4 is passed now and for normal case, the patch looks good.

guy_schneerson’s picture

@droplet thanks, do you know what the next stage we tested it and it worked fine but do we need others to test before setting state to "Reviewed & tested"?

devin carlson’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #4 applied cleanly and allowed the book outline form's submit button to continue to be hidden while utilizing a less-specific CSS selector.

The patch uses .book-outline-form (the nearest non-ID parent selector to the form's submit button) which is the best choice.

catch’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

Thanks for the manual testing. Committed/pushed to 8.x.

droplet’s picture

Status: Patch (to be ported) » Closed (fixed)

This is changing css order priorities. imo, all these kind changes should not backport.