Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
- Copy and paste the the stylesheet(s) below into the css lint tool at http://csslint.net and test.
- Fix any warnings or errors the tool finds.
- Patch Drupal 8 locally and make sure the css changes have not broken anything visually.
- Create patch and upload for the testbot.
Files: modules/openid/openid.css (and openid-rtl.css)
Comment | File | Size | Author |
---|---|---|---|
#10 | drupal-csslint-openid-1663140-10.patch | 1.17 KB | barraponto |
#5 | openid-csslint-1663140-5.patch | 2.67 KB | atu |
#1 | openid-idstoclasses-1663140-1.patch | 3.79 KB | iflista |
Comments
Comment #1
iflista CreditAttribution: iflista commentedChanged ids into classes and in .css .js files.
And there is still problem with duplicate background image.
Comment #2
tlattimore CreditAttribution: tlattimore commentedThe 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.
Comment #3
tlattimore CreditAttribution: tlattimore commentedre-tagging. Meant to to select needs work in #2.
Comment #4
iflista CreditAttribution: iflista commentedtlattimore, 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:
Thanks.
Comment #5
atu CreditAttribution: atu commentedI try css way to do this clean up.
Comment #6
c960657 CreditAttribution: c960657 commented#5: openid-csslint-1663140-5.patch queued for re-testing.
Comment #8
atu CreditAttribution: atu commentedWhy this patch doesn't pass the testing ?
Comment #9
c960657 CreditAttribution: c960657 commentedThe 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.
Comment #10
barraponto CreditAttribution: barraponto commentedI'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.
Comment #11
c960657 CreditAttribution: c960657 commentedThis 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?Comment #12
barraponto CreditAttribution: barraponto commented@c960657 it's better, although it ties openid-login-form to user module blocks :/
Comment #13
c960657 CreditAttribution: c960657 commentedNo 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.
Comment #14
wiifmThis is no longer a Drupal core issue as it has been moved to contrib - see #556380: Remove OpenID from core