From dfa654812e91aa0b4d6d0c4f51de7ef120702f09 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 30 Nov 2017 02:17:19 +0400 Subject: [PATCH] use user-select mixin everywhere --- plugins/c9.ide.ace.statusbar/skin.xml | 4 +- .../c9.ide.collab/timeslider/timeslider.css | 8 +-- plugins/c9.ide.find.replace/skin.xml | 4 +- plugins/c9.ide.language.core/complete.css | 4 +- .../less/browser-btn.less | 6 +-- .../c9.ide.layout.classic/less/button.less | 6 +-- .../less/c9-menu-bar.less | 12 +---- .../less/c9-menu-btn.less | 5 +- .../less/c9-toolbarbutton.less | 6 +-- .../less/editor_tab.less | 6 +-- plugins/c9.ide.layout.classic/less/frame.less | 5 +- .../less/header-btn.less | 6 +-- .../c9.ide.layout.classic/less/lesshat.less | 50 ++----------------- plugins/c9.ide.scm/diff/conflictmarker.css | 6 +-- plugins/c9.ide.test/style.css | 5 +- 15 files changed, 21 insertions(+), 112 deletions(-) diff --git a/plugins/c9.ide.ace.statusbar/skin.xml b/plugins/c9.ide.ace.statusbar/skin.xml index b14ae7f2..5844a32b 100644 --- a/plugins/c9.ide.ace.statusbar/skin.xml +++ b/plugins/c9.ide.ace.statusbar/skin.xml @@ -72,9 +72,7 @@ cursor : pointer; position : relative; cursor : default; - -moz-user-select : none; - -khtml-user-select : none; - user-select : none; + .user-select(none); background-position : 0 0; background-repeat : no-repeat; margin: @ace-status-icon-margin !important; diff --git a/plugins/c9.ide.collab/timeslider/timeslider.css b/plugins/c9.ide.collab/timeslider/timeslider.css index 72d28d26..dfb72eda 100644 --- a/plugins/c9.ide.collab/timeslider/timeslider.css +++ b/plugins/c9.ide.collab/timeslider/timeslider.css @@ -320,9 +320,7 @@ } #ui-slider-handle when(@time-slider-handle-basic = false) { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; + .user-select(none); } #ui-slider-handle span when(@time-slider-handle-basic = false){ @@ -382,9 +380,7 @@ } #ui-slider-bar { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; + .user-select(none); cursor: pointer; height: 35px; margin-left: @time-slider-bar-margin-left; diff --git a/plugins/c9.ide.find.replace/skin.xml b/plugins/c9.ide.find.replace/skin.xml index 24447b5c..186c94ea 100644 --- a/plugins/c9.ide.find.replace/skin.xml +++ b/plugins/c9.ide.find.replace/skin.xml @@ -6,9 +6,7 @@ height : 22px; cursor : pointer; position : absolute; - -moz-user-select : none; - -khtml-user-select : none; - user-select : none; + .user-select(none); width : 20px; } .btnquicksearchnav .lbl{ diff --git a/plugins/c9.ide.language.core/complete.css b/plugins/c9.ide.language.core/complete.css index 344d903b..6a488ad0 100644 --- a/plugins/c9.ide.language.core/complete.css +++ b/plugins/c9.ide.language.core/complete.css @@ -216,7 +216,5 @@ /* allow selecting in doc popup but do not elsewhere */ .panelsbar, .btnsesssioncontainer, .bar-status, .splitgrabber, .code_complete_text, .ace_scrollbar, .ace_tree { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; + .user-select(none); } \ No newline at end of file diff --git a/plugins/c9.ide.layout.classic/less/browser-btn.less b/plugins/c9.ide.layout.classic/less/browser-btn.less index 7493b5cd..3f9c9862 100644 --- a/plugins/c9.ide.layout.classic/less/browser-btn.less +++ b/plugins/c9.ide.layout.classic/less/browser-btn.less @@ -9,11 +9,7 @@ background-position : 0 27px; background-repeat : no-repeat; background-image : url("@{image-path}/browser_button.png"); - -moz-user-select: -moz-none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - user-select: none; + .user-select(none); } .browser-btn span{ diff --git a/plugins/c9.ide.layout.classic/less/button.less b/plugins/c9.ide.layout.classic/less/button.less index 94400c26..8b06a9c1 100644 --- a/plugins/c9.ide.layout.classic/less/button.less +++ b/plugins/c9.ide.layout.classic/less/button.less @@ -5,11 +5,7 @@ cursor : default; position : relative; line-height : 17px; - -moz-user-select: -moz-none; - -khtml-user-select : none; - -webkit-user-select: none; - -o-user-select: none; - user-select : none; + .user-select(none); } .btn.smallbtn { diff --git a/plugins/c9.ide.layout.classic/less/c9-menu-bar.less b/plugins/c9.ide.layout.classic/less/c9-menu-bar.less index 65dce5a5..274a5642 100644 --- a/plugins/c9.ide.layout.classic/less/c9-menu-bar.less +++ b/plugins/c9.ide.layout.classic/less/c9-menu-bar.less @@ -1,13 +1,7 @@ .c9-menu-bar { position : relative; overflow : visible; - -moz-user-select: -moz-none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - user-select: none; - // margin: 0; - // overflow: hidden; + .user-select(none); } .c9-menu-bar:before{ position: absolute; @@ -185,9 +179,7 @@ width: 10px; } .c9-menu-bar .c9-mbar-bcont .c9-activity.saving .light{ - -webkit-animation: saving .4s linear 0 infinite; - -moz-animation: saving .4s linear 0 infinite; - animation: saving .4s linear 0 infinite; + animation: saving .4s linear 0 infinite; background-position: -102px 0px !important; } diff --git a/plugins/c9.ide.layout.classic/less/c9-menu-btn.less b/plugins/c9.ide.layout.classic/less/c9-menu-btn.less index 598715e1..c8ec388d 100644 --- a/plugins/c9.ide.layout.classic/less/c9-menu-btn.less +++ b/plugins/c9.ide.layout.classic/less/c9-menu-btn.less @@ -14,10 +14,7 @@ text-shadow : @menu-button-text-shadow; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + .user-select(none); } .c9-menu-btnOver { diff --git a/plugins/c9.ide.layout.classic/less/c9-toolbarbutton.less b/plugins/c9.ide.layout.classic/less/c9-toolbarbutton.less index 8139bd77..f689f17b 100644 --- a/plugins/c9.ide.layout.classic/less/c9-toolbarbutton.less +++ b/plugins/c9.ide.layout.classic/less/c9-toolbarbutton.less @@ -6,11 +6,7 @@ position : relative; line-height : 17px; border:1px solid transparent; - -moz-user-select: -moz-none; - -khtml-user-select : none; - -webkit-user-select: none; - -o-user-select: none; - user-select : none; + .user-select(none); } .with-arrow.c9-toolbarbutton { diff --git a/plugins/c9.ide.layout.classic/less/editor_tab.less b/plugins/c9.ide.layout.classic/less/editor_tab.less index a698d4ff..35b2f377 100644 --- a/plugins/c9.ide.layout.classic/less/editor_tab.less +++ b/plugins/c9.ide.layout.classic/less/editor_tab.less @@ -249,11 +249,7 @@ body>.session_btn.curbtn{ white-space : nowrap; overflow : hidden; padding : @pane-button-title-padding; - -moz-user-select: -moz-none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - user-select: none; + .user-select(none); color : @pane-button-color; text-shadow : @pane-button-textshadow; // position: relative; diff --git a/plugins/c9.ide.layout.classic/less/frame.less b/plugins/c9.ide.layout.classic/less/frame.less index 626d52c9..60e469a0 100644 --- a/plugins/c9.ide.layout.classic/less/frame.less +++ b/plugins/c9.ide.layout.classic/less/frame.less @@ -23,10 +23,7 @@ color: @frame-title-color; background-color: @frame-title-background; background-image: linear-gradient(90deg, @frame-title-gradient-start 0%, @frame-title-gradient-stop 100%); - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + .user-select(none); } .frame>.title:hover{ background-image: linear-gradient(90deg, @frame-title-gradient-hover-start 0%, @frame-title-gradient-hover-stop 100%); diff --git a/plugins/c9.ide.layout.classic/less/header-btn.less b/plugins/c9.ide.layout.classic/less/header-btn.less index e322177b..ec7335e5 100644 --- a/plugins/c9.ide.layout.classic/less/header-btn.less +++ b/plugins/c9.ide.layout.classic/less/header-btn.less @@ -60,10 +60,6 @@ position: absolute; top: 0; width: 2px; - -moz-user-select: -moz-none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - user-select: none; + .user-select(none); } \ No newline at end of file diff --git a/plugins/c9.ide.layout.classic/less/lesshat.less b/plugins/c9.ide.layout.classic/less/lesshat.less index 92e020f6..c1af945f 100755 --- a/plugins/c9.ide.layout.classic/less/lesshat.less +++ b/plugins/c9.ide.layout.classic/less/lesshat.less @@ -5,29 +5,6 @@ // Petr Brzek & Jan Kuca -// @GlobalConfig - -// @GlobalConfig - - // Config supported browsers for your project - - @w3c: true; // Unprefixed W3C syntax - @webkit: true; // Chrome 7+, Safari 5+, iOS5, Android - @moz: true; // Firefox 4+ - @opera: true; // Opera 10.5+ - @ms: true; // IE 10+ - - // Signals - - @webkitSignal: 1; - @mozSignal: 2; - @operaSignal: 3; - @msSignal: 4; - @w3cSignal: 5; - - - - // .size .size(@square){ @@ -48,27 +25,10 @@ // .user-select .user-select(@arguments:auto){ - - // Local config for disabling properties - - @webkitLocal: true; // Chrome 7+, Safari 5+, iOS5, Android - @mozLocal: true; // Firefox 4+ - @msLocal: true; // IE 10+ - - .result (@arguments, @signal, @boolean, @localBoolean) when (@boolean = true) and (@localBoolean = true) { - .inception (@signal, @arguments) when (@signal = 1) { -webkit-user-select: @arguments; } - .inception (@signal, @arguments) when (@signal = 2) { -moz-user-select: @arguments; } - .inception (@signal, @arguments) when (@signal = 4) { -ms-user-select: @arguments; } - .inception (@signal, @arguments) when (@signal > 5),(@signal < 1) { error: "Signal is out of range"; } - .inception(@signal, @arguments); - } - .result (@arguments, @signal, @boolean, @localBoolean) when not (@boolean = true), not (@localBoolean = true) { } - - .result(@arguments, @webkitSignal, @webkit, @webkitLocal); - // -- this comment must be here because of LESS bug - .result(@arguments, @mozSignal, @moz, @mozLocal); - // -- - .result(@arguments, @msSignal, @ms, @msLocal); + -webkit-user-select: @arguments; + -moz-user-select: @arguments; + -ms-user-select: @arguments; + user-select: @arguments; } // element{ .user-select(text); } @@ -93,7 +53,7 @@ background-image: ~`(function(){ return "url(@{filename}.@{extension})" + ("@{important}" == "true" ? ' !important' : '');})()`; background-repeat: @repeat; - @media print, (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 1.25dppx) { + @media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 1.25dppx) { background-image: ~`(function(){ return "url(@{filename}@2x.@{extension})" + ("@{important}" == "true" ? ' !important' : '');})()`; background-size: ~`(function(){ return "@{width} @{height}" + ("@{important}" == "true" ? ' !important' : '');})()`; } diff --git a/plugins/c9.ide.scm/diff/conflictmarker.css b/plugins/c9.ide.scm/diff/conflictmarker.css index 609fbb38..639e1a0e 100644 --- a/plugins/c9.ide.scm/diff/conflictmarker.css +++ b/plugins/c9.ide.scm/diff/conflictmarker.css @@ -57,11 +57,7 @@ .ace_button { margin-left: 2px; cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -o-user-select: none; - -ms-user-select: none; - user-select: none; + .user-select(none); overflow: hidden; border: 1px solid rgba(100,100,100,0.23); padding: 2px 4px; diff --git a/plugins/c9.ide.test/style.css b/plugins/c9.ide.test/style.css index 8875d611..905a0e10 100644 --- a/plugins/c9.ide.test/style.css +++ b/plugins/c9.ide.test/style.css @@ -22,10 +22,7 @@ color: #795A0A; margin: 0 5px; pointer-events:auto; - -webkit-user-select: text; - -moz-user-select: text; - -ms-user-select: text; - user-select: text; + .user-select(text); } .stack-message.more{ cursor:pointer;