├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── index.css ├── index.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | coverage/ 3 | tmp/ 4 | dist/ 5 | npm-debug.log* 6 | .DS_Store 7 | .nyc_output 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | node_js: 2 | - "4" 3 | - "5" 4 | - "6" 5 | - "7" 6 | sudo: false 7 | language: node_js 8 | script: "npm run test" 9 | # after_success: "npm i -g codecov && npm run coverage && codecov" 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Yoshua Wuyts 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # css-electron-reset [![stability][0]][1] 2 | [![npm version][2]][3] [![build status][4]][5] 3 | [![downloads][8]][9] [![js-standard-style][10]][11] 4 | 5 | Reset Electron stylesheets so it behaves like a native application 6 | 7 | ## CSS 8 | ```css 9 | html { 10 | -webkit-user-select: none; 11 | -webkit-user-drag: none; 12 | cursor: default; 13 | } 14 | 15 | input, textarea, select, button, img { 16 | -webkit-user-drag: none; 17 | } 18 | 19 | .draggable { 20 | -webkit-app-region: drag; 21 | } 22 | 23 | .selectable { 24 | -webkit-user-select: auto; 25 | cursor: auto; 26 | } 27 | ``` 28 | 29 | ## License 30 | [MIT](https://tldrlegal.com/license/mit-license) 31 | 32 | [0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square 33 | [1]: https://nodejs.org/api/documentation.html#documentation_stability_index 34 | [2]: https://img.shields.io/npm/v/css-electron-reset.svg?style=flat-square 35 | [3]: https://npmjs.org/package/css-electron-reset 36 | [4]: https://img.shields.io/travis/stackcss/css-electron-reset/master.svg?style=flat-square 37 | [5]: https://travis-ci.org/stackcss/css-electron-reset 38 | [6]: https://img.shields.io/codecov/c/github/stackcss/css-electron-reset/master.svg?style=flat-square 39 | [7]: https://codecov.io/github/stackcss/css-electron-reset 40 | [8]: http://img.shields.io/npm/dm/css-electron-reset.svg?style=flat-square 41 | [9]: https://npmjs.org/package/css-electron-reset 42 | [10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square 43 | [11]: https://github.com/feross/standard 44 | -------------------------------------------------------------------------------- /index.css: -------------------------------------------------------------------------------- 1 | html { 2 | -webkit-user-select: none; 3 | -webkit-user-drag: none; 4 | cursor: default; 5 | } 6 | 7 | input, textarea, select, button, img { 8 | -webkit-user-drag: none; 9 | } 10 | 11 | .draggable { 12 | -webkit-app-region: drag; 13 | } 14 | 15 | .selectable { 16 | -webkit-user-select: auto; 17 | cursor: auto; 18 | } 19 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stackcss/css-electron-reset/696411469f0cf37988c51aa6e53ec53cb829e9ed/index.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "css-electron-reset", 3 | "description": "Reset Electron stylesheets so it behaves like a native application", 4 | "main": "index.css", 5 | "repository": "stackcss/css-electron-reset", 6 | "version": "1.0.0", 7 | "scripts": { 8 | "deps": "dependency-check . && dependency-check . --extra --no-dev", 9 | "start": "node .", 10 | "test": "standard && npm run deps" 11 | }, 12 | "dependencies": {}, 13 | "devDependencies": { 14 | "dependency-check": "^2.9.1", 15 | "standard": "^10.0.2", 16 | "tape": "^4.7.0" 17 | }, 18 | "keywords": [ 19 | "css", 20 | "electron", 21 | "reset" 22 | ], 23 | "license": "MIT" 24 | } 25 | --------------------------------------------------------------------------------