See: #1995272: [Meta] Refactor module CSS files inline with our CSS standards
Remaining tasks
Review the current CSS — What to look for when reviewing CSS
User interface changes
None
API changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | after_seven_system_status_report.png | 379.44 KB | kyuubi |
| #16 | before_seven_system_status_report.png | 361.32 KB | kyuubi |
| #16 | interdiff-12-16.txt | 596 bytes | kyuubi |
| #16 | system_status_report-2412949-16.patch | 4.79 KB | kyuubi |
| #13 | Screen Shot 2015-03-17 at 12.50.49.jpg | 969 KB | lewisnyman |
Comments
Comment #1
kyuubi commentedHi LewisNyman,
Just started looking at this and begun with the status report system table.
Here is a first patch just for that component.
Some considerations:
.system-status-report.These components are:.system-status-report__header.system-status-report__bodysystem-status-report__entry.system-status-report__status-icon.system-status-report__status-title.system-status-report__status-value.is-error.is-warning.is-infoFor this I changed the respective twig file, seven tables.css colors.css (these should probably be moved to a states like states.css or severity.css?) and system system.admin.css.
Also, in regards to the states it feels redundant to have the error state on the entry as well as the status icon. My suggestion is to have it only on the parent but I didn't want to patch it before discussing that.
Let me know if I am on the right track and I will continue working on it. I am still getting used to the new standards as they are, so any guidance is welcome :)
Thanks,
Comment #2
kyuubi commentedComment #3
lewisnymanI was thinking that maybe this issue could tackle just the
<table>element CSS and related tags, but I guess we are making good progress here with system-status-report so let's carry on.I think that we need to keep these classes as color-x classes. They were added in #2336141: Create reusable color classes as utility classes, so they technically aren't states. Also according to the SMACSS guidelines you are only allows to use states when chained together with a component, on their own they are too generic.
This is good but is there any chance we can remove the need for the div element within the selector? Can we put everything under the class?
These classes should stay as --modifiers and not states. I'm pretty sure they fall under the SMACSS definition of variants and not states
Great
Do we use these classes anywhere? If we don't we should remove them
Same here, if we don't use this class in CSS we can just remove it from markup
Can we move this system-status-report into it's own file? I don't think it makes sense to have it in this file
Comment #4
kyuubi commentedHi LewisNyman,
Thanks for your review!
Makes sense that they are only used as states when used in the component, that was actually where I was heading, however given the https://www.drupal.org/node/2336141 I agree we can maintain them as separate classes.
Will provide a patch with all these changes and get back to you.
Cheers,
Comment #5
lewisnymanI think that's ok, we don't need to provide every possible class in Classy.
That sounds like a good idea to me
Comment #6
kyuubi commentedGreat,
Will give you a patch for everything tomorrow.
Comment #7
kyuubi commentedHey,
Ok so I took care of all the issues we identified plus a couple of another ones.
The one thing that is still annoying me is the need for the
.system-status-report tdin system.admin.css to make the vertical-align:top.It would be really good to get read of it, but we need the align top here for readability.
Any suggestions?
Comment #8
kyuubi commentedForgot to attach the screens.
Comment #9
idebr commentedThis styling is actually used currently in Stark. Is there a reason why this should be removed?
According to Drupal CSS coding standards every declaration should be followed by a single space, eg. use 'content: ""', instead of 'content:""'.
Comment #10
kyuubi commentedHi idebr,
Thanks for your review!
Let me know what you guys think regarding 1)
Comment #11
lewisnymanThis styling based off an old design, and is overridden in Seven when it implemented to new design. I think it's ok to remove it here. It makes no sense to include this kind of opinionated design in Stark.
Comment #12
kyuubi commentedAttached path and interdiff as per #9.1
Comment #13
lewisnymanThanks, these are before/after screenshots in Classy:
Before

After

There are some design differences here, but not user facing, as Seven overrode these anyway. Inline with our CSS standards, modules should not be including this theme-level of styling.
Marking RTBC and we'll see if that makes sense to a committer :)
Comment #14
alexpottWell it is admin user facing if using stark. This change makes the status report much harder to read in stark.
Also can we get screenshots of this in seven
Doesn't this mean we should have a screenshots of seven?
Comment #15
lewisnymanThe intention of Stark is not to provide a useable interface, it's a functional base theme. It's only selectable as an active theme as a demonstration of Drupal's default output. I think that this issue is just tidying up the separation between the module CSS and the theme CSS.
Ah yes because we need to confirm that the design has not changed in Seven. The previous patch is missing the new system-status-report.css file.
Comment #16
kyuubi commentedHey,
Sorry guys my bad forgot to add the system status report css file to the commit.
Attaching correct patch along with before and after screens.
Comment #17
idebr commentedI had a second look after I noted this change earlier in #9 and I have to agree with @LewisNyman here. The styling is too opinionated to apply for all themes and Stark has no theme css of its own, so let's remove it entirely.
One thing I did not see mentioned:
This styling is removed, but never reapplied. This makes the status report a little more dense in Seven. I'll leave this up to @LewisNyman if this is ok.
Comment #18
lewisnymanAh yes, I think that styling was introduced before #1986400: Table style update when tables in Seven didn't have the spacing they have now. It is a design change but it seems like a such a minor change that I don't really see the benefit of keeping the inconsistency across tables.
Comment #19
joelpittetBeauty RTBC+1
Comment #20
alexpottWe should have a CR to tell people about the new classes - there is a change record somewhere that is detailing changes to classes for 8.0.x
Comment #21
kyuubi commentedHi @alexpott I didn't find a generic CR like that.
What I found are several CRs for different CSS changes.
For the moment at least I created a CR for the system status component which would incorporate any changes to this component (same as for the help component).
Comment #22
joelpittetThank you @kyuubi. That looks like it has all the bits.
https://www.drupal.org/node/2464095
Comment #23
alexpottCSS is not frozen in beta. Committed 3d01747 and pushed to 8.0.x. Thanks!
Comment #25
nod_Looks like the change notice has the class names backwards between D7 and D8
Comment #26
kyuubi commentedHey @nod_,
Thanks for that, honestly dunno what happened there.
Fixed.
Comment #27
joelpittetthanks @nod_ and @kyuubi I should have spotted that too:(