Problem/Motivation

After last module release i see many bad css code.
We have code like this:

.webform-list-table th:last-child,
.webform-list-table td:last-child {
  padding: 0 2px;
 vertical-align: middle;
 text-align: center !important;
 width: 60px !important;
}

Proposed resolution

  • I think we need clean it.
  • For each task need need add screenshot to be sure that patch don't break styles in project which use old module version.

Tasks list:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

HOG created an issue. See original summary.

jrockowitz’s picture

@HOG The Webform module is still in beta and someone should just start addressing any CSS issues. I would not worry too much about introducing any regressions. Developers and site-builders should be reviewing their site with every beta-to-beta update.

The webform_test.module includes working examples for every element and feature that can be used to check for any regressions.

Once there is a stable release we will have to be careful not to introduce any regressions. Right now we should just get the job done.

HOG’s picture

@jrockowitz, i agree with you. But our team use this module in project & after update some styles broke. It was a little pain.

HOG’s picture

Issue summary: View changes
andypost’s picture

Category: Task » Plan

@jrockowitz Good point! I think better to clean-up styling while in beta stage, this way it gets more attention from community and feedback

@Hog please update child issues to point this one as parent

HOG’s picture

Issue summary: View changes
HOG’s picture

Issue summary: View changes
jrockowitz’s picture

@HOG and @andypost As we are going through these tickets, I think you are gradually seeing that there is definitely some (undocumented) reason/logic behind all the existing CSS.

I think it might help if we define what exactly needs to be fixed...

For example,

  • All !important declarations need to be removed.
  • Comments need to be added explaining why an existing declaration is being overridden.
  • Static widths should be avoided.

Is there anything else that needs to be addressed?

Moving forward, I think adding a /webform/css/README.md file with Webform specific guidelines and links will help.

Once we define these guidelines, I can do a review, cleanup, and commenting of all the CSS file.

jrockowitz’s picture

Assigned: Unassigned » jrockowitz

I am going to create patch that adds more description comments to all the existing CSS files.

  • jrockowitz committed 2441e26 on 2839871-css-clean-up
    Issue #2839871 by HOG, jrockowitz, andypost: [Meta] Clean up CSS
    
jrockowitz’s picture

Status: Active » Needs review
FileSize
19.71 KB

The attached patch adds more comments, @see references, and removes some unused selectors and stylesheets.

If all the tests pass, I am going to commit this patch and then I will start reviewing all the sub-tickets.

  • jrockowitz committed 2ff4416 on 8.x-5.x
    Issue #2839871 by jrockowitz: [Meta] Clean up CSS
    
jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.