diff options
author | Jouni Koivuviita <jouni@vaadin.com> | 2014-08-19 20:07:04 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2014-08-20 14:20:33 +0000 |
commit | 961782b78e5f0379a535ecdaa39d7c1939648afb (patch) | |
tree | 286d6d9be2f8f9613dbbbb2dea221d24b35c8c0d /WebContent/VAADIN/themes/valo/shared | |
parent | 1856423be3ad100679b9ac38656dd610c0061a76 (diff) | |
download | vaadin-framework-961782b78e5f0379a535ecdaa39d7c1939648afb.tar.gz vaadin-framework-961782b78e5f0379a535ecdaa39d7c1939648afb.zip |
Prevent user text selection by default (Valo)
Re-enable for labels, captions, tables and text inputs.
Removed all unnecessary user-select: none; declarations since the top
level declaration will affect the whole dom tree.
Change-Id: I2e74b749340c8649d3b0778d62acafecf878685d
Diffstat (limited to 'WebContent/VAADIN/themes/valo/shared')
-rw-r--r-- | WebContent/VAADIN/themes/valo/shared/_global.scss | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/WebContent/VAADIN/themes/valo/shared/_global.scss b/WebContent/VAADIN/themes/valo/shared/_global.scss index 7b7e63489a..5c010c128d 100644 --- a/WebContent/VAADIN/themes/valo/shared/_global.scss +++ b/WebContent/VAADIN/themes/valo/shared/_global.scss @@ -35,6 +35,24 @@ $valo-global-included: false !default; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + + // Disable text selection by default + @include user-select(none); + + // Enable text selection for certain elements + input[type="text"], + .v-slot > .v-caption, + .v-gridlayout-slot > .v-caption, + .v-has-caption > .v-caption, + .v-formlayout-captioncell > .v-caption, + .v-csslayout > .v-caption { + @include user-select(text); + } + + // Removes clear button from input fields introduced by IE10 + input::-ms-clear { + display: none; + } } .v-ui { @@ -56,11 +74,6 @@ $valo-global-included: false !default; height: 0; } - // Removes clear button from input fields introduced by IE10 - input::-ms-clear { - display: none; - } - .v-drag-element { z-index: 60000; // Override any other position properties @@ -105,6 +118,7 @@ $valo-global-included: false !default; .v-icon { cursor: inherit; + @include user-select(none); } .v-icon, |