There are some repetitive width properties set in the admin interface. We can make these more consistent by created generic layout classes and applying them the relevant elements. Contrib modules could also use these for more complex admin interfaces without having to write their own layout CSS.
Test steps
The branding header margins and the general page margins should align
The admin/config page should be displayed in two columns on large screens.
Comment | File | Size | Author |
---|---|---|---|
#86 | Screen Shot 2014-06-06 at 19.52.10.jpg | 248.7 KB | LewisNyman |
#84 | create_generic_layout-2017257-84.patch | 5.32 KB | jason.bell |
#83 | seven-layout-styles-2017257-83.patch | 5.31 KB | dead_arm |
#76 | layout-styles-admin-classes-before-after.png | 624.23 KB | philipz |
#70 | re-roll-2017257-70.patch | 5.18 KB | LewisNyman |
Comments
Comment #1
LewisNymanComment #3
LewisNymanComment #4
frankbaele CreditAttribution: frankbaele commentedComment #5
frankbaele CreditAttribution: frankbaele commentedupdated the patch and used a fluid layout system
Comment #6
LewisNymanHey Frank,
This looks good but it looks like there's an error in the patch. By default when you git diff a patch it won't include new files. The way I add files is like this:
git diff --cached > the-patch.patch
That will include every file that is staged.
Comment #7
frankbaele CreditAttribution: frankbaele commentedComment #9
frankbaele CreditAttribution: frankbaele commentedok, hope i redeem myself with this patch,
Comment #10
frankbaele CreditAttribution: frankbaele commentedComment #11
rteijeiro CreditAttribution: rteijeiro commentedI guess we should use
[dir="rtl"]
statement for LTR selectors likemargin, padding...
Comment #12
emma.mariaComment #13
emma.mariaWork carried out in this patch.
Comment #14
emma.mariaComment #15
rteijeiro CreditAttribution: rteijeiro commentedRemove trailing space :)
Remove trailing spaces :P
Should add
margin-left: 0;
here?Comment #16
emma.mariaThanks for pointing those things out. I have removed the trailing spaces and added the margin-left that was needed.
Comment #17
LewisNyman#16: seven-layout-styles-2017257-16.patch queued for re-testing.
Comment #19
LewisNymanRe-rolled
Comment #20
rteijeiro CreditAttribution: rteijeiro commentedPatch applies well and code seems ok. Let's wait for "Green" and go fo RTBC!
Comment #21
webchickErm. I'm pretty sure none of this has anything to do with this patch. :) Needs a re-roll?
Comment #22
rteijeiro CreditAttribution: rteijeiro commentedRe-rolled!
Comment #23
idebr CreditAttribution: idebr commentedChanges from #22:
Comment #24
LewisNyman23: seven-layout-styles-2017257-23.patch queued for re-testing.
Comment #26
LewisNymanComment #27
LewisNymanComment #28
LewisNymanrerollolololol
Comment #29
rteijeiro CreditAttribution: rteijeiro commentedRe-rolled.
Comment #31
emma.maria29: seven-layout-styles-2017257-28.patch queued for re-testing.
Comment #33
LewisNyman29: seven-layout-styles-2017257-28.patch queued for re-testing.
Comment #35
LewisNymanComment #37
LewisNymanYou SHALL pass!
Comment #38
philipz CreditAttribution: philipz commentedRecently commited install-page.html.twig #2041793: install-page.html.twig markup and CSS adds one element with
l-container
class around all 'regions'.This patch adds the class both inside #branding but on #page element. Is this made like that on purpose? Looks somewhat inconsistent.
It does not apply anymore too. I will re roll this in couple of hours.
Comment #39
LewisNymanLet's re-roll this inline with the changes in #2041793: install-page.html.twig markup and CSS
Comment #40
philipz CreditAttribution: philipz commentedFirst a re-roll of #37 just to have a starting point... and now I'll look what can be improved inline with #2041793: install-page.html.twig markup and CSS.
Comment #41
philipz CreditAttribution: philipz commentedSmall fix.
Comment #43
philipz CreditAttribution: philipz commentedAfter looking through the code I think it's the #2041793: install-page.html.twig markup and CSS that will need updating after this gets in not the other way around.
The install page css uses
l-container
class for more than just layout (background: #fff;
) and duplicates it's layout rules.So the current
<div class="l-container">
in install-page.html.twig could probably become<div id="page" class="l-container">
and css in install-page.css will be simplified too.This fill need a small follow up issue but let's get this one in first.
Comment #45
philipz CreditAttribution: philipz commentedFailing test fix added.
Comment #46
LewisNymanClicking around most things look fine, apart from the update page. Adding related issues that cross paths with this patch.
/
Comment #47
LewisNymanOh also, it would be great to replace #page with .page :)
Comment #48
philipz CreditAttribution: philipz commentedI've added #page padding back (it was removed in #41). This was breaking other pages too but you might have not seen it if you didn't open any page with secondary tabs.
The reason why this sometimes was not seen is #console which - at least in Chrome - was making top padding on some pages.
Comment #49
philipz CreditAttribution: philipz commentedChanging #page to .page (or just moving all the styling to .page but leaving #page id in html?) might be a good idea but for a follow-up issue? :)
It's not only #page but #branding, #footer and more.
Comment #50
LewisNymanIt does, let's make another issue to clean up the Seven page.tpl.php. I think we can actually get rid of the #console div and get away with it.
Comment #51
LewisNyman48: seven-layout-styles-2017257-48.patch queued for re-testing.
Comment #53
LewisNymanReroll and tidy up. I also implemented the columns in the admin panels in the admin/config page.
Comment #54
LewisNymanComment #55
philipz CreditAttribution: philipz commentedThe patch looks good, applies correctly and needs cache clearing if anyone is testing too.
I think this could be commited and then a follow up applied to other places like node add/edit form, blocks layout and so on.
This should move forward so changing status:)
Comment #56
tstoecklerIs this some sort of new-age themer lingo? :-) Otherwise I don't think this is correct.
Comment #57
philipz CreditAttribution: philipz commentedHaha, nice catch :D
Comment #58
philipz CreditAttribution: philipz commentedNo more boob.
Comment #59
rteijeiro CreditAttribution: rteijeiro commentedRe-rolled and fixed some minor things.
Not sure about leaving
$stripe
variable and$block['position']
array intemplate_preprocess_admin_page()
function, but if I remove it it breaks the two column layout inadmin/config
. Any ideas?Comment #60
ckrinaComment #61
ckrina#59 patch applies fine.
Comment #62
philipz CreditAttribution: philipz commentedThere's still some unnecessary left and right margins on
#page
- around line 435-450 in style.css.Comment #63
Manuel Garcia CreditAttribution: Manuel Garcia commentedPatch #59 no longer applies, this got in: #2169765: Redesign update.php to be more consistent with the installation process (commitdiff)
Comment #64
LewisNymanComment #65
alexrayu CreditAttribution: alexrayu commentedTaking up for re-roll.
Comment #66
alexrayu CreditAttribution: alexrayu commentedRe-rolling the patch.
Comment #67
alexrayu CreditAttribution: alexrayu commentedRe-rolling the patch.
Comment #68
alexrayu CreditAttribution: alexrayu commentedComment #69
LewisNymanLooks like the layout.css has falling out of the reroll. There are a few other unintentional changes to. I'll have another go rerolling it.
Comment #70
LewisNymanOk, I've had a go at rerolling. The aim here is to have no UI changes but we now have reusable classes.
Comment #71
philipz CreditAttribution: philipz commentedThis looks RTBC. Nice and simple :)
I'll make a separate issue for my comment from #62.
Comment #72
cosmicdreams CreditAttribution: cosmicdreams commentedTo my knowledge, you can't name a class or an ID that starts with a number.
http://www.markinns.com/articles/full/using_numbers_as_css_class_or_id_v...
Comment #73
cosmicdreams CreditAttribution: cosmicdreams commentedOh is that an L nevermind.
Comment #74
sunThis patch removes generic styles from system.admin.css.
Therefore, we need screenshots of affected output in Stark (and possibly also Bartik).
Comment #75
philipz CreditAttribution: philipz commentedI'm on it. I'll make some screenshots of config page, blocks page and node edit page.
Comment #76
philipz CreditAttribution: philipz commentedSince this patch removes from system.admin.css mostly
div.admin .left
anddiv.admin .right
(and a top padding fordiv.admin
) the only page that changes is admin/config.Comment #77
emma.mariaComment #78
emma.mariaComment #79
emma.mariaComment #80
LewisNymanWe are almost there with this one. Let's get this done in Austin
Comment #81
emma.mariaAll .l-... classes need to be converted to .layout-.. classes to match the policy change in [policy, no patch] Use layout- prefixes instead of l- in CSS Coding Standards
Comment #82
dead_armSprinting on this
Comment #83
dead_armChanged classes to use "layout-"
Comment #84
jason.bell CreditAttribution: jason.bell commentedCouple of issues I hit in review:
Attached fixes those.
Comment #85
LewisNymanAdded test pages
Comment #86
LewisNymanThis patch actually doesn't touch the install/update pages. Lets do that in another patch. I updated the issue summary and took a screenshot of the layout lining up using the generic classes. Looking forward to removing more custom layout CSS.
Comment #87
jason.bell CreditAttribution: jason.bell commentedJust looking over that patch again and wondering about usage of px vs. em. Should we make one last change?
Comment #88
LewisNymanGood point, the margins for the container use em. I'm not actually sure if it is desirable behaviour to increase gutters when font size increases. we generally want more space not less? Feel free to have a play around with the value, as long as the two column layout on the config page doesn't look weird.
Comment #89
jason.bell CreditAttribution: jason.bell commentedJust playing around with adjusting the base font-size in seven.base.css it’s a very minor difference between 10px and 1em, though I might prefer the proportional measurement. It doesn't seem important enough to hold back this last patch unless we have consensus to focus on proportional vs. fixed units as a rule.
Comment #90
LewisNymanI'm happy to audit all the unit in Seven and figure out a consistent pattern in another issue
Comment #91
dead_armComment #92
bdevore CreditAttribution: bdevore commentedProportional units are in my opinion more future-proof and device agnostic.
Comment #94
webchickHey, folks. Really sorry about how long this sat there. My post-DrupalCon life got a bit hectic. :(
Aside from unit concerns mentioned above, the only part here that looks a little questionable to me is:
because "half" seems pretty prescriptive of how this is going to be displayed, for a core template.
OTOH, I think there's a lot of value in splitting off the layout-specific stuff into a separate CSS that can be overridden. We can probably go with this for now and make further tweaks in follow-up issues.
Committed and pushed to 8.x. Thanks!
Comment #95
LewisNymanHere are two follow ups to this issue:
#2298001: Remove #page CSS from Seven
#2298015: [policy] Document when we should use each CSS unit
@webchick Thanks :) Maybe we need to have a policy discussion about non semantic helper classes. Seven's style guide is based around reusable classes for modules, because there's no way to style contrib.
Comment #96
LewisNymanComment #97
chx CreditAttribution: chx commentedThere should be a third which fixes poor minimal admin pages becoming single column .
Comment #98
LewisNyman@chx Yep I'm definitely up for adding more and expanding them.
Comment #99
chx CreditAttribution: chx commentedThat was a bug report...
Comment #100
LewisNymanOk then I don't understand the report. Screenshot?
Comment #101
chx CreditAttribution: chx commentedhttp://i.imgur.com/LkPY9H2.png that's admin/config and should be two columns.
Comment #102
LewisNymanFollow up created: #2298821: Move generic layout styling into system.admin.css