Commit 5142f564 authored by Frederic Massart's avatar Frederic Massart Committed by Dan Poltawski
Browse files

MDL-56063 theme_boost: Check and remove extraneous !important rules

Progress bar styling has been removed as they do not appear to
be used anywhere, though MDL-56095 has been created to style them
as (with or without the styles) they remain unstyled.

The file responsive.scss has been removed, it was not used.

Part of MDL-55071
parent 5cb8ca86
......@@ -202,14 +202,7 @@ module.exports = function(grunt) {
src: ['theme/**/*.less']
},
scss: {
options: {
syntax: 'scss',
configOverrides: {
rules: {
"declaration-no-important": null // TODO: to be addressed by MDL-56063.
}
},
},
options: {syntax: 'scss'},
src: ['*/**/*.scss']
}
}
......
......@@ -21,7 +21,7 @@
/*rtl:ignore*/
.text-ltr {
direction: ltr !important;
direction: ltr !important; /* stylelint-disable-line declaration-no-important */
}
#add,
......@@ -1313,21 +1313,15 @@ body#page-lib-editor-tinymce-plugins-moodlemedia-preview {
}
.moodle-dialogue-base .moodle-dialogue-wrap .moodle-dialogue-hd .yui3-widget-buttons {
padding: 5px;
right: 0;
padding: $spacer;
}
.moodle-dialogue-base .closebutton {
@extend .close;
margin: 0;
padding: 10px !important;
background: 0;
border-style: none;
box-shadow: none;
}
.moodle-dialogue-base .closebutton::after {
content: "×";
&::after {
content: "×";
}
}
.moodle-dialogue-base .moodle-dialogue .moodle-dialogue-bd {
......
......@@ -43,33 +43,7 @@ table#modules,
table#permissions {
@extend .table-hover;
}
// language editing progress bar
// copied in because the styles are set on the HTML
div[id^="bar_pbar_"] {
overflow: hidden !important;
height: $line-height-base !important;
margin-bottom: $line-height-base !important;
@include gradient-y(#f5f5f5, #f9f9f9);
@include box-shadow(inset 0 1px 2px rgba(0, 0, 0, .1));
@include border-radius($border-radius);
border: none !important;
}
div[id^="progress_pbar_"] {
height: 100% !important;
color: $body-bg !important;
float: left !important;
font-size: 12px !important;
text-align: center !important;
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25) !important;
@include gradient-y(#149bdf, #0480be);
@include box-shadow(inset 0 -1px 0 rgba(0, 0, 0, .15));
@include transition(width .6s ease);
padding-top: 0 !important;
border: none !important;
}
// colored buttons
input.form-submit,
input#id_submitbutton,
......
......@@ -651,22 +651,28 @@ a.ygtvspacer:hover {
width: 100%;
}
.filemanager .yui3-datatable-header {
background: #fff !important;
border-bottom: 1px solid #ccc !important;
border-left: 0 solid #fff !important;
color: #555 !important;
}
/* Override YUI default styling */
/* stylelint-disable declaration-no-important */
.filemanager {
.filemanager .yui3-datatable-odd .yui3-datatable-cell {
background-color: #f6f6f6 !important;
border-left: 0 solid #f6f6f6;
}
.yui3-datatable-header {
background: #fff !important;
border-bottom: 1px solid #ccc !important;
border-left: 0 solid #fff !important;
color: #555 !important;
}
.filemanager .yui3-datatable-even .yui3-datatable-cell {
background-color: #fff !important;
border-left: 0 solid #fff;
.yui3-datatable-odd .yui3-datatable-cell {
background-color: #f6f6f6 !important;
border-left: 0 solid #f6f6f6;
}
.yui3-datatable-even .yui3-datatable-cell {
background-color: #fff !important;
border-left: 0 solid #fff;
}
}
/* stylelint-enable */
.filemanager .fp-filename-icon.fp-hasreferences .fp-reficons1 {
background: url('[[pix:theme|fp/link_sm]]') no-repeat 0 0;
......
......@@ -26,7 +26,7 @@ a:first-of-type > .icon {
// YUI 2 Tree View icons must not have a margin left.
.ygtvcell .icon {
margin-left: 0 !important;
margin-left: 0 !important; /* stylelint-disable-line declaration-no-important */
}
// In the navigation, tree icons should not have margins.
......
......@@ -142,7 +142,7 @@ select {
// Override hardcoded forum modules styling
.forumsearch input[type=text] {
margin-bottom: 0 !important;
margin-bottom: 0;
}
#page-mod-forum-discuss .discussioncontrols {
......
/* responsive.less */
// Should probably be moved to relevant @mixin less files
// after 4095 selector issue is solved
@media (min-width: ($navbarCollapseDesktopWidth)) {
a[id]:empty::before,
a[name]:empty::before {
display: inline-block;
position: relative;
content: '';
padding-top: $navbarHeight;
margin-top: -$navbarHeight;
vertical-align: top;
}
}
@media (min-width: 980px) and (max-width: 1199px) {
// Wider form labels.
.form-item .form-label,
.mform .fitem div.fitemtitle,
.userprofile dl.list dt,
.form-horizontal .control-label {
width: $horizontalComponentOffset980 - 20px;
}
.form-item .form-setting,
.form-item .form-description,
.mform .fitem .felement,
.mform .fdescription.required,
.userprofile dl.list dd,
.form-horizontal .controls {
margin-left: $horizontalComponentOffset980;
}
.path-admin .buttons,
.form-buttons {
padding-left: $horizontalComponentOffset980;
}
}
@media (max-width: 767px) {
.file-picker .fp-repo-area {
width: 100%;
height: auto;
max-height: 220px;
float: none;
border: 0;
}
.file-picker .fp-repo-items {
width: 100%;
float: none;
margin-left: 0;
}
.file-picker .fp-login-form .fp-login-input label {
text-align: left;
}
.file-picker .fp-content form td {
display: block;
width: 100%;
text-align: left;
}
.fp-content .mdl-right {
text-align: left;
}
.fp-repo-items .fp-navbar {
border-top: 1px solid rgb(187, 187, 187);
}
.fp-formset div {
height: auto;
}
}
@media (min-width: 1200px) {
// Editor on question page
.path-question {
#id_answerhdr div.fitem_feditor {
padding-right: 6px;
}
}
// Wider form labels.
.form-item .form-label,
.mform .fitem div.fitemtitle,
.userprofile dl.list dt,
.form-horizontal .control-label {
width: $horizontalComponentOffset1200 - 20px;
}
.form-item .form-setting,
.form-item .form-description,
.mform .fitem .felement,
.mform .fdescription.required,
.userprofile dl.list dd,
.form-horizontal .controls {
margin-left: $horizontalComponentOffset1200;
}
.path-admin .buttons,
.form-buttons {
padding-left: $horizontalComponentOffset1200;
}
// Core empty block regions.
@mixin fluid-span($columns) {
@include fluid-span-full($columns, $fluidGridColumnWidth1200, $fluidGridGutterWidth1200);
}
.empty-region-side-post.used-region-side-pre,
.jsenabled.docked-region-side-post.used-region-side-pre { // All post blocks docked and pre region is in use.
#region-main.span8 {
/** increase the span size by 1 **/
@include fluid-span(9);
}
#block-region-side-pre.span4 {
/** decrease the span size by 1 **/
@include fluid-span(3);
}
}
}
@media (min-width: 980px) {
.loginbox.twocolumns .loginpanel {
margin-left: 0;
}
.loginbox.twocolumns .loginpanel,
.loginbox.twocolumns .signuppanel {
width: 48.617948717948715%;
}
}
@media (min-width: 768px) and (max-width: 979px) {
// Core empty block regions.
@mixin fluid-span($columns) {
@include fluid-span-full($columns, $fluidGridColumnWidth768, $fluidGridGutterWidth768);
}
.empty-region-side-post.used-region-side-pre,
.jsenabled.docked-region-side-post.used-region-side-pre { // All post blocks docked and pre region is in use.
#region-main.span8 {
/** increase the span size by 1 **/
@include fluid-span(9);
}
#block-region-side-pre.span4 {
/** decrease the span size by 1 **/
@include fluid-span(3);
}
}
}
@media (max-width: 767px) {
#page-mod-quiz-edit div.quizcontents,
.questionbankwindow.block {
width: 100%;
float: none;
}
#page-mod-quiz-edit #block-region-side-pre,
#page-mod-quiz-edit #block-region-side-post {
clear: both;
}
}
@media (max-width: 480px) {
// make tabs act like nav-stacked
// (mostly) copied from bootstrap/navs.less
.nav-tabs > li {
float: none;
}
.nav-tabs > li > a {
margin-right: 0; // no need for the gap between nav items
}
.nav-tabs {
border-bottom: 0;
}
.nav-tabs > li > a {
border: 1px solid #ddd;
@include border-radius(0);
}
.nav-tabs > .active > a,
.nav-tabs > .active > a:hover {
border: 1px solid #ddd;
}
.nav-tabs > li:first-child > a {
@include border-top-radius(4px);
}
.nav-tabs > li:last-child > a {
@include border-bottom-radius(4px);
}
.nav-tabs > li > a:hover,
.nav-tabs > li > a:focus {
border-color: #ddd;
z-index: 2;
}
.fp-content-center {
display: block;
}
.course-content ul.topics li.section,
.course-content ul.topics li.section .content,
.course-content ul.weeks li.section .content,
.course-content ul.weeks li.section,
.course-content ul.section {
margin-right: 0;
margin-left: 0;
padding: 0;
}
.activityinstance {
display: block;
}
.editing .course-content .section .activity {
margin-bottom: 0.2em;
padding-bottom: 0.2em;
border-bottom: thin solid #eee;
}
.course-content .section .activity .commands {
text-align: right;
}
/** Handles display of the activity chooser on small screens **/
.jsenabled .choosercontainer #chooseform .alloptions {
max-width: 100%;
}
.jsenabled .choosercontainer #chooseform .instruction,
.jsenabled .choosercontainer #chooseform .typesummary {
position: static;
}
.que .info {
float: none;
width: auto;
}
.que .content {
margin: 0;
}
.path-mod-choice .horizontal .choices .option {
display: block;
}
.path-mod-forum .forumsearch #search {
width: 120px;
}
.path-mod-forum .forumheaderlist .picture {
display: none;
}
}
// Stuart's 2,1,3 layout
@media (min-width: 768px) {
.row-fluid .desktop-first-column {
margin-left: 0;
}
#page-navbar .breadcrumb-button {
display: inline;
}
}
@media (max-width: 767px) {
.row-fluid .desktop-first-column {
clear: both;
}
}
// Forms
@media (max-width: 767px) {
// Remove the horizontal form styles
.form-item .form-label,
.mform .fitem div.fitemtitle {
// copied from .control-label {
float: none;
width: auto;
padding-top: 0;
text-align: left;
}
.form-item .form-label label {
display: inline-block;
margin-right: .5em;
}
.form-item .form-setting .form-checkbox {
margin-top: 0;
}
.form-label span.form-shortname {
display: inline-block;
}
.form-item .form-setting,
.mform .fitem .felement,
.path-backup .mform .fitem .felement,
.mform .fdescription.required,
.form-item .form-description {
margin-left: 0;
}
.form-buttons,
#fitem_id_submitbutton,
.fp-content-center form + div,
#fgroup_id_buttonar,
.form-horizontal .form-actions,
.fitem_fsubmit .felement.fsubmit {
padding-left: 10px;
padding-right: 10px;
}
#helppopupbox {
width: auto !important;
left: 0 !important;
}
}
// Shrink calender when short on space in block
@media (min-width: 768px) and (max-width: 979px) {
.block_calendar_month .content,
.block .minicalendar td {
padding-left: 0;
padding-right: 0;
}
}
@media (max-width: 979px) {
.nav-collapse {
height: 0;
.nav > li > a {
color: $grayDark;
}
.nav > li > a:hover,
.nav > li > a:focus,
.dropdown-menu a:hover,
.dropdown-menu a:focus,
.dropdown-submenu a:hover,
.dropdown-submenu a:focus,
.dropdown-submenu a:active,
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a {
background-image: none;
color: $grayDark;
}
}
.nav-collapse.in {
height: auto;
.usermenu .moodle-actionmenu[data-enhanced] {
.toggle-display {
display: none;
}
.menu {
display: block;
li {
margin: 0 0.5em;
}
}
}
}
.path-mod-data .box > table > tbody > tr > td {
display: block;
}
.path-mod-forum .forumheaderlist {
thead .header {
font-weight: normal;
font-size: round($font-size-sm);
}
.discussion {
.author,
.replies,
.lastpost {
font-size: round($font-size-sm);
}
.replies .unread a {
padding: 0;
}
}
}
.navbar {
.nav-collapse.in {
border-top: 1px solid $navbarBorder;
&.pull-left,
&.pull-right {
float: none;
}
> .nav {
margin: 0;
// Add padding to first-level links.
> li > a {
padding-left: 20px;
border-radius: 0;
}
.dropdown-menu {
margin: 0 0 0 15px;
li > a {
border-radius: 0;
}
}
}
.nav,
.nav .dropdown-menu {
.dropdown-submenu {
.dropdown-toggle {
&:after {
display: inline-block;
float: none;
@include caret();
border-top-color: $navbarBorder;
margin-left: 4px;
margin-top: 8px;
}
}
&.open {
> a {
background-color: $navbarBackground;
}
}
// Suppress showing of submenu menu content on hover.
&:hover {
.dropdown-menu {
display: none;
}
&.open {