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.
Follow-up to #1342054: [META] Clean up templates and CSS
Problem/Motivation
- Bartik's template files need to be assessed and cleaned up of redundant markup, bad formatting and ID's.
- Bartik's CSS files need to follow Drupal's
ww.drupal.org/node/1886770">CSS Coding Standards.
Proposed resolution
For this issue we take "maintenance-page.css" within Bartik in css/maintenance-page.css plus any template file associated with the CSS and clean them up.
CSS formatting tasks to do
- The CSS file needs to use the correct Comment formats - see guidelines here and also reference other fixed Bartik CSS files for wording guidelines.
CSS architecture tasks to do
- Replace any ID's with classes within the CSS files and Twig files associated with it - see guidelines here.
CSS cleanup tasks to do
- Check all of the selector rules are correct and are currently in use. Fix any broken ones found.
Remaining tasks
- Write a patch containing as much as the above as possible.
- Post a patch with screenshots.
- Visual review of a patch - check the Bartik Maintenance page visually with and without patch applied. Take screenshots.
- Code review of a patch - check the code follows coding standards, suggest improvements if needed in a comment.
- Produce a new patch with improvements if needed.
User interface changes
None
API changes
None
Data model changes
None
Beta phase evaluation
Issue category | Task because it is refactoring CSS and templates in Bartik |
---|---|
Issue priority | Not critical because Bartik functions fine we are just doing cleanup tasks |
Unfrozen changes | Unfrozen because it only changes CSS and markup |
Prioritized changes | The main goal of this issue is usability of the Bartik's codebase |
Disruption | non-Disruptive as it is just changing markup and CSS |
Comment | File | Size | Author |
---|---|---|---|
#32 | bartik-clean-up-maint-2542620-32.patch | 4.59 KB | sim_1 |
#29 | Site under maintenance drupal8.4.jpeg | 26.88 KB | Vidushi Mehta |
#29 | rerolled-patch-2542620-29.patch | 4.58 KB | Vidushi Mehta |
#20 | maintenance.png | 12.89 KB | joginderpc |
#18 | clean-up-maintenance-2542620-18.patch | 4.56 KB | simply021 |
Comments
Comment #1
emma.mariaComment #2
yacinebelarbi CreditAttribution: yacinebelarbi commentedi'm working at this at drupalcon barcelona sprint. my mentor is jp.stacey. i'm working on a patch as per https://www.drupal.org/contributor-tasks/create-patch
Comment #3
yacinebelarbi CreditAttribution: yacinebelarbi commentedI've added file description and remove an un used selector and changed the page title class and id to follow the format of other templates.
Comment #6
simply021 CreditAttribution: simply021 at Develomon commentedRegarding problem and proposed resolution, i have changed id's into classes and selectors that lean on it. Also reformat css declaration by formating guide.
Comment #7
mgiffordLooks like the font is missing.
Comment #8
simply021 CreditAttribution: simply021 at Develomon commented@mgifford You are right, mistake by my side, sorry about it.
Fixed in this patch and reduced class for main container.
<div class="main" class="clearfix"> -> <div class="main clearfix">
Comment #9
mgiffordYou don't want a space between I assume:
Are there going to be performance issues with this patch? It's a lot bigger than I expected.
Visually it looks identical now.
Comment #10
simply021 CreditAttribution: simply021 at Develomon commentedWhile creating a patch i have created a mistake.
This one fix it.
Comment #11
mgiffordSo this just removes the space from your previous patch?
I'm really close to RTBC'ing this, but really would like to have someone do a code review given the size of the patch.
Comment #12
simply021 CreditAttribution: simply021 at Develomon commented@mgifford difference between patch #8 and #10 is in merging dev and 8.0.x branch, that's the reason why patch #8 have that size.
Comment #13
emma.maria@simply021 can you please upload interdiff files along with patches so we can see the specific changes you have made to the patch. Instructions can be found here: https://www.drupal.org/documentation/git/interdiff
Thanks!
Comment #14
simply021 CreditAttribution: simply021 at Develomon commentedCreated interdiffs between #6 #8 and #8 #10.
Comment #16
mcjim CreditAttribution: mcjim as a volunteer commentedThanks for the patch, @simply021. The version in #10 applies and there's no visual difference, so that's really good. (I don't think we need to worry about the interdiffs: the patch in #10 is small and only touches what it needs to.)
While we're here though, I wonder if it's worth having a go at some of the markup, too? I notice that we still have a wrapper div with class main, even though we have a main element, for example. Perhaps there's one or two things like that we could sort out?
Comment #17
simply021 CreditAttribution: simply021 at Develomon commentedComment #18
simply021 CreditAttribution: simply021 at Develomon for FFW commentedIn this patch i'v done following:
-Since there is no site-branding printing variable in maintenance-page.html.twig i have removed in maintenance-page.css 37-51 following for .site-branding-text selector:
-Converting padding properties for selector [dir="rtl"] .maintenance-page #content .section {
from
into
padding: 0 10px 0 0;
-Leaving id="header" because inside sites name and site slogan inherit font from
core/themes/bartik/css/components/header.css following:
-Should decide how to handle font from selector #header since it still lives inside page.html.twig
my proposal would be to change class selector from .header into .maintenance-header not to overlap with other styles since we have in colors.css
-Removing
<div class="main clearfix">
,formating markup and changing selector to maintain style-Changing
id="page-title"
intoclass="page-title"
is causing problem because<h1 class="title" id="page-title">
inherit fromcore/themes/bartik/css/components/page-title.css following:
My proposal would be same as for header to change class selector from #page-title into .maintenance-title
-Reverting usage of selector .header into #header for @media query before it's decided
-Proposal to change css properties for selector .maintenance-page #header
from:
into:
background: #fff none;
Comment #19
simply021 CreditAttribution: simply021 at Develomon commentedComment #20
joginderpc CreditAttribution: joginderpc at Srijan | A Material+ Company commentedTested manually and verified maintenance page working fine as mentioned in comment #18. screen shot attached of test.
Comment #22
joginderpc CreditAttribution: joginderpc at Srijan | A Material+ Company commentedComment #25
joginderpc CreditAttribution: joginderpc at Srijan | A Material+ Company commentedComment #26
joginderpc CreditAttribution: joginderpc at Srijan | A Material+ Company commentedComment #27
lauriiiWhy do we have usage of the #content here?
Comment #29
Vidushi Mehta CreditAttribution: Vidushi Mehta at gai Technologies Pvt Ltd commented@lauriii I applied #18 but patch doesn't apply so i rerolled the patch and made the changes.
Comment #32
sim_1Because of the changes made as a part of #3024527: Add and configure stylelint-order, this patch needed to be rerolled by hand (so I can't provide an interdiff).
Using the notes from #18, I included the font family for the
.header
in the css, otherwise it's overwritten. I also used the#maintenance
id so that the background colors from Bartik's main theme don't apply to it.Comment #38
smustgrave CreditAttribution: smustgrave at Mobomo commentedSince bartik has been removed in D10 moving this ticket over to the contrib module.