From 0fa8e18b8581975dd61178f1554c31fb3588ee3b Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Tue, 15 Nov 2022 01:16:49 +0100 Subject: [PATCH] build: Run stylelint for vue files Change-Id: Iabb7aae258d6a5eb1be3a7fe0a9f90f4735ec880 --- .stylelintrc.json | 7 +++++- Gruntfile.js | 2 +- resources/components/App.vue | 10 ++++---- .../components/QuickViewTutorialPopup.vue | 13 ++++++++++ .../components/generic/ContentSkeleton.vue | 4 +++- .../generic/ImageWithLoadingBackground.vue | 15 ++++-------- resources/components/generic/LoadingDots.vue | 2 +- resources/components/sections/QuickView.vue | 1 - .../components/sections/QuickViewCommons.vue | 24 +++++++++---------- .../sections/QuickViewDescription.vue | 2 +- .../components/sections/QuickViewSections.vue | 14 ++++++----- .../components/sections/QuickViewSnippet.vue | 2 +- 12 files changed, 56 insertions(+), 40 deletions(-) diff --git a/.stylelintrc.json b/.stylelintrc.json index 2c90730..68e3bff 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,3 +1,8 @@ { - "extends": "stylelint-config-wikimedia" + "extends": "stylelint-config-wikimedia", + "rules": { + "declaration-property-unit-disallowed-list": null, + "declaration-property-value-disallowed-list": null, + "selector-pseudo-element-colon-notation": null + } } diff --git a/Gruntfile.js b/Gruntfile.js index a68ae2a..6435039 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,7 +18,7 @@ module.exports = function ( grunt ) { }, stylelint: { all: [ - '**/*.less', + '**/*.{less,vue}', '!node_modules/**', '!vendor/**', '!lib/**' diff --git a/resources/components/App.vue b/resources/components/App.vue index 8676391..5a5ae99 100644 --- a/resources/components/App.vue +++ b/resources/components/App.vue @@ -198,14 +198,13 @@ module.exports = exports = { @import '../styles/Search-result-mobile.less'; .mw-search-quick-view { - - background-color: white; - font-family: -apple-system, 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Lato', 'Helvetica', 'Arial', sans-serif; + background-color: #000; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Lato', 'Helvetica', 'Arial', sans-serif; &__desktop { position: absolute; - border: solid 1px #c8CCd1; - right: 0px; + border: solid 1px #c8ccd1; + right: 0; width: 30em; display: inline-block; } @@ -218,6 +217,7 @@ module.exports = exports = { height: 174px; margin: 0; top: 0; + & > * { min-width: 300px; } diff --git a/resources/components/QuickViewTutorialPopup.vue b/resources/components/QuickViewTutorialPopup.vue index b043c59..aaab5bc 100644 --- a/resources/components/QuickViewTutorialPopup.vue +++ b/resources/components/QuickViewTutorialPopup.vue @@ -78,6 +78,7 @@ module.exports = exports = { padding: 12px; width: 320px; left: 310px; + &__triangle { top: 0; left: 50%; @@ -90,6 +91,7 @@ module.exports = exports = { border-right: 8px solid transparent; border-left: 8px solid transparent; position: absolute; + &:after { content: ''; width: 0; @@ -102,6 +104,7 @@ module.exports = exports = { top: -7px; left: -8px; } + &:before { top: -8px; left: -6px; @@ -115,21 +118,26 @@ module.exports = exports = { animation: pulse 2s infinite; z-index: 10; } + @keyframes pulse { 0% { box-shadow: 0 0 0 0 @pulse-dot-fading; } + 70% { box-shadow: 0 0 0 10px @pulse-dot-transparent; } + 100% { box-shadow: 0 0 0 0 @pulse-dot-transparent; } } } + &__heading { display: flex; } + &__title { h4 { font-size: 16px; @@ -140,22 +148,27 @@ module.exports = exports = { text-transform: capitalize; } } + &__article--icon { background-image: url( ../assets/icons/article.svg ); background-repeat: no-repeat; width: 14px; } + &__close--icon { cursor: pointer; margin-left: auto; line-height: 1; } + &__content { padding-top: 25px; + p { padding: 0; margin: 0; line-height: 1.45; + &:first-child { margin-bottom: 16px; } diff --git a/resources/components/generic/ContentSkeleton.vue b/resources/components/generic/ContentSkeleton.vue index 2be14ac..364af36 100644 --- a/resources/components/generic/ContentSkeleton.vue +++ b/resources/components/generic/ContentSkeleton.vue @@ -32,13 +32,15 @@ module.exports = exports = { diff --git a/resources/components/generic/ImageWithLoadingBackground.vue b/resources/components/generic/ImageWithLoadingBackground.vue index ab56d2f..b6f1d24 100644 --- a/resources/components/generic/ImageWithLoadingBackground.vue +++ b/resources/components/generic/ImageWithLoadingBackground.vue @@ -60,27 +60,22 @@ module.exports = exports = { flex: 1; &__loading { - background-color: #EAECF0; + background-color: #eaecf0; position: relative; overflow: hidden; img { visibility: hidden; } + &::after { position: absolute; top: 0; right: 0; bottom: 0; left: 0; - transform: translateX(-100%); - background-image: linear-gradient( - 90deg, - rgba(255, 255, 255, 0) 0, - rgba(255, 255, 255, 0.2) 20%, - rgba(255, 255, 255, 0.6) 60%, - rgba(255, 255, 255, 0) - ); + transform: translateX( -100% ); + background-image: linear-gradient( 90deg, rgba( 255, 255, 255, 0 ) 0, rgba( 255, 255, 255, 0.2 ) 20%, rgba( 255, 255, 255, 0.6 ) 60%, rgba( 255, 255, 255, 0 ) ); animation: shimmer 3s infinite; content: ''; } @@ -95,7 +90,7 @@ module.exports = exports = { @keyframes shimmer { 100% { - transform: translateX(100%); + transform: translateX( 100% ); } } } diff --git a/resources/components/generic/LoadingDots.vue b/resources/components/generic/LoadingDots.vue index 1c0844a..2d46d78 100644 --- a/resources/components/generic/LoadingDots.vue +++ b/resources/components/generic/LoadingDots.vue @@ -26,7 +26,6 @@ module.exports = exports = { // Re-usable LESS project code. @width-bounce-dot: 1em; @margin-bounce-dot: @width-bounce-dot / 4; - white-space: nowrap; display: block; width: 3 * @width-bounce-dot + 2 * @margin-bounce-dot; @@ -61,6 +60,7 @@ module.exports = exports = { 100% { transform: scale( 0.625 ); } + 20% { opacity: 0.87; transform: scale( 1 ); diff --git a/resources/components/sections/QuickView.vue b/resources/components/sections/QuickView.vue index 13383fd..81a1d2d 100644 --- a/resources/components/sections/QuickView.vue +++ b/resources/components/sections/QuickView.vue @@ -176,6 +176,5 @@ module.exports = exports = { padding-bottom: 20px; min-height: 32px; } - } diff --git a/resources/components/sections/QuickViewCommons.vue b/resources/components/sections/QuickViewCommons.vue index 19ca407..067a1ca 100644 --- a/resources/components/sections/QuickViewCommons.vue +++ b/resources/components/sections/QuickViewCommons.vue @@ -120,7 +120,7 @@ module.exports = exports = { margin: 0 auto 20px; h3 { - font-weight: 400; + font-weight: normal; font-size: 1em; margin: 0; padding: 0; @@ -131,6 +131,17 @@ module.exports = exports = { margin-bottom: 8px; } + &__footNote { + background-image: url( ../../assets/icons/commons.svg ); + padding-left: 23px; + background-repeat: no-repeat; + background-position-y: center; + + a { + color: inherit; + } + } + ul { max-height: 210px; overflow: hidden; @@ -157,16 +168,5 @@ module.exports = exports = { } } } - - &__footNote { - background-image: url( '../../assets/icons/commons.svg' ); - padding-left: 23px; - background-repeat: no-repeat; - background-position-y: center; - - a { - color: inherit; - } - } } diff --git a/resources/components/sections/QuickViewDescription.vue b/resources/components/sections/QuickViewDescription.vue index ec108e2..d70a3d4 100644 --- a/resources/components/sections/QuickViewDescription.vue +++ b/resources/components/sections/QuickViewDescription.vue @@ -40,7 +40,7 @@ module.exports = exports = {