From 46c1713c40a918b5e52f838bab87b4a8d14368b9 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Thu, 22 Sep 2016 11:08:20 +0100 Subject: [PATCH] MDL-55071 theme_boost: fix stylelint detected issues in scss Duplicate properties, star hacks --- Gruntfile.js | 8 +------- theme/boost/scss/moodle/bootstrap-rtl.scss | 2 +- theme/boost/scss/moodle/core.scss | 5 +---- theme/boost/scss/moodle/course.scss | 6 +----- theme/boost/scss/moodle/question.scss | 8 -------- theme/boost/scss/moodle/reports.scss | 2 +- theme/boost/scss/moodle/responsive.scss | 4 ---- theme/boost/scss/moodle/undo.scss | 1 - theme/boost/scss/moodle/user.scss | 2 -- 9 files changed, 5 insertions(+), 33 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 750aa445989..75a270ccd9f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -206,13 +206,7 @@ module.exports = function(grunt) { syntax: 'scss', configOverrides: { rules: { - "unit-blacklist": null, // TODO: alter based on outcome of MDL-56061. - "declaration-no-important": null, // TODO: to be addressed by MDL-56063. - // TODO: MDL-55165 - Enable the following rules once we make output-changing changes to scss. - "declaration-block-no-duplicate-properties": null, - "declaration-block-no-ignored-properties": null, - "declaration-block-no-shorthand-property-overrides": null, - "property-no-unknown": null, + "declaration-no-important": null // TODO: to be addressed by MDL-56063. } }, }, diff --git a/theme/boost/scss/moodle/bootstrap-rtl.scss b/theme/boost/scss/moodle/bootstrap-rtl.scss index 2886586d2e3..659cc1b9a4b 100644 --- a/theme/boost/scss/moodle/bootstrap-rtl.scss +++ b/theme/boost/scss/moodle/bootstrap-rtl.scss @@ -9,6 +9,6 @@ + .breadcrumb-item::before { content: "#{$breadcrumb-divider-rtl}"; /*rtl:remove*/ - content: "#{$breadcrumb-divider}"; + content: "#{$breadcrumb-divider}"; /* stylelint-disable-line declaration-block-no-duplicate-properties */ } } diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index 2f72e70be24..c0255982cc0 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -1120,8 +1120,7 @@ tr.flagged-tag a { div, fieldset { - display: inline; - float: none; + display: inline-block; clear: none; width: auto; margin: 0; @@ -1304,7 +1303,6 @@ body#page-lib-editor-tinymce-plugins-moodlemedia-preview { // Undo some YUI damage. min-height: 3rem; color: initial; - background-color: initial; background: initial; font-size: 1.5rem; line-height: 1.5; @@ -1935,7 +1933,6 @@ img#persona_signin { .invisiblefieldset { display: inline; - margin: 0; padding: 0; border-width: 0; } diff --git a/theme/boost/scss/moodle/course.scss b/theme/boost/scss/moodle/course.scss index fb3a3a44dde..23f734fb5a8 100644 --- a/theme/boost/scss/moodle/course.scss +++ b/theme/boost/scss/moodle/course.scss @@ -66,7 +66,6 @@ .spinner { left: 100%; position: absolute; - vertical-align: text-bottom; } .editing_move { @@ -125,7 +124,6 @@ // This must be sized like an icon to fill the space. width: 16px; height: 16px; - margin: 0; padding: 0; margin: 0 ($spacer / 2); display: inline-block; @@ -846,7 +844,6 @@ span.editinstructions { .item-actions { margin-right: 1em; display: inline-block; - display: initial; > a img, .menubar img { @@ -1099,8 +1096,7 @@ span.editinstructions { line-height: 40px; > div { - margin-left: 1em; - margin: 10px 0; + margin: 10px 0 10px 1em; display: inline-block; } } diff --git a/theme/boost/scss/moodle/question.scss b/theme/boost/scss/moodle/question.scss index 2071d702449..5945cd631ff 100644 --- a/theme/boost/scss/moodle/question.scss +++ b/theme/boost/scss/moodle/question.scss @@ -100,12 +100,7 @@ #chooseqtype .alloptions { overflow-x: hidden; overflow-y: auto; - max-height: 400px; max-height: calc(100vh - 15em); - /* The next line is a workaround because recess is crap. Delete ththe following line once - * https://github.com/twitter/recess/issues/59 / https://github.com/twitter/recess/issues/75 - * is fixed. The previous line is the right one. */ - max-height: 60vh; width: 60%; } @@ -139,7 +134,6 @@ overflow-y: auto; padding: 1.5em 1.6em; background-color: #fff; - overflow-y: auto; } #chooseqtype .instruction, @@ -215,7 +209,6 @@ body.path-question-type .fitem_fgroup .accesshide { font: inherit; - left: 0; position: static; padding-right: .3em; } @@ -456,7 +449,6 @@ body.path-question-type .fitem_fgroup .accesshide { #page-mod-quiz-edit .questionbankwindow div.header { color: #444; text-shadow: none; - padding: 3px; @include border-top-radius(4px); margin: 0 -10px 0 -10px; diff --git a/theme/boost/scss/moodle/reports.scss b/theme/boost/scss/moodle/reports.scss index cb581764251..79289a17eee 100644 --- a/theme/boost/scss/moodle/reports.scss +++ b/theme/boost/scss/moodle/reports.scss @@ -5,7 +5,7 @@ // and replace it completely. #page-report-participation-index .participationselectform div label { // Using 'div' here to override the report styles.css - display: inline; + display: inline-block; margin: 0 5px; // No top and bottom margin with a 5px left and right for LTR and RTL. } diff --git a/theme/boost/scss/moodle/responsive.scss b/theme/boost/scss/moodle/responsive.scss index 91726f81568..c0d8dd2c04d 100644 --- a/theme/boost/scss/moodle/responsive.scss +++ b/theme/boost/scss/moodle/responsive.scss @@ -44,7 +44,6 @@ width: 100%; height: auto; max-height: 220px; - y-scroll: auto; float: none; border: 0; } @@ -137,7 +136,6 @@ .loginbox.twocolumns .loginpanel, .loginbox.twocolumns .signuppanel { width: 48.617948717948715%; - *width: 48.664757228587014%; } } @@ -219,7 +217,6 @@ .fp-content-center { display: block; - vertical-align: top; } .course-content ul.topics li.section, @@ -691,7 +688,6 @@ #course-listing { @include fluid-span(6); margin-left: $fluidGridGutterWidth1200; - *margin-left: $fluidGridGutterWidth1200 - (.5 / $gridRowWidth * 100 * 1%); &:first-child { margin-left: 0; diff --git a/theme/boost/scss/moodle/undo.scss b/theme/boost/scss/moodle/undo.scss index 9ba1c494521..b6dfe289ee7 100644 --- a/theme/boost/scss/moodle/undo.scss +++ b/theme/boost/scss/moodle/undo.scss @@ -124,7 +124,6 @@ div.c1.btn { font-size: inherit; line-height: inherit; text-align: inherit; - vertical-align: inherit; cursor: default; color: inherit; text-shadow: inherit; diff --git a/theme/boost/scss/moodle/user.scss b/theme/boost/scss/moodle/user.scss index 5d5edecd6d4..378985eba2d 100644 --- a/theme/boost/scss/moodle/user.scss +++ b/theme/boost/scss/moodle/user.scss @@ -21,8 +21,6 @@ @extend .card; @extend .card-block; break-inside: avoid; - -moz-break-inside: avoid; - -webkit-column-break-inside: avoid; } .userprofile .profile_tree section h3 {