diff --git a/src/styles/index.less b/src/styles/index.less index efe2883..c80db0c 100644 --- a/src/styles/index.less +++ b/src/styles/index.less @@ -1,5 +1,6 @@ -@import 'include/antd_theme.less'; -@import 'fonts.less'; +@import './include/antd_theme.less'; +@import './fonts'; +@import './mixins'; body { margin: 0; @@ -43,14 +44,8 @@ body { width: 100%; } -.noselect { - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Old versions of Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; /* Non-prefixed version, currently - supported by Chrome, Edge, Opera and Firefox */ -} - .pointer { cursor: pointer } + +.no-select { + .no-select(); +} diff --git a/src/styles/mixins.less b/src/styles/mixins.less new file mode 100644 index 0000000..94ccc9a --- /dev/null +++ b/src/styles/mixins.less @@ -0,0 +1,13 @@ +.no-select () { + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Old versions of Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; /* Non-prefixed version, currently + supported by Chrome, Edge, Opera and Firefox */ +} + +.no-events () { + pointer-events: none; +}