From fbf46be0c9281dc54d71b98da112f24b54cdcbb7 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 16 May 2020 18:16:46 +0200 Subject: [PATCH] Enable stylelint's shorthand-property-no-redundant-values Enabled the rule and --fix'ed issues. --- .stylelintrc | 1 + web_src/less/_base.less | 4 ++-- web_src/less/_markdown.less | 2 +- web_src/less/_repository.less | 14 +++++++------- web_src/less/_review.less | 4 ++-- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.stylelintrc b/.stylelintrc index be1c15bfa253f..102b90f1fdaf1 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -14,3 +14,4 @@ rules: number-leading-zero: never rule-empty-line-before: null selector-pseudo-element-colon-notation: null + shorthand-property-no-redundant-values: true diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 97de03c0315c8..c9244bceb48fb 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -334,7 +334,7 @@ code, &.container { &.fluid { &.padded { - padding: 0 10px 0 10px; + padding: 0 10px; } } } @@ -593,7 +593,7 @@ code, .sha.label { font-family: @monospaced-fonts, monospace; font-size: 13px; - padding: 6px 10px 4px 10px; + padding: 6px 10px 4px; font-weight: normal; margin: 0 6px; } diff --git a/web_src/less/_markdown.less b/web_src/less/_markdown.less index 651edb5724a37..420f24cbbec85 100644 --- a/web_src/less/_markdown.less +++ b/web_src/less/_markdown.less @@ -9,7 +9,7 @@ } &.file-view { - padding: 2em 2em 2em !important; + padding: 2em !important; } > *:first-child { diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index b1576b8784a5e..8e9b9fa102343 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -426,12 +426,12 @@ } img { - padding: 5px 5px 0 5px; + padding: 5px 5px 0; } } .plain-text { - padding: 1em 2em 1em 2em; + padding: 1em 2em; pre { word-break: break-word; @@ -1482,7 +1482,7 @@ height: 12px; width: 40px; display: inline-block; - margin: 2px 4px 0 4px; + margin: 2px 4px 0; vertical-align: text-top; .add { @@ -1634,7 +1634,7 @@ &.file-content { img { max-width: 100%; - padding: 5px 5px 0 5px; + padding: 5px 5px 0; } img.emoji { padding: 0; @@ -2177,7 +2177,7 @@ > .item { float: left; - padding: .5rem .5rem !important; + padding: .5rem !important; font-size: 1.5em; img.emoji { @@ -2492,7 +2492,7 @@ &:not(:first-child) { border-top: 1px solid #eaeaea; padding: 1rem; - margin: 15px -1rem -1rem -1rem; + margin: 15px -1rem -1rem; } > .svg { @@ -2575,7 +2575,7 @@ .precolors { padding-left: 0; padding-right: 0; - margin: 3px 10px auto 10px; + margin: 3px 10px auto; width: 120px; .color { diff --git a/web_src/less/_review.less b/web_src/less/_review.less index f146cc1da8a0e..15d177f237f09 100644 --- a/web_src/less/_review.less +++ b/web_src/less/_review.less @@ -69,7 +69,7 @@ .ui.active.tab { border: 1px solid #d4d4d5; padding: .5em; - border-radius: 0 .28571429rem .28571429rem .28571429rem; + border-radius: 0 .28571429rem .28571429rem; } .ui.active.markdown.tab { @@ -87,7 +87,7 @@ .footer { border-top: 1px solid #f1f1f1; - padding: 10px 0 10px 0; + padding: 10px 0; .markdown-info { display: inline-block;