Follow-up to #1342054: [META] Clean up templates and CSS

Problem/Motivation

  1. Bartik's template files need to be assessed and cleaned up of redundant markup, bad formatting and ID's.
  2. Bartik's CSS files need to follow Drupal's CSS Coding Standards.

Proposed resolution

For this issue we take "tabs.css" within Bartik in css/components/tabs.css plus any template file associated with the CSS and clean them up.

CSS formatting tasks to do

  1. The CSS file needs to have the correct File comment at the top of the page - see guidelines here and also reference other fixed Bartik CSS files for wording guidelines.

CSS architecture tasks to do

  1. Replace references of HTML elements, for eg H2 with useful classes - see guidelines here.
  2. Try and replace the combined elements and class rules. For eg. replace "div.tabs" with just ".tabs".

CSS cleanup tasks to do

  1. Remove any CSS that repeats styles from elsewhere in Bartik and therefore not needed in this file.
  2. Check all of the selector rules are correct and are currently in use on the frontend of Bartik.

Remaining tasks

  • Write a patch containing as much as the above as possible.
  • Post a patch with screenshots.
  • Visual review of a patch - check tabs 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

Reference: https://www.drupal.org/core/beta-changes
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
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pmcclory’s picture

My first patch ever, not just core :)
Completed the 'CSS formatting task' item 1.

emma.maria’s picture

Status: Active » Needs review
Manjit.Singh’s picture

+++ b/core/themes/bartik/css/components/tabs.css
@@ -1,65 +1,69 @@
.tabs ul.primary li a {
  float: left; /* not LTR */
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

@emma.maria As there is no [RTL] css for tabs ul.primary li a So Is there any need to write /* not LTR */ inline comment (line no. 66).

emma.maria’s picture

@Manjit.Singh we do not have this method in the Drupal standards so we can't introduce */ not LTR /*. I will take a look at the code as I review it to check what is going on with tabs ul.primary li a.

emma.maria’s picture

Issue summary: View changes
FileSize
81.8 KB
+++ b/core/themes/bartik/css/components/tabs.css
@@ -1,4 +1,7 @@
-/* --------------- System Tabs  --------------- */
+/**
+ * @file
+ * Toolbar module overrides for Bartik.
+ */

These styles are for the tabs on pages. Like the View, Edit tabs. See screenshot.
 

 
Can this comment be re-worded to "Styles for tabs in Bartik." please.

I am going to go through and check if any CSS styles can be removed also.

Manjit.Singh’s picture

@emma.maria File comment updated :) Also please do the needful for #3

drupal a11y’s picture

Is this an error in the css file or is "1.9" really wanted?

.tabs ul.primary li a {
  color: #000;
  background-color: #ededed;
  border-color: #bbb;
  border-style: solid solid none solid;
  border-width: 1px;
  height: 1.8em;
  line-height: 1.9; -> is "em" missing ?
emma.maria’s picture

Status: Needs review » Postponed

Bartik's markup is getting a major overhaul in this issue #1999182: Dream mark up for tabs so we should not duplicate that work in this issue.

Tabs are also becoming a block within this issue #507488: Convert page elements (local tasks, actions) into blocks.

Therefore we should stick to just adding the file comment for now and also postponing this issue until the above two are committed.

Manjit.Singh’s picture

Re: #7 @mori we can also set the line-height without em :) so this is not an issue.

mgifford’s picture

emma.maria’s picture

Status: Needs review » Postponed

This issue that cleans up the markup in Bartik is still open #1999182: Dream mark up for tabs. We need to also wait for this to be committed as per the instructions in #8. If you want to clean up the markup please go to that issue :) ^^

emma.maria’s picture

Version: 8.0.x-dev » 8.1.x-dev

Still waiting on #1999182: Dream mark up for tabs to be committed, please go there and help.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Feuerwagen’s picture

Project: Drupal core » Bartik
Version: 10.1.x-dev » 1.0.2
Component: Bartik theme » Code
Issue tags: -frontend