Problem/Motivation

#3261049: Remove duplicated margin properties from typography CSS discovered some redundant CSS. There is a Stylelint rule declaration-block-no-duplicate-properties that can detect this situation for us.

Enabling the rule now notes lots of duplicate background-image rules, which can be solved by #3265596: Remove obsolete -webkit-linear-gradient CSS

Steps to reproduce

Proposed resolution

Solve #3261049: Remove duplicated margin properties from typography CSS and #3265596: Remove obsolete -webkit-linear-gradient CSS first.
Enable the rule and fix any remaining cases.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3265606-2.patch8.82 KBlongwave

Issue fork drupal-3265606

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

longwave created an issue. See original summary.

longwave’s picture

Version: 10.0.x-dev » 10.1.x-dev
Status: Active » Needs review
StatusFileSize
new8.82 KB

The blockers landed, there are a few duplicate declarations we can clean up here.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Change looks good. Have seen this once before so glad to see we got a check now

Gauravvv made their first commit to this issue’s fork.

gauravvvv’s picture

Patch #2, is not applying. re-rolled the patch for 10.1.x

longwave’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

gauravvvv’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

MR is showing as unmergable.

sagarchauhan made their first commit to this issue’s fork.

sagarchauhan’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs reroll

Reroll seems good.

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

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

lauriii’s picture

Status: Reviewed & tested by the community » Needs review

Should we have a CR for this? I'm also wondering if no duplicate properties should be part of the coding standards in case that's something we're enforcing here: https://www.drupal.org/docs/develop/standards/css/css-formatting-guidelines?

smustgrave’s picture

Do we do CRs for other rules? https://www.drupal.org/project/drupal/issues/3144854 we didn't do a CR for removing?

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Not sure a CR is needed, unless we do it for others? Going to post into #coding-standards to see if it's something that should be included.

lauriii’s picture

Status: Reviewed & tested by the community » Needs work

Removing stylelint rule is different from adding one because removing the rule shouldn't break anything for anyone. We have filed CRs when we've added additional stylelint checks in the past. For example: https://www.drupal.org/node/3041002.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.