From 97896cadeffe4f224c5cf049c6a5a38a29013415 Mon Sep 17 00:00:00 2001 From: Steven Evans Date: Tue, 17 Jul 2018 12:52:27 -0400 Subject: [PATCH] [style] Cleanup of Styleline violations Allowing up to 4 decimal places in order to get 13px from the 16px default size. Having "@extend" come before "@include" and other rules to minimize its use being overlooked. Extending classes and placeholders can lead to some tricky rendered styles, so the use definitely needs to be done judiciously. --- css/bladeburner.scss | 8 ++++---- css/loader.scss | 9 +++------ stylelint.config.js | 6 +++++- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/css/bladeburner.scss b/css/bladeburner.scss index 398b254a4..163bb6b63 100644 --- a/css/bladeburner.scss +++ b/css/bladeburner.scss @@ -34,22 +34,22 @@ } .bladeburner-nav-button { - color: #fff; - @extend %bladburner-nav-button; + color: #fff; + &:hover { background-color: #3d4044; } } .bladeburner-nav-button-inactive { + @extend %bladburner-nav-button; + text-decoration: none; background-color: #555; cursor: default; pointer-events: none; - - @extend %bladburner-nav-button; } /* Bladeburner Console */ diff --git a/css/loader.scss b/css/loader.scss index 08a28be91..a36797b71 100644 --- a/css/loader.scss +++ b/css/loader.scss @@ -56,30 +56,27 @@ } .loaderspinner { + @extend %spinnerBox; @include animation(LOADERSPINNER 5s linear infinite); width: $spinnerBoxSize; height: $spinnerBoxSize; - - @extend %spinnerBox; } .loaderspinner:before { + @extend %spinnerBox; @include animation(LOADERSPINNER 10s linear infinite); width: $spinnerBoxSize * 0.8; height: $spinnerBoxSize * 0.8; - - @extend %spinnerBox; } .loaderspinner:after { + @extend %spinnerBox; @include animation(LOADERSPINNER 5s linear infinite); width: $spinnerBoxSize * 0.6; height: $spinnerBoxSize * 0.6; - - @extend %spinnerBox; } .loaderlabel { diff --git a/stylelint.config.js b/stylelint.config.js index 3e758db82..15b4e08b5 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -130,13 +130,17 @@ module.exports = { "no-missing-end-of-source-newline": true, "no-unknown-animations": true, "number-leading-zero": "always", - "number-max-precision": [3, { ignoreUnits: [ "%" ] }], + "number-max-precision": [4, { ignoreUnits: [ "%" ] }], // "number-no-trailing-zeros": true, "order/order": [ [ "dollar-variables", "at-variables", "custom-properties", + { + type: "at-rule", + name: "extend" + }, { type: "at-rule", name: "include"