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/field/theme/field.css (and field-rtl.css)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ZenDoodles’s picture

Title: Clean up css in Field UI » Clean up css in Field
Component: field_ui.module » field system
mjonesdinero’s picture

test in http://csslint.net found two warnings attach is the patch i have created and tested locally, nothing was broken.

mjonesdinero’s picture

opsss ignore the patch attach, i attached a wrong patch it is for the file..sorry with that

mjonesdinero’s picture

Status: Active » Needs review
FileSize
1002 bytes

here is the latest file.. the first one is a mistake..

found out two warnings one on each css files

droplet’s picture

Status: Needs review » Needs work
+++ b/core/modules/field/theme/field.cssundefined
@@ -16,7 +16,7 @@ form .field-multiple-table td.field-multiple-drag {
+form .field-multiple-table td.field-multiple-drag .tabledrag-handle {

csslint should warning this too

mjonesdinero’s picture

Assigned: Unassigned » mjonesdinero

but css lint give me a no warning on this..

droplet’s picture

Disallow overqualified elements Element (td.field-multiple-drag) is overqualified, just use .field-multiple-drag without element name.
form .field-multiple-table td.field-multiple-drag .tabledrag-handl

mjonesdinero’s picture

Status: Needs work » Needs review
FileSize
1.12 KB

sorry about that droplet.. attach updated patch now..

droplet’s picture

Thanks.

For this issue purpose it is enough. But we can also remove starting "form". If we want to tell its inside a form. I'd suggest ".form-item" or ".form-wrapper"

barraponto’s picture

What about .tabledrag-processed? I mean, these styles are only meant for when there's javascript enabled.

barraponto’s picture

Status: Needs review » Reviewed & tested by the community

Anyway, that's enough for this issue. We should probably create a new issue on unifying tabledrag css.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

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