From 46b7004f050bd2fdaf9800794cf2c1e9eeb08d51 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 12 May 2024 04:33:05 +0200 Subject: [PATCH] Enable `declaration-block-no-redundant-longhand-properties` (#30950) Enable [`declaration-block-no-redundant-longhand-properties`](https://stylelint.io/user-guide/rules/declaration-block-no-redundant-longhand-properties/) and autofix issues. The exclusions are because I find these two shorthands to be harder to read. --- stylelint.config.js | 2 +- web_src/css/modules/grid.css | 5 +---- web_src/css/modules/menu.css | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/stylelint.config.js b/stylelint.config.js index 6fee242685..977c35d9d5 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -141,7 +141,7 @@ export default { 'custom-property-pattern': null, 'declaration-block-no-duplicate-custom-properties': true, 'declaration-block-no-duplicate-properties': [true, {ignore: ['consecutive-duplicates-with-different-values']}], - 'declaration-block-no-redundant-longhand-properties': null, + 'declaration-block-no-redundant-longhand-properties': [true, {ignoreShorthands: ['flex-flow', 'overflow']}], 'declaration-block-no-shorthand-property-overrides': null, 'declaration-block-single-line-max-declarations': null, 'declaration-empty-line-before': null, diff --git a/web_src/css/modules/grid.css b/web_src/css/modules/grid.css index 4aaa452372..a2c558047d 100644 --- a/web_src/css/modules/grid.css +++ b/web_src/css/modules/grid.css @@ -7,10 +7,7 @@ flex-wrap: wrap; align-items: stretch; padding: 0; - margin-top: -1rem; - margin-bottom: -1rem; - margin-left: -1rem; - margin-right: -1rem; + margin: -1rem; } .ui.relaxed.grid { diff --git a/web_src/css/modules/menu.css b/web_src/css/modules/menu.css index 76a576cd53..ff9d7fc5d0 100644 --- a/web_src/css/modules/menu.css +++ b/web_src/css/modules/menu.css @@ -553,13 +553,11 @@ border-bottom: 2px solid var(--color-secondary); } .ui.secondary.pointing.menu .item { - border-bottom-color: transparent; - border-bottom-style: solid; + border-bottom: 2px solid transparent; border-radius: 0; align-self: flex-end; margin: 0 0 -2px; padding: 0.85714286em 1.14285714em; - border-bottom-width: 2px; } .ui.secondary.pointing.menu .ui.dropdown .menu .item { border-bottom-width: 0;