From 2304d0348b17e69abf9b65a4133db8832fffd7cb Mon Sep 17 00:00:00 2001 From: Thomas Berger Date: Mon, 21 Mar 2016 15:35:03 +0100 Subject: [PATCH 1/3] theme updated to work with slider changes --- less/src/slider.less | 91 ++++++++++++++++++++++++++------------------ 1 file changed, 55 insertions(+), 36 deletions(-) diff --git a/less/src/slider.less b/less/src/slider.less index 616292e6..195c04c8 100644 --- a/less/src/slider.less +++ b/less/src/slider.less @@ -1,54 +1,73 @@ .slider-component { - .slider-scaler { - background-color: lighten(@item-body-text-color, 20%); - } - - .slider-sliderange { - background-color: lighten(@item-body-text-color, 20%); - box-shadow: none; - } + .slider-scaler-wrapper { - .slider-handle { - background-color: @item-text-color; - color: @item-color; - .no-touch & { - &:hover { - background-color:@item-color-hover; - } + .slider-scaler { + background-color: @item-body-text-color; } } + .slider-model-answer, .slider-scale-marker { - box-shadow: none; + color: @item-text-color; + background-color: @item-color; } .slider-line { - background-color: lighten(@item-body-text-color, 20%); - height: 7px; - top: 0px; + background-color: @item-body-text-color; } +} - .slider-outer-bar { - background-color: none; - border: none; - border-top: none; - border-bottom: none; - border-radius: none; - box-shadow: none; - } +// reset rangeslider styes +.slider-widget { + .slider-holder { + .rangeslider__handle { + background-color: @item-color; + &:hover { + .no-touch & { + background-color: @item-color-hover; + } + } + } + .rangeslider__fill { + background-color: @item-color; + } + .rangeslider { + background-color: @background-color; + } - .slider-model-answer { - box-shadow: none; + input[type="range"]:focus + .rangeslider .rangeslider__handle { + outline: @focus-outline; + } } +} - .slider-correct-icon { - color: @validation-success; - display: none; - } +.slider-widget.show-user-answer.correct { + .slider-scale-marker, + .rangeslider__fill { + background-color: @validation-success; + } +} +.slider-widget.show-user-answer.incorrect { + .slider-scale-marker, + .rangeslider__fill { + background-color: @validation-error; + } +} + +.slider-widget.show-correct-answer { + .slider-scale-marker, + .slider-model-answer, + .rangeslider__fill { + background-color: @validation-success; + } +} - .slider-incorrect-icon { - color: @validation-error; - display: none; +// assessment adds no-marking class to article to hide marking icons +.no-marking { + .component-inner .component-widget.disabled.submitted.complete .rangeslider__fill, + .component-inner .component-widget.disabled.submitted.complete .slider-scale-marker { + color: @item-text-disabled-color; + background-color: @item-disabled-color; } } From 3a9bcdb1f169423abe123ed2126c4e08177a9d71 Mon Sep 17 00:00:00 2001 From: Thomas Berger Date: Tue, 24 May 2016 13:16:29 +0200 Subject: [PATCH 2/3] show outline only whe accessibility is enabled --- less/src/slider.less | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/less/src/slider.less b/less/src/slider.less index 195c04c8..a0cbc8cd 100644 --- a/less/src/slider.less +++ b/less/src/slider.less @@ -37,7 +37,9 @@ } input[type="range"]:focus + .rangeslider .rangeslider__handle { - outline: @focus-outline; + .accessibility & { + outline: @focus-outline; + } } } } From 4240772d6772983d1a937983286b4b438e8025c1 Mon Sep 17 00:00:00 2001 From: Thomas Berger Date: Wed, 25 May 2016 09:39:57 +0200 Subject: [PATCH 3/3] version bump --- bower.json | 2 +- less/src/slider.less | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/bower.json b/bower.json index f026c9fc..4b885e26 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-vanilla", - "version": "2.0.1", + "version": "2.0.2", "framework": "^2.0.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-vanilla", "issues": "https://adaptlearning.atlassian.net/secure/CreateIssueDetails!init.jspa?pid=10100&issuetype=1&priority=6&components=10516", diff --git a/less/src/slider.less b/less/src/slider.less index a0cbc8cd..e63a13be 100644 --- a/less/src/slider.less +++ b/less/src/slider.less @@ -18,7 +18,6 @@ } } -// reset rangeslider styes .slider-widget { .slider-holder { .rangeslider__handle {