diff --git a/Gruntfile.js b/Gruntfile.js index 7622be1ec8d..f09f5f7a870 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -185,7 +185,6 @@ module.exports = function(grunt) { configOverrides: { rules: { // TODO: MDL-55165 -Enable these rules once we make output-changing changes to less. - "length-zero-no-unit": null, "color-hex-case": null, "color-hex-length": null, // These rules have to be disabled in .stylelintrc for scss compat. diff --git a/theme/bootstrapbase/less/moodle/admin.less b/theme/bootstrapbase/less/moodle/admin.less index 3b7eb534c0f..192d2cb253f 100644 --- a/theme/bootstrapbase/less/moodle/admin.less +++ b/theme/bootstrapbase/less/moodle/admin.less @@ -650,7 +650,7 @@ img.iconsmall { .status { .actionbutton { - margin: 5px 0px; + margin: 5px 0; padding: 0; input { margin: 0; diff --git a/theme/bootstrapbase/less/moodle/blocks.less b/theme/bootstrapbase/less/moodle/blocks.less index e58df2671c6..69f1b19f5a7 100644 --- a/theme/bootstrapbase/less/moodle/blocks.less +++ b/theme/bootstrapbase/less/moodle/blocks.less @@ -158,7 +158,7 @@ .footer { margin-top: .5em; padding-top: 10px; - padding-left: 0px; + padding-left: 0; } } } @@ -204,7 +204,7 @@ } .footer { padding-top: 10px; - padding-left: 0px; + padding-left: 0; } } diff --git a/theme/bootstrapbase/less/moodle/calendar.less b/theme/bootstrapbase/less/moodle/calendar.less index f010ee8b96c..96579af231e 100644 --- a/theme/bootstrapbase/less/moodle/calendar.less +++ b/theme/bootstrapbase/less/moodle/calendar.less @@ -362,7 +362,7 @@ font-size: 10px; font-weight: bold; background-color: #f60; - padding: 0px 5px; + padding: 0 5px; color: #fff; border-top: 1px solid #f93; border-left: 1px solid #f93; diff --git a/theme/bootstrapbase/less/moodle/core.less b/theme/bootstrapbase/less/moodle/core.less index 91745b473a7..605ce7c2730 100644 --- a/theme/bootstrapbase/less/moodle/core.less +++ b/theme/bootstrapbase/less/moodle/core.less @@ -721,12 +721,12 @@ img.user-image { .path-tag .tag-index-items .tagarea h3 { display: block; padding: 3px 0 10px 0; - margin: 0px; + margin: 0; font-size: 1.1em; font-weight: bold; line-height: 20px; color: #999; - text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5); + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); text-transform: uppercase; word-wrap: break-word; border-bottom: solid 1px #E3E3E3; @@ -842,7 +842,7 @@ tr.flagged-tag a { text-align: center; } .tag_cloud .inline-list li { - padding: 0px 0.2em; + padding: 0 0.2em; } .tag_cloud .tag_overflow { margin-top: 1em; @@ -1360,9 +1360,9 @@ body#page-lib-editor-tinymce-plugins-moodlemedia-preview { overflow: hidden; } .moodle-dialogue-base .moodle-dialogue-fullscreen { - left: 0px; - top: 0px; - right: 0px; + left: 0; + top: 0; + right: 0; bottom: -50px; position: fixed; } @@ -1445,16 +1445,16 @@ body#page-lib-editor-tinymce-plugins-moodlemedia-preview { .moodle-dialogue-base .moodle-dialogue-fullscreen .moodle-dialogue-content { overflow: auto; position: absolute; - top: 0px; + top: 0; bottom: 50px; - left: 0px; - right: 0px; - margin: 0px; - border: 0px; + left: 0; + right: 0; + margin: 0; + border: 0; } .moodle-dialogue-base .moodle-dialogue-fullscreen .moodle-dialogue-hd, .moodle-dialogue-base .moodle-dialogue-fullscreen .moodle-dialogue-wrap { - border-radius: 0px; + border-radius: 0; } .moodle-dialogue-confirm .confirmation-dialogue { text-align: center; @@ -1603,7 +1603,7 @@ body#page-lib-editor-tinymce-plugins-moodlemedia-preview { overflow-x: hidden; overflow-y: auto; max-width: 20.3em; - .box-shadow(inset 0 0 30px 0px #ccc); + .box-shadow(inset 0 0 30px 0 #ccc); .option { input[type=radio] { display: inline-block; @@ -1790,12 +1790,12 @@ table.collection .actions { } a.criteria-action { - padding: 0px 3px; + padding: 0 3px; float: right; } div.criteria-description { padding: 10px 15px; - margin: 5px 0px; + margin: 5px 0; background: none repeat scroll 0 0 #f9f9f9; border: 1px solid #EEE; } @@ -1822,7 +1822,7 @@ ul.badges { width: 100px; height: 100px; left: 10px; - top: 0px; + top: 0; z-index: 1; } .badges li .badge-actions { @@ -1832,7 +1832,7 @@ ul.badges { width: 100px; height: 100px; left: 25px; - top: 0px; + top: 0; position: absolute; z-index: 10; opacity: 0.85; @@ -1851,8 +1851,8 @@ ul.badges { .expireimage { width: 100px; height: 100px; - left: 0px; - top: 0px; + left: 0; + top: 0; .opacity(85); position: absolute; z-index: 10; @@ -1862,7 +1862,7 @@ ul.badges { padding-top: 5px; input { - margin-left: 0px; + margin-left: 0; } } } @@ -1939,7 +1939,7 @@ ul.badges { margin: 3px; } .activatebadge { - margin: 0px; + margin: 0; text-align: left; vertical-align: middle; } @@ -2064,8 +2064,8 @@ img#persona_signin { .iconsmall, .smallicon { - margin: 4px 4px 4px 0px; - padding: 8px 4px 0px 2px; + margin: 4px 4px 4px 0; + padding: 8px 4px 0 2px; vertical-align: text-bottom; } diff --git a/theme/bootstrapbase/less/moodle/course.less b/theme/bootstrapbase/less/moodle/course.less index c2af4daf7ae..9811c8fdaa2 100644 --- a/theme/bootstrapbase/less/moodle/course.less +++ b/theme/bootstrapbase/less/moodle/course.less @@ -684,8 +684,8 @@ span.editinstructions { .iconsmall { width: 12px; height: 12px; - margin: 8px 8px 0px 0; - padding: 4px 8px 0px 0; + margin: 8px 8px 0 0; + padding: 4px 8px 0 0; vertical-align: text-bottom; } } diff --git a/theme/bootstrapbase/less/moodle/filemanager.less b/theme/bootstrapbase/less/moodle/filemanager.less index 13d742a0c0c..807ebf1dd2c 100644 --- a/theme/bootstrapbase/less/moodle/filemanager.less +++ b/theme/bootstrapbase/less/moodle/filemanager.less @@ -77,7 +77,7 @@ } .moodle-dialogue-base .filepicker .moodle-dialogue-wrap .moodle-dialogue-bd { - padding: 0px; + padding: 0; } // File Picker layout @@ -103,8 +103,8 @@ margin-left: 181px; } .moodle-dialogue-fullscreen .file-picker .fp-repo-items { - margin-left: 0px; - margin-right: 0px; + margin-left: 0; + margin-right: 0; float: left; } .file-picker .fp-navbar { @@ -282,7 +282,7 @@ .fp-iconview .fp-thumbnail:hover { background: #fff; border: 1px solid #ddd; - .box-shadow(inset 0 0 10px 0px #ccc); + .box-shadow(inset 0 0 10px 0 #ccc); } .fp-iconview .fp-filename-field { height: 33px; diff --git a/theme/bootstrapbase/less/moodle/forms.less b/theme/bootstrapbase/less/moodle/forms.less index 381f7f94682..3087c476dd9 100644 --- a/theme/bootstrapbase/less/moodle/forms.less +++ b/theme/bootstrapbase/less/moodle/forms.less @@ -374,7 +374,7 @@ fieldset.coursesearchbox label { margin-bottom: 4px; } .availability-plugincontrols { - padding: 2px 0px 0px 4px; + padding: 2px 0 0 4px; background: none repeat scroll 0% 0% @wellBackground; border: 1px solid @grayLighter; border-radius: 4px; @@ -420,6 +420,7 @@ fieldset.coursesearchbox label { } } + /* Default form styling colours all text red. With availability conditions this looks excessive as we show 'Invalid' markers in specific places. */ .mform .error .availability-field { @@ -487,8 +488,8 @@ input[size] { min-width: 206px; max-height: 20em; overflow: auto; - margin: 0px; - padding: 0px; + margin: 0; + padding: 0; margin-top: -0.2em; z-index: 1; } diff --git a/theme/bootstrapbase/less/moodle/grade.less b/theme/bootstrapbase/less/moodle/grade.less index 1679fbce8e6..bb80f7afcd5 100644 --- a/theme/bootstrapbase/less/moodle/grade.less +++ b/theme/bootstrapbase/less/moodle/grade.less @@ -92,14 +92,14 @@ vertical-align: top; padding: @rubricPadding; textarea { - margin-bottom: 0px; + margin-bottom: 0; height: 115px; } } .definition { textarea { width: 80%; - margin-bottom: 0px; + margin-bottom: 0; } } .score { @@ -107,7 +107,7 @@ float: left; margin-right: 28px; input { - margin-bottom: 0px; + margin-bottom: 0; } } .level { @@ -127,7 +127,7 @@ bottom: 0; height: 24px; width: 24px; - margin: 0px; + margin: 0; &:hover { background-color: #ddd; } @@ -151,7 +151,7 @@ vertical-align: middle; input { .btn(); - background-position: 0px 0px; + background-position: 0 0; height: 30px; margin-right: 5px; } @@ -166,7 +166,7 @@ margin: 0; color: inherit; text-shadow: inherit; - border: 0px none; + border: 0 none; line-height: inherit; background: transparent url([[pix:t/add]]) no-repeat 7px 8px; padding-left: 26px; diff --git a/theme/bootstrapbase/less/moodle/modules.less b/theme/bootstrapbase/less/moodle/modules.less index 345e3583d89..3514265a174 100644 --- a/theme/bootstrapbase/less/moodle/modules.less +++ b/theme/bootstrapbase/less/moodle/modules.less @@ -611,7 +611,7 @@ div#dock { &:hover img { background: #fff; border-radius: 4px; - box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.125); + box-shadow: 0 0 16px rgba(0, 0, 0, 0.125); } } } @@ -682,7 +682,7 @@ div#dock { &:hover img { background: #333; border-radius: 4px; - box-shadow: 0px 0px 16px rgba(255, 255, 255, 1); + box-shadow: 0 0 16px rgba(255, 255, 255, 1); } } } @@ -721,7 +721,7 @@ div#dock { > .menubar { display: block; - margin: 0px; + margin: 0; } > .menu { min-width: 160px; @@ -877,7 +877,7 @@ div#dock { } .qnbutton.flagged .thispageholder { - background: transparent url([[pix:theme|mod/quiz/flag-on]]) 15px 0px no-repeat; + background: transparent url([[pix:theme|mod/quiz/flag-on]]) 15px 0 no-repeat; } .qnbutton .trafficlight { diff --git a/theme/bootstrapbase/less/moodle/question.less b/theme/bootstrapbase/less/moodle/question.less index e024786ae64..9f30c659eba 100644 --- a/theme/bootstrapbase/less/moodle/question.less +++ b/theme/bootstrapbase/less/moodle/question.less @@ -135,7 +135,7 @@ padding-left: 5px; } .checkbox input[type="checkbox"] { - margin-left: 0px; + margin-left: 0; float: none; } img.iconsmall { @@ -438,7 +438,7 @@ body.path-question-type .fitem_fgroup .accesshide { } #page-mod-quiz-edit div.question div.content div.points { margin-top: -0.5em; - padding-bottom: 0em; + padding-bottom: 0; border: none; background-color: @bodyBackground; position: static; diff --git a/theme/bootstrapbase/less/moodle/responsive.less b/theme/bootstrapbase/less/moodle/responsive.less index 796ed053d5e..0525f9d15da 100644 --- a/theme/bootstrapbase/less/moodle/responsive.less +++ b/theme/bootstrapbase/less/moodle/responsive.less @@ -52,7 +52,7 @@ height: auto; max-height: 220px; float: none; - border: 0px; + border: 0; } .file-picker .fp-repo-items { width: 100%; diff --git a/theme/bootstrapbase/less/moodle/undo.less b/theme/bootstrapbase/less/moodle/undo.less index ec72d9ae6ec..b9e28136e4b 100644 --- a/theme/bootstrapbase/less/moodle/undo.less +++ b/theme/bootstrapbase/less/moodle/undo.less @@ -162,8 +162,8 @@ img.icon-pre { .loginbox.twocolumns { .signuppanel, .loginpanel { - padding: 0px; - margin: 0px; + padding: 0; + margin: 0; } }