Skip to content

Instantly share code, notes, and snippets.

@dcposch
Created June 13, 2016 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcposch/37c5792c9eea31a6374007ff7ad39d32 to your computer and use it in GitHub Desktop.
Save dcposch/37c5792c9eea31a6374007ff7ad39d32 to your computer and use it in GitHub Desktop.
@keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.app {
/* Disable text selection, or your app will feel like a web page */
-webkit-user-select: none;
-webkit-app-region: drag;
/* Cover the whole window */
height: 100%;
/* Make sure this matches the native window background color that you pass to
* electron.BrowserWindow({...}), otherwise your app startup will look janky. */
background: rgb(40, 40, 40);
/* Smoother startup */
animation: fadein 0.5s;
}
@bakkiraju
Copy link

How exactly should i use electron-app.css ?

I have prefsWindow = new BrowserWindow() in my app.js which renders prefs.html and uses prefs.js

How can I cause prefsWindow to fade in and fade out on keybinding (I am using globalShortcut 'Esc' for this and doing prefsWindow.show() and prefsWindow.hide(), but want to see fde in fade out)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment