From 5f8948d5a122aecc2052e2fbfaa7551f035af4fe Mon Sep 17 00:00:00 2001 From: Simounet Date: Tue, 6 Jun 2023 22:43:34 +0200 Subject: [PATCH 1/6] stylelint-config-standard-scss added for stylelint SCSS handling --- package.json | 1 + stylelint.config.js | 2 +- yarn.lock | 29 ++++++++++++++++++++++++++++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3f912bf74..4cb58ef68 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "style-loader": "^3.3.3", "stylelint": "^15.7.0", "stylelint-config-standard": "^33.0.0", + "stylelint-config-standard-scss": "^9.0.0", "stylelint-scss": "^5.0.1", "stylelint-webpack-plugin": "^4.1.1", "terser-webpack-plugin": "^5.3.9", diff --git a/stylelint.config.js b/stylelint.config.js index 10a645ba1..4955632b7 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -1,5 +1,5 @@ module.exports = { - extends: ['stylelint-config-standard'], + extends: ['stylelint-config-standard-scss'], customSyntax: require('postcss-scss'), plugins: ['stylelint-scss'], rules: { diff --git a/yarn.lock b/yarn.lock index a96e0b2c8..8e4fcac45 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4677,7 +4677,7 @@ postcss-scss@^4.0.6: resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-4.0.6.tgz#5d62a574b950a6ae12f2aa89b60d63d9e4432bfd" integrity sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ== -postcss-selector-parser@^6.0.13, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: +postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.13, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: version "6.0.13" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz#d05d8d76b1e8e173257ef9d60b706a8e5e99bf1b" integrity sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ== @@ -5445,11 +5445,28 @@ style-search@^0.1.0: resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902" integrity sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg== +stylelint-config-recommended-scss@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-11.0.0.tgz#7b933ecac99cd3b52d14d1746e3ecd36f421b4b6" + integrity sha512-EDghTDU7aOv2LTsRZvcT1w8mcjUaMhuy+t38iV5I/0Qiu6ixdkRwhLEMul3K/fnB2v9Nwqvb3xpvJfPH+HduDw== + dependencies: + postcss-scss "^4.0.6" + stylelint-config-recommended "^12.0.0" + stylelint-scss "^4.6.0" + stylelint-config-recommended@^12.0.0: version "12.0.0" resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-12.0.0.tgz#d0993232fca017065fd5acfcb52dd8a188784ef4" integrity sha512-x6x8QNARrGO2sG6iURkzqL+Dp+4bJorPMMRNPScdvaUK8PsynriOcMW7AFDKqkWAS5wbue/u8fUT/4ynzcmqdQ== +stylelint-config-standard-scss@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/stylelint-config-standard-scss/-/stylelint-config-standard-scss-9.0.0.tgz#70c66e1179612519fdf6ca1dbff23c804def1b6b" + integrity sha512-yPKpJsrZn4ybuQZx/DkEHuCjw7pJginErE/47dFhCnrvD48IJ4UYec8tSiCuJWMA3HRjbIa3nh5ZeSauDGuVAg== + dependencies: + stylelint-config-recommended-scss "^11.0.0" + stylelint-config-standard "^33.0.0" + stylelint-config-standard@^33.0.0: version "33.0.0" resolved "https://registry.yarnpkg.com/stylelint-config-standard/-/stylelint-config-standard-33.0.0.tgz#1f7bb299153a53874073e93829e37a475842f0f9" @@ -5457,6 +5474,16 @@ stylelint-config-standard@^33.0.0: dependencies: stylelint-config-recommended "^12.0.0" +stylelint-scss@^4.6.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-4.7.0.tgz#f986bf8c5a4b93eae2b67d3a3562eef822657908" + integrity sha512-TSUgIeS0H3jqDZnby1UO1Qv3poi1N8wUYIJY6D1tuUq2MN3lwp/rITVo0wD+1SWTmRm0tNmGO0b7nKInnqF6Hg== + dependencies: + postcss-media-query-parser "^0.2.3" + postcss-resolve-nested-selector "^0.1.1" + postcss-selector-parser "^6.0.11" + postcss-value-parser "^4.2.0" + stylelint-scss@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-5.0.1.tgz#b33a6580b5734eace083cfc2cc3021225e28547f" From e5b72f3123616c034411e670460855c4e66f8818 Mon Sep 17 00:00:00 2001 From: Simounet Date: Tue, 6 Jun 2023 22:53:56 +0200 Subject: [PATCH 2/6] Fix Stylelint errors --- .../static/themes/material/css/article.scss | 4 ++-- .../static/themes/material/css/cards.scss | 12 ++++-------- .../static/themes/material/css/dark_theme.scss | 2 +- .../static/themes/material/css/icons.scss | 2 +- .../static/themes/material/css/layout.scss | 2 +- .../static/themes/material/css/nav.scss | 4 ++-- .../static/themes/material/css/print.scss | 14 +++++--------- .../static/themes/material/css/sidenav.scss | 2 +- .../static/themes/material/css/variables.scss | 2 +- .../Resources/views/Config/index.html.twig | 2 +- .../Resources/views/Entry/entry.html.twig | 12 ++++++------ .../Resources/views/Static/about.html.twig | 2 +- .../Resources/views/Static/howto.html.twig | 2 +- .../Resources/views/layout.html.twig | 18 +++++++++--------- .../Controller/EntryControllerTest.php | 9 ++++----- web/wallassets/material.css | 2 +- web/wallassets/material.css.map | 2 +- 17 files changed, 42 insertions(+), 51 deletions(-) diff --git a/app/Resources/static/themes/material/css/article.scss b/app/Resources/static/themes/material/css/article.scss index edfd60071..83543c9c8 100644 --- a/app/Resources/static/themes/material/css/article.scss +++ b/app/Resources/static/themes/material/css/article.scss @@ -54,7 +54,7 @@ } a { - border-bottom: 1px dotted $blueAccentColor; + border-bottom: 1px dotted $blue-accent-color; text-decoration: none; } @@ -105,7 +105,7 @@ margin: 2.1rem 0 0.68rem; } - aside { + .entry-info { .tools { display: flex; flex-flow: row wrap; diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index f46971781..11b84732c 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -73,7 +73,7 @@ main { .card-entry-labels-hidden li { display: inline-block; - background-color: $blueAccentColor; + background-color: $blue-accent-color; margin: 0 5px; padding: 5px 12px; border-radius: 3px; @@ -85,10 +85,6 @@ main { white-space: nowrap; } - .card-content .estimatedTime { - margin-bottom: 10px; - } - .card-action { padding: 10px 10px 10px 15px; @@ -160,7 +156,7 @@ a.original:not(.waves-effect) { .card-tag-labels li { margin: 10px 10px 10px auto; padding: 5px 12px 5px 16px !important; - background-color: $blueAccentColor; + background-color: $blue-accent-color; border-radius: 3px; color: #fff; cursor: default; @@ -251,7 +247,7 @@ a.original:not(.waves-effect) { } .chip { - background-color: $blueAccentColor; + background-color: $blue-accent-color; padding: 0 7px; margin: auto 1px; border-radius: 6px; @@ -315,7 +311,7 @@ a.original:not(.waves-effect) { color: #fff !important; } -.settings .div_tabs { +.settings .tabs-container { padding-bottom: 15px; } diff --git a/app/Resources/static/themes/material/css/dark_theme.scss b/app/Resources/static/themes/material/css/dark_theme.scss index 8a95679f2..b4a449dbe 100644 --- a/app/Resources/static/themes/material/css/dark_theme.scss +++ b/app/Resources/static/themes/material/css/dark_theme.scss @@ -131,7 +131,7 @@ background-color: #282c34; } - nav input { + nav input { color: #abb2bf; } diff --git a/app/Resources/static/themes/material/css/icons.scss b/app/Resources/static/themes/material/css/icons.scss index a16d90ee8..54b9c81f5 100644 --- a/app/Resources/static/themes/material/css/icons.scss +++ b/app/Resources/static/themes/material/css/icons.scss @@ -27,7 +27,7 @@ -webkit-font-smoothing: antialiased; /* Support for Safari and Chrome. */ - text-rendering: optimizeLegibility; + text-rendering: optimizelegibility; /* Support for Firefox. */ -moz-osx-font-smoothing: grayscale; diff --git a/app/Resources/static/themes/material/css/layout.scss b/app/Resources/static/themes/material/css/layout.scss index a81001897..d27d20076 100755 --- a/app/Resources/static/themes/material/css/layout.scss +++ b/app/Resources/static/themes/material/css/layout.scss @@ -19,7 +19,7 @@ body { } a { - color: $blueAccentColor; + color: $blue-accent-color; } main, diff --git a/app/Resources/static/themes/material/css/nav.scss b/app/Resources/static/themes/material/css/nav.scss index 3fb2504e3..13286d83c 100644 --- a/app/Resources/static/themes/material/css/nav.scss +++ b/app/Resources/static/themes/material/css/nav.scss @@ -131,11 +131,11 @@ nav { margin: 0 1%; } -#button_filters { +.button-filters { display: none; } -#button_export { +.button-export { display: none; } diff --git a/app/Resources/static/themes/material/css/print.scss b/app/Resources/static/themes/material/css/print.scss index 0bf9300c9..2aae8a221 100755 --- a/app/Resources/static/themes/material/css/print.scss +++ b/app/Resources/static/themes/material/css/print.scss @@ -18,20 +18,16 @@ /* Hide useless blocks */ body > header, - #article_toolbar, - #links, - #sort, body > footer, - .top_link, - div.tools, + .entry-tools, header div, .messages, .entry + .results, - #slide-out, + .left-bar, .progress, .hide-on-large-only, - #article > aside, - #article .mbm a { + .entry-info, + .title-edit { display: none !important; } @@ -39,7 +35,7 @@ padding-left: 0 !important; } - #article { + .article { margin: inherit !important; } diff --git a/app/Resources/static/themes/material/css/sidenav.scss b/app/Resources/static/themes/material/css/sidenav.scss index f0932e4ab..00e4c5c2a 100644 --- a/app/Resources/static/themes/material/css/sidenav.scss +++ b/app/Resources/static/themes/material/css/sidenav.scss @@ -45,6 +45,6 @@ font-weight: bold; } -span.numberItems { +.items-number { float: right; } diff --git a/app/Resources/static/themes/material/css/variables.scss b/app/Resources/static/themes/material/css/variables.scss index fb0f0bb16..184991289 100644 --- a/app/Resources/static/themes/material/css/variables.scss +++ b/app/Resources/static/themes/material/css/variables.scss @@ -2,4 +2,4 @@ Variables ========================================================================== */ -$blueAccentColor: #00acc1; +$blue-accent-color: #00acc1; diff --git a/src/Wallabag/CoreBundle/Resources/views/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Config/index.html.twig index d0e6005c7..134e623d6 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Config/index.html.twig @@ -9,7 +9,7 @@
-
+
  • {{ 'config.tab_menu.settings'|trans }}
  • {{ 'config.tab_menu.feed'|trans }}
  • diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/entry.html.twig index ee03e131c..84b29d241 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/entry.html.twig @@ -36,7 +36,7 @@
-
    +
    • arrow_back @@ -232,12 +232,12 @@ {% endblock %} {% block content %} -
      +
      -

      {{ entry.title|striptags|default('entry.default_title'|trans)|raw }} create

      +

      {{ entry.title|striptags|default('entry.default_title'|trans)|raw }} create

      -