diff options
author | Jouni Koivuviita <jouni@vaadin.com> | 2014-09-22 13:28:29 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-10-07 05:51:45 +0000 |
commit | eb4a9638c6179cee09303613238c3d8cf35fb332 (patch) | |
tree | 576f40b7307a37f027ec244ae4a7237d2389489c /WebContent/VAADIN/themes/valo/components | |
parent | 8d6f1830a95bbaba50ce409cbd43c6bf56c79e32 (diff) | |
download | vaadin-framework-eb4a9638c6179cee09303613238c3d8cf35fb332.tar.gz vaadin-framework-eb4a9638c6179cee09303613238c3d8cf35fb332.zip |
Add outside-range styles for DateField. (#14711)
Change-Id: I0f85fb72605c5500b0a835ddf715d60bc9c7a524
Diffstat (limited to 'WebContent/VAADIN/themes/valo/components')
-rw-r--r-- | WebContent/VAADIN/themes/valo/components/_datefield.scss | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/WebContent/VAADIN/themes/valo/components/_datefield.scss b/WebContent/VAADIN/themes/valo/components/_datefield.scss index 48977d4d20..71b50b5a77 100644 --- a/WebContent/VAADIN/themes/valo/components/_datefield.scss +++ b/WebContent/VAADIN/themes/valo/components/_datefield.scss @@ -337,7 +337,10 @@ @include valo-datefield-calendarpanel-day-focused-style; } - + .#{$primary-stylename}-day.#{$primary-stylename}-day-outside-range, + .#{$primary-stylename}-day.#{$primary-stylename}-day-outside-range:hover { + @include valo-datefield-calendarpanel-outside-range-style; + } .#{$primary-stylename}-weekdays { height: round($v-unit-size * 0.7); @@ -349,13 +352,12 @@ } } - .#{$primary-stylename}-header { white-space: nowrap; } - td[class$="year"], - td[class$="month"] { + td[class*="year"], + td[class*="month"] { button { @include appearance(none); border: none; @@ -381,10 +383,16 @@ } } - &:hover { - @include opacity(1); - &:before { - color: $v-focus-color; + &:hover:before { + color: $v-focus-color; + } + + &.outside-range { + cursor: default; + @include opacity(.3); + + &:hover:before { + color: mix($v-background-color, valo-font-color($v-background-color)); } } } @@ -500,6 +508,15 @@ background: transparent; } +/** + * Outputs the styles for an individual day element, which are outside available range. + * + * @group datefield + */ +@mixin valo-datefield-calendarpanel-outside-range-style { + color: mix(valo-font-color($v-background-color), $v-background-color); + cursor: not-allowed; +} /** * Outputs the styles for todays day element in a calendar panel. |