From 6162001c162d242ec256c3e2b4b47e87cce00165 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Fri, 28 Mar 2025 17:30:43 -0400 Subject: [PATCH] Enable Stylelint color-hex-length --- app/javascript/styles/contrast/variables.scss | 2 +- app/javascript/styles/mastodon-light/variables.scss | 4 ++-- app/javascript/styles/mastodon/_variables.scss | 4 ++-- stylelint.config.js | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/javascript/styles/contrast/variables.scss b/app/javascript/styles/contrast/variables.scss index b3feee1ca4..a494b96832 100644 --- a/app/javascript/styles/contrast/variables.scss +++ b/app/javascript/styles/contrast/variables.scss @@ -1,7 +1,7 @@ @use '../mastodon/functions' as *; // Dependent colors -$black: #000000; +$black: #000; $classic-base-color: hsl(240deg, 16%, 19%); $classic-primary-color: hsl(240deg, 29%, 70%); diff --git a/app/javascript/styles/mastodon-light/variables.scss b/app/javascript/styles/mastodon-light/variables.scss index 68596e4470..a6a5e5556b 100644 --- a/app/javascript/styles/mastodon-light/variables.scss +++ b/app/javascript/styles/mastodon-light/variables.scss @@ -5,8 +5,8 @@ $lighten-multiplier: -1 ); -$black: #000000; // Black -$white: #ffffff; // White +$black: #000; // Black +$white: #fff; // White $blurple-500: #6364ff; // Brand purple $grey-600: hsl(240deg, 8%, 33%); // Trout $grey-100: hsl(240deg, 51%, 90%); // Topaz diff --git a/app/javascript/styles/mastodon/_variables.scss b/app/javascript/styles/mastodon/_variables.scss index c2664d1dcd..d528cba6c4 100644 --- a/app/javascript/styles/mastodon/_variables.scss +++ b/app/javascript/styles/mastodon/_variables.scss @@ -2,8 +2,8 @@ @use 'functions' as *; // Commonly used web colors -$black: #000000; // Black -$white: #ffffff; // White +$black: #000; // Black +$white: #fff; // White $red-600: #b7253d !default; // Deep Carmine $red-500: #df405a !default; // Cerise $blurple-600: #563acc; // Iris diff --git a/stylelint.config.js b/stylelint.config.js index 632463c596..6701290fde 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -15,7 +15,6 @@ module.exports = { rules: { 'at-rule-empty-line-before': null, 'color-function-notation': null, - 'color-hex-length': null, 'declaration-block-no-redundant-longhand-properties': null, 'no-descending-specificity': null, 'no-duplicate-selectors': null,