From: Jason Woofenden Date: Tue, 23 Jun 2015 20:01:45 +0000 (-0400) Subject: stylus helper for ckeditor sizing X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl-cms.git;a=commitdiff_plain;h=0a5d51b1488c91a5b6387d440ab16c04ef10bac8 stylus helper for ckeditor sizing --- diff --git a/styl.styl b/styl.styl index f5e96ba..aa50a22 100644 --- a/styl.styl +++ b/styl.styl @@ -133,16 +133,31 @@ body color: content_fg font: font_size_normal Arimo, Arial, sans-serif -// expand the ckeditor widget so there's space for the content to be exactly -// the size of the content outside the editor -.cke - margin-right: -15px - margin-left: -15px -// tag within ckeditor -#admin_pages_wysiwyg_content - background: content_bg - width: content_width - margin: 0 auto +// call this for each ckeditor on each page +ckeditor(basename, element_name, width) + // ckeditor ui, including border around wysiwyg area + #{basename}_body #cke_{element_name} + margin-left: -15px + if width < 650px + width: 680px + else + width: width + 30px + // body tag of the wysiwyg area + #{basename}_wysiwyg_{element_name} + background: content_bg + width: width + margin: 0 auto + if width <= 600px + min-width: 0 + width: width + margin: 0 auto + border-right: 20px solid #eee + border-left: 20px solid #eee + border-top: 1px solid #eee + border-bottom: 1px solid #eee + min-height: 250px + +ckeditor('admin_pages', 'content', content_width) // outermost div for centering, shadow, etc #centerer