Problem/Motivation
If you enable Seven as a main theme, it is visually broken on non-admin pages (see screenshot).
Why would you do that? The typical example is Headless Drupal, or any situation where the goal of the installation is not to generate a website (collaboration tools, etc). You want to use Seven for all the nice UI stuff it provides out of the box, and since you don't actually have a "frontend" theme you want that same look for the various non-admin pages (login form, user profile, etc).
What currently happens if you enable Seven as the main theme is that non-admin pages don't load system.admin.css and what is immediately visible is that the page has no margin so form fields stick to the edge of the page.
The current workaround is to either alter all non-admin pages to make them "admin pages", or to create a Seven subtheme that includes a copy of system.admin.css. Both solutions are quite ugly, and it would be nice if you could make Drupal "backend-only" without needing to write code.
Proposed resolution
Add the system/admin library as a dependancy of the Seven theme
Remaining tasks
None
User interface changes
The Seven theme maintains layout on frontend pages
API changes
None
Before:

After:

Beta phase evaluation
| Issue category | Bug because Seven's layout is broken on the frontend |
|---|---|
| Issue priority | Normal because using Seven on the frontend is not a common usecase |
| Unfrozen changes | Unfrozen because it only changes CSS |
| Prioritized changes | The main goal of this issue is usability |
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | seven_theme_depends_on_system.admin_.css_2473343.patch | 399 bytes | martin mayer |
Comments
Comment #1
lewisnymanI guess we should add the
system/adminlibrary as a dependancy to seven.libraries.ymlComment #2
floretan commentedYes, that makes sense. I didn't think about the fact that system.admin.css is already always loaded with Seven if it's used as an admin theme, so there's no drawback of explicitly mentioning it as a dependency.
Comment #3
martin mayer commentedComment #4
martin mayer commentedI inserted the dependency and the non admin pages look ok then.
Comment #5
martin mayer commentedComment #6
lewisnymanI manually tested this this patch and it works as expected. I also quickly looked around the admin interface for anything that would be broken and it looks the same.
Comment #7
lewisnymanComment #8
lewisnymanComment #9
lewisnymanComment #10
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 34e7824 and pushed to 8.0.x. Thanks!