From 94544bdc6b564c59d2fa79af1ce100536fbff471 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Sat, 30 Dec 2023 12:51:59 +0100 Subject: [PATCH] Drop CSSLint as it's an abandoned project --- .csslintrc | 42 ------------------- .github/workflows/ci.yml | 3 -- CONTRIBUTING.md | 2 +- mkdocs/themes/mkdocs/css/base.css | 30 +++++-------- mkdocs/themes/readthedocs/css/theme_extra.css | 4 +- pyproject.toml | 1 - 6 files changed, 14 insertions(+), 68 deletions(-) delete mode 100644 .csslintrc diff --git a/.csslintrc b/.csslintrc deleted file mode 100644 index 8877d0ea..00000000 --- a/.csslintrc +++ /dev/null @@ -1,42 +0,0 @@ ---exclude-list = mkdocs/themes/mkdocs/css/bootstrap.min.css, - mkdocs/themes/mkdocs/css/font-awesome.min.css, - mkdocs/themes/mkdocs/css/highlight.css, - mkdocs/themes/readthedocs/css/theme.css ---errors = known-properties, - box-sizing, - outline-none, - bulletproof-font-face, - compatible-vendor-prefixes, - errors, - duplicate-background-images, - duplicate-properties, - empty-rules, - selector-max-approaching, - gradients, - floats, - font-faces, - font-sizes, - shorthand, - import, - import-ie-limit, - text-indent, - rules-count, - regex-selectors, - selector-max, - selector-newline, - star-property-hack, - underscore-property-hack, - universal-selector, - unqualified-attributes, - vendor-prefix, - zero-units, - overqualified-elements, - unique-headings, - qualified-headings, - ids, - display-property-grouping, - fallback-colors, - box-model, - important, - adjoining-classes ---ignore = order-alphabetical diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38526769..bf93e0d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,9 +79,6 @@ jobs: - name: Check JS style if: always() run: hatch run lint:js - - name: Check CSS style - if: always() - run: hatch run lint:css - name: Check spelling if: always() run: hatch run lint:spelling diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d64bf5c9..510ef6f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -97,7 +97,7 @@ hatch run types:check ### Other style checks -There are several other checks, such as spelling and CSS style. To run all of them, use this command: +There are several other checks, such as spelling and JS style. To run all of them, use this command: ```bash hatch run lint:check diff --git a/mkdocs/themes/mkdocs/css/base.css b/mkdocs/themes/mkdocs/css/base.css index a396ae53..9748be2b 100644 --- a/mkdocs/themes/mkdocs/css/base.css +++ b/mkdocs/themes/mkdocs/css/base.css @@ -1,9 +1,7 @@ html { - /* csslint ignore:start */ /* The nav header is 3.5rem high, plus 20px for the margin-top of the main container. */ scroll-padding-top: calc(3.5rem + 20px); - /* csslint ignore:end */ } /* Replacement for `body { background-attachment: fixed; }`, which has @@ -26,11 +24,9 @@ body > .container { min-height: 400px; } -.navbar.fixed-top { /* csslint allow: adjoining-classes */ - /* csslint ignore:start */ +.navbar.fixed-top { position: -webkit-sticky; position: sticky; - /* csslint ignore:end */ } .source-links { @@ -130,17 +126,15 @@ footer { * sections of docs content. */ -.bs-sidebar.affix { /* csslint allow: adjoining-classes */ - /* csslint ignore:start */ +.bs-sidebar.affix { position: -webkit-sticky; position: sticky; - /* csslint ignore:end */ /* The nav header is 3.5rem high, plus 20px for the margin-top of the main container. */ top: calc(3.5rem + 20px); } -.bs-sidebar.card { /* csslint allow: adjoining-classes */ +.bs-sidebar.card { padding: 0; max-height: 90%; overflow-y: auto; @@ -155,7 +149,7 @@ footer { transform: scale(1, -1); } -.bs-sidebar .navbar-toggler.collapsed span { /* csslint allow: adjoining-classes */ +.bs-sidebar .navbar-toggler.collapsed span { -moz-transform: scale(1, 1); -webkit-transform: scale(1, 1); -o-transform: scale(1, 1); @@ -226,19 +220,19 @@ blockquote { text-align: left; } -.admonition.note, details.note, .admonition.info, details.info { /* csslint allow: adjoining-classes */ +.admonition.note, details.note, .admonition.info, details.info { color: #2e6b89; background-color: #e2f0f7; border-color: #bce8f1; } -.admonition.warning, details.warning { /* csslint allow: adjoining-classes */ +.admonition.warning, details.warning { color: #7a6032; background-color: #fffae5; border-color: #fbeed5; } -.admonition.danger, details.danger { /* csslint allow: adjoining-classes */ +.admonition.danger, details.danger { color: #7f3130; background-color: #fde3e3; border-color: #eed3d7; @@ -254,13 +248,13 @@ blockquote { } @media (max-width: 991.98px) { - .navbar-collapse.show { /* csslint allow: adjoining-classes */ + .navbar-collapse.show { overflow-y: auto; max-height: calc(100vh - 3.5rem); } } -.dropdown-item.open { /* csslint allow: adjoining-classes */ +.dropdown-item.open { color: #fff; background-color: #2FA4E7; } @@ -300,20 +294,18 @@ blockquote { } .dropdown-submenu > .dropdown-menu { - /* csslint ignore:start */ position: fixed !important; - /* csslint ignore:end */ margin-top: -9px; margin-left: -2px; border-width: 1px; padding: 0.5rem 0; } - .dropdown-submenu.pull-left { /* csslint allow: adjoining-classes */ + .dropdown-submenu.pull-left { float: none; } - .dropdown-submenu.pull-left > .dropdown-menu { /* csslint allow: adjoining-classes */ + .dropdown-submenu.pull-left > .dropdown-menu { left: -100%; margin-left: 10px; } diff --git a/mkdocs/themes/readthedocs/css/theme_extra.css b/mkdocs/themes/readthedocs/css/theme_extra.css index 494e7a8d..ab0631a1 100644 --- a/mkdocs/themes/readthedocs/css/theme_extra.css +++ b/mkdocs/themes/readthedocs/css/theme_extra.css @@ -103,7 +103,7 @@ pre .cs, pre .c { form .search-query { width: 100%; border-radius: 50px; - padding: 6px 12px; /* csslint allow: box-model */ + padding: 6px 12px; border-color: #D1D4D5; } @@ -135,7 +135,7 @@ form .search-query { } td, th { - border: 1px solid #e1e4e5 !important; /* csslint allow: important */ + border: 1px solid #e1e4e5 !important; border-collapse: collapse; } diff --git a/pyproject.toml b/pyproject.toml index 28355b73..03067692 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -200,7 +200,6 @@ dependencies = [ spelling = 'codespell mkdocs docs *.* -S LC_MESSAGES -S "*.min.js" -S "lunr*.js" -S fontawesome-webfont.svg -S tinyseg.js' markdown = "npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME" js = "npm exec --yes -- jshint mkdocs/" -css = "npm exec --yes -- csslint --quiet mkdocs/" check = ["markdown", "js", "css", "spelling"] [tool.hatch.env.collectors.mkdocs.docs]