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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

iflista’s picture

Changed ids into classes and in .css .js files.
And there is still problem with duplicate background image.

tlattimore’s picture

Status: Active » Needs review

The javascript does not need to be altered in relation to this issue at all. Also, the html related to the selectors that has to been changed need to have the new classes added. The patch only updated the css.

tlattimore’s picture

Status: Needs review » Needs work

re-tagging. Meant to to select needs work in #2.

iflista’s picture

tlattimore, I grepped all code for ids and they were found only in css and js files of a module.
How to find html related to css ids if grep found only this:

Igors-Mac-Pro:drupal iflista$ grep -r '#edit-openid-identifier' *
core/modules/openid/openid-rtl.css:#edit-openid-identifier {
core/modules/openid/openid.css:#edit-openid-identifier {
core/modules/openid/openid.js:      var $edit_openid_identifier = $('#edit-openid-identifier');
core/modules/openid/openid.js:        $('#edit-openid-identifier')[0].focus();
core/modules/openid/openid.js:        $('#edit-openid-identifier').val('').removeClass('error');

Thanks.

atu’s picture

Status: Needs work » Needs review
FileSize
2.67 KB

I try css way to do this clean up.

c960657’s picture

Issue tags: -html5

#5: openid-csslint-1663140-5.patch queued for re-testing.

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

The last submitted patch, openid-csslint-1663140-5.patch, failed testing.

atu’s picture

Why this patch doesn't pass the testing ?

c960657’s picture

The patch is old, and a lot has happened in core since then. You (or somebody else) need to create a fresh version of the patch.

barraponto’s picture

Status: Needs work » Needs review
FileSize
1.17 KB

I've written the patch all over again, making the item list openid-link more reusable and cleaning up everything else but the double declaration of background-image. but as I see it, they're two completely different widgets, with no sprite usage (or need). So I think this is enough.

c960657’s picture

-#block-user-login #openid-login-form {
+.user-login-form + .openid-login-form {

This seems a bit fragile, e.g. if some theme wraps form elements in divs. What do you think of .block-user .openid-login-form { instead?

barraponto’s picture

@c960657 it's better, although it ties openid-login-form to user module blocks :/

c960657’s picture

No it doesn't. In fact, the form is also used on its own on user/login/openid. However, the mentioned rule is specific to the toggle mechanism used in the user block. If we want to untie this connection, we need to change the JavaScript and PHP code also, not just the CSS.

wiifm’s picture

Project: Drupal core » OpenID
Version: 8.x-dev » master
Component: openid.module » OpenID Client

This is no longer a Drupal core issue as it has been moved to contrib - see #556380: Remove OpenID from core