Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
feat(slider): make discrete track ticks themable
Browse files Browse the repository at this point in the history
Closes #621.
  • Loading branch information
ajoslin committed Jan 6, 2015
1 parent 9a12239 commit 91bc598
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/components/slider/slider-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ md-slider.md-THEME_NAME-theme {
.md-track {
background-color: '{{foreground-3}}';
}
.md-track-ticks {
background-color: '{{foreground-4}}';
}
.md-focus-thumb {
background-color: '{{foreground-2}}';
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/slider/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,10 @@ function SliderController($scope, $element, $attrs, $$rAF, $window, $mdAria, $md

var numSteps = Math.floor( (max - min) / step );
if (!tickCanvas) {
var trackTicksStyle = $window.getComputedStyle(tickContainer[0]);
tickCanvas = angular.element('<canvas style="position:absolute;">');
tickCtx = tickCanvas[0].getContext('2d');
tickCtx.fillStyle = 'black';
tickCtx.fillStyle = trackTicksStyle.backgroundColor || 'black';
tickContainer.append(tickCanvas);
}
var dimensions = getSliderDimensions();
Expand Down

0 comments on commit 91bc598

Please sign in to comment.