1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2025-01-30 19:33:53 +01:00

Fixed SCSS linter errors

This commit is contained in:
squidfunk 2021-02-07 18:08:21 +01:00
parent 9c2253a705
commit 975f830dbb
18 changed files with 51 additions and 47 deletions

View File

@ -20,8 +20,12 @@
], ],
"ignoreAtRules": [ "ignoreAtRules": [
"if", "if",
"each",
"else", "else",
"elseif" "elseif",
"for",
"import",
"return"
] ]
} }
], ],
@ -47,16 +51,16 @@
} }
], ],
"custom-property-empty-line-before": null, "custom-property-empty-line-before": null,
"custom-property-pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$", "declaration-colon-space-after": null,
"declaration-no-important": true, "declaration-no-important": true,
"declaration-block-single-line-max-declarations": 0, "declaration-block-single-line-max-declarations": 0,
"function-url-no-scheme-relative": true, "function-url-no-scheme-relative": true,
"function-url-quotes": "always", "function-url-quotes": "always",
"font-family-name-quotes": "always-where-recommended", "font-family-name-quotes": "always-where-recommended",
"font-weight-notation": "numeric", "font-weight-notation": "numeric",
"keyframes-name-pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$",
"linebreaks": "unix", "linebreaks": "unix",
"media-feature-name-no-unknown": null, "media-feature-name-no-unknown": null,
"no-descending-specificity": null,
"no-empty-first-line": true, "no-empty-first-line": true,
"no-unknown-animations": true, "no-unknown-animations": true,
"property-no-unknown": null, "property-no-unknown": null,
@ -69,11 +73,11 @@
] ]
} }
], ],
"selector-combinator-space-before": null,
"selector-descendant-combinator-no-non-space": null,
"selector-max-empty-lines": 0, "selector-max-empty-lines": 0,
"selector-max-id": 0, "selector-max-id": 0,
"selector-max-type": 1, "selector-no-qualifying-type": null,
"selector-max-universal": 1,
"selector-no-qualifying-type": true,
"selector-pseudo-class-no-unknown": null, "selector-pseudo-class-no-unknown": null,
"selector-pseudo-element-no-unknown": null, "selector-pseudo-element-no-unknown": null,
"string-quotes": "double", "string-quotes": "double",
@ -89,10 +93,8 @@
"vh", "vh",
"vw" "vw"
], ],
"value-no-vendor-prefix": true,
"scss/at-each-key-value-single-line": true, "scss/at-each-key-value-single-line": true,
"scss/at-else-closing-brace-newline-after": "always-last-in-chain", "scss/at-else-closing-brace-newline-after": "always-last-in-chain",
"scss/at-extend-no-missing-placeholder": true,
"scss/at-function-parentheses-space-before": "never", "scss/at-function-parentheses-space-before": "never",
"scss/at-function-pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$", "scss/at-function-pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$",
"scss/at-if-closing-brace-newline-after": "always-last-in-chain", "scss/at-if-closing-brace-newline-after": "always-last-in-chain",
@ -103,7 +105,6 @@
"scss/at-mixin-parentheses-space-before": "never", "scss/at-mixin-parentheses-space-before": "never",
"scss/at-mixin-pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$", "scss/at-mixin-pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$",
"scss/at-rule-conditional-no-parentheses": true, "scss/at-rule-conditional-no-parentheses": true,
"scss/comment-no-empty": true,
"scss/comment-no-loud": true, "scss/comment-no-loud": true,
"scss/declaration-nested-properties": "never", "scss/declaration-nested-properties": "never",
"scss/dimension-no-non-numeric-values": true, "scss/dimension-no-non-numeric-values": true,
@ -126,9 +127,6 @@
"scss/dollar-variable-no-missing-interpolation": true, "scss/dollar-variable-no-missing-interpolation": true,
"scss/dollar-variable-pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$", "scss/dollar-variable-pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$",
"scss/double-slash-comment-whitespace-inside": "always", "scss/double-slash-comment-whitespace-inside": "always",
"scss/no-dollar-variables": true,
"scss/no-global-function-names": true,
"scss/no-duplicate-dollar-variables": true,
"scss/no-duplicate-mixins": true, "scss/no-duplicate-mixins": true,
"scss/operator-no-unspaced": true, "scss/operator-no-unspaced": true,
"scss/partial-no-import": true, "scss/partial-no-import": true,

View File

@ -39,4 +39,4 @@ $break-devices: (
medium: px2em(1600px) px2em(1999px), medium: px2em(1600px) px2em(1999px),
large: px2em(2000px) large: px2em(2000px)
) )
); ) !default;

View File

@ -317,7 +317,6 @@ kbd {
content: attr(title); content: attr(title);
} }
} }
} }
// Small text // Small text
@ -496,7 +495,7 @@ kbd {
// Due to margin collapse because of the necessary inline-block hack, we // Due to margin collapse because of the necessary inline-block hack, we
// cannot increase the bottom margin on the table, so we just increase the // cannot increase the bottom margin on the table, so we just increase the
// top margin on the following element // top margin on the following element
& + * { + * {
margin-top: 1.5em; margin-top: 1.5em;
} }

View File

@ -47,9 +47,8 @@ $admonitions: (
// Icon definitions // Icon definitions
:root { :root {
@each $names, $props in $admonitions { @each $names, $props in $admonitions {
--md-admonition-icon--#{nth($names, 1)}: svg-load( --md-admonition-icon--#{nth($names, 1)}:
"@mdi/svg/svg/#{nth($props, 1)}.svg" svg-load("@mdi/svg/svg/#{nth($props, 1)}.svg");
);
} }
} }

View File

@ -128,7 +128,7 @@
// Flip icon vertically // Flip icon vertically
svg { svg {
transform: scaleX(-1) transform: scaleX(-1);
} }
} }
} }

View File

@ -39,7 +39,7 @@
// Arithmatex content // Arithmatex content
> * { > * {
width: min-content; width: min-content;
margin: 1em auto !important; margin: 1em auto !important; // stylelint-disable-line
padding: 0 px2rem(16px); padding: 0 px2rem(16px);
touch-action: auto; touch-action: auto;
} }

View File

@ -26,7 +26,6 @@
// Code block // Code block
.highlight { .highlight {
.o, // Operator .o, // Operator
.ow { // Operator, word .ow { // Operator, word
color: var(--md-code-hl-operator-color); color: var(--md-code-hl-operator-color);
@ -140,7 +139,7 @@
} }
.gi { // Diff, insert .gi { // Diff, insert
background-color: var(--md-typeset-ins-color) background-color: var(--md-typeset-ins-color);
} }
// Highlighted line // Highlighted line
@ -148,7 +147,7 @@
display: block; display: block;
margin: 0 px2em(-16px, 13.6px); margin: 0 px2em(-16px, 13.6px);
padding: 0 px2em(16px, 13.6px); padding: 0 px2em(16px, 13.6px);
background-color: var(--md-code-hl-color) background-color: var(--md-code-hl-color);
} }
// Code block line numbers (inline) // Code block line numbers (inline)

View File

@ -84,7 +84,7 @@
border-color: var(--md-accent-fg-color); border-color: var(--md-accent-fg-color);
// Show tabbed block content // Show tabbed block content
& + .tabbed-content { + .tabbed-content {
display: block; display: block;
} }
} }

View File

@ -26,12 +26,10 @@
// Icon definitions // Icon definitions
:root { :root {
--md-tasklist-icon: svg-load( --md-tasklist-icon:
"@primer/octicons/build/svg/check-circle-fill-24.svg" svg-load("@primer/octicons/build/svg/check-circle-fill-24.svg");
); --md-tasklist-icon--checked:
--md-tasklist-icon--checked: svg-load( svg-load("@primer/octicons/build/svg/check-circle-fill-24.svg");
"@primer/octicons/build/svg/check-circle-fill-24.svg"
);
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -38,7 +38,7 @@ html {
// [screen medium +]: Set base `font-size` to `11px` // [screen medium +]: Set base `font-size` to `11px`
@include break-from-device(screen medium) { @include break-from-device(screen medium) {
font-size: 137.50%; font-size: 137.5%;
} }
// [screen large +]: Set base `font-size` to `12px` // [screen large +]: Set base `font-size` to `12px`

View File

@ -131,7 +131,7 @@
// [no-js]: Hide button // [no-js]: Hide button
.no-js & { .no-js & {
display: none display: none;
} }
// Adjust for right-to-left languages // Adjust for right-to-left languages
@ -205,7 +205,7 @@
} }
// Second header topic - title of the current page // Second header topic - title of the current page
& + .md-header-nav__topic { + .md-header-nav__topic {
z-index: 0; z-index: 0;
transform: translateX(0); transform: translateX(0);
opacity: 1; opacity: 1;

View File

@ -139,7 +139,7 @@
} }
// Hide table of contents // Hide table of contents
& ~ .md-nav { ~ .md-nav {
display: none; display: none;
} }
} }
@ -456,7 +456,7 @@
} }
// Show table of contents // Show table of contents
& ~ .md-nav { ~ .md-nav {
display: flex; display: flex;
} }
} }
@ -496,7 +496,7 @@
} }
// Show table of contents // Show table of contents
& ~ .md-nav { ~ .md-nav {
display: flex; display: flex;
} }
} }

View File

@ -600,7 +600,7 @@
} }
// Adjust transparency of less relevant results // Adjust transparency of less relevant results
& ~ * > * { ~ * > * {
opacity: 0.65; opacity: 0.65;
} }
} }

View File

@ -29,6 +29,7 @@
0% { 0% {
height: 0; height: 0;
} }
100% { 100% {
height: px2rem(13px); height: px2rem(13px);
} }
@ -40,9 +41,11 @@
transform: translateY(100%); transform: translateY(100%);
opacity: 0; opacity: 0;
} }
50% { 50% {
opacity: 0; opacity: 0;
} }
100% { 100% {
transform: translateY(0%); transform: translateY(0%);
opacity: 1; opacity: 1;

View File

@ -26,10 +26,15 @@
// Pumping heart animation // Pumping heart animation
@keyframes tx-heart { @keyframes tx-heart {
0%, 40%, 80%, 100% { 0%,
40%,
80%,
100% {
transform: scale(1); transform: scale(1);
} }
20%, 60% {
20%,
60% {
transform: scale(1.15); transform: scale(1.15);
} }
} }
@ -48,7 +53,7 @@
// Twitter icon // Twitter icon
.twitter { .twitter {
color: #00ACEE; color: #00acee;
} }
// Insiders video // Insiders video

View File

@ -41,6 +41,6 @@
// Twitter icon // Twitter icon
.twitter { .twitter {
margin-left: .2em; margin-left: 0.2em;
} }
} }

View File

@ -64,7 +64,7 @@ $break-devices: () !default;
@each $number in $value { @each $number in $value {
@if type-of($number) == number { @if type-of($number) == number {
$min: min($number, $min); $min: min($number, $min);
@if $max != null { @if $max {
$max: max($number, $max); $max: max($number, $max);
} }
} @else { } @else {
@ -78,7 +78,7 @@ $break-devices: () !default;
@error "Invalid value: #{$value}"; @error "Invalid value: #{$value}";
} }
} }
@returns $min, $max; @return $min, $max;
} }
/// ///
@ -96,7 +96,7 @@ $break-devices: () !default;
@if type-of($current) == list or type-of($current) == number { @if type-of($current) == list or type-of($current) == number {
$current: (default: $current); $current: (default: $current);
} }
@returns break-select-min-max($current); @return break-select-min-max($current);
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -161,9 +161,10 @@ $break-devices: () !default;
} }
@if type-of($device) == list { @if type-of($device) == list {
$breakpoint: break-select-device($device); $breakpoint: break-select-device($device);
@if nth($breakpoint, 2) != null { @if nth($breakpoint, 2) {
$min: nth($breakpoint, 1); $min: nth($breakpoint, 1);
$max: nth($breakpoint, 2); $max: nth($breakpoint, 2);
@media screen and (min-width: $min) and (max-width: $max) { @media screen and (min-width: $min) and (max-width: $max) {
@content; @content;
} }
@ -185,6 +186,7 @@ $break-devices: () !default;
@if type-of($device) == list { @if type-of($device) == list {
$breakpoint: break-select-device($device); $breakpoint: break-select-device($device);
$min: nth($breakpoint, 1); $min: nth($breakpoint, 1);
@media screen and (min-width: $min) { @media screen and (min-width: $min) {
@content; @content;
} }
@ -203,6 +205,7 @@ $break-devices: () !default;
@if type-of($device) == list { @if type-of($device) == list {
$breakpoint: break-select-device($device); $breakpoint: break-select-device($device);
$max: nth($breakpoint, 2); $max: nth($breakpoint, 2);
@media screen and (max-width: $max) { @media screen and (max-width: $max) {
@content; @content;
} }

View File

@ -52,7 +52,7 @@
@function px2em($size, $base: 16px) { @function px2em($size, $base: 16px) {
@if unit($size) == px { @if unit($size) == px {
@if unit($base) == px { @if unit($base) == px {
@returns ($size / $base) * 1em; @return ($size / $base) * 1em;
} @else { } @else {
@error "Invalid base: #{$base} - unit must be 'px'"; @error "Invalid base: #{$base} - unit must be 'px'";
} }
@ -67,7 +67,7 @@
@function px2rem($size, $base: 20px) { @function px2rem($size, $base: 20px) {
@if unit($size) == px { @if unit($size) == px {
@if unit($base) == px { @if unit($base) == px {
@returns ($size / $base) * 1.0rem; @return ($size / $base) * 1rem;
} @else { } @else {
@error "Invalid base: #{$base} - unit must be 'px'"; @error "Invalid base: #{$base} - unit must be 'px'";
} }