Skip to content

Instantly share code, notes, and snippets.

@ninapavlich
Created February 22, 2018 21:32
Show Gist options
  • Save ninapavlich/6e8389e139354de8d586e4eb7daa7d01 to your computer and use it in GitHub Desktop.
Save ninapavlich/6e8389e139354de8d586e4eb7daa7d01 to your computer and use it in GitHub Desktop.
CSS Shim for Django Ace fullscreen mode when used with Grappelli
/*
USAGE:
Fullscreen mode for Django Ace doesn't work correctly because the CSS isn't quite compatible with Django Grappelli's.
To work around it, place this file in a static directory and include in admin like so:
@admin.register(MyModel)
class MyModelAdmin(admin.ModelAdmin):
class Media:
css = {
'all': ('admin/django_ace_grappelli.css',)
}
*/
.django-ace-editor-fullscreen {
position: fixed !important;
width: 100vw;
height: 100vh;
z-index: 100000;
}
.django-ace-editor-fullscreen .django-ace-toolbar{
width:100% !important;
}
.django-ace-editor-fullscreen .django-ace-widget{
width:100% !important;
height: calc( 100% - 27px ) !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment