Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sceditors toolbarContainer option to make editor textarea more consi... #1542

Merged
merged 1 commit into from Apr 27, 2014
Merged

Use sceditors toolbarContainer option to make editor textarea more consi... #1542

merged 1 commit into from Apr 27, 2014

Conversation

scripple
Copy link
Contributor

Editor textarea height is much smaller on mobile because editor_height includes the toolbar which takes more vertical space on a narrow screen. By using the toolbarContainer option of sceditor we can avoid this. Now the text area is much closer to the value set in editor_context['height']. The various margins, padding, and the grip size are still subtracted but at least those are consistent at different screen widths.

Signed-off-by: scripple github@scripple.org

…nsistent on different screeens. Editor height will no longer contain the toolbar.

Signed-off-by: scripple <github@scripple.org>
@emanuele45
Copy link
Contributor

Yup, I think it makes sense. nods
I tried these changes to the css:

diff --git a/themes/default/css/jquery.sceditor.css b/themes/default/css/jquery.sceditor.css
index f5ec509..d7db3ad 100644
--- a/themes/default/css/jquery.sceditor.css
+++ b/themes/default/css/jquery.sceditor.css
@@ -11,8 +11,16 @@
 .sceditor-container {
        position: relative;
        border: 1px solid #bbb;
+       border-top: 0;
        background: #fff;
-       border-radius: 4px;
+       border-radius: 0 0 4px 4px;
+}
+#editor_toolbar_container {
+       border: 1px solid #BBBBBB;
+       border-top-right-radius: 4px;
+       border-top-left-radius: 4px;
+       border-bottom: 0;
+       width: 100%
 }
 .sceditor-container.resizing {
        overflow: hidden;

In order to bring back the current look.
What do you think?
I'm not 100% sure that jquery.sceditor.css is the best place to apply them, but since also @Spuds already changed it, it should be fine. 😜

Of course feel free to apply the changes if you like them. ;D

@emanuele45 emanuele45 added this to the 1.0 Final milestone Apr 24, 2014
Spuds added a commit that referenced this pull request Apr 27, 2014
Use sceditors toolbarContainer option to make editor textarea more consi...
@Spuds Spuds merged commit d9f2dbe into elkarte:master Apr 27, 2014
@Spuds
Copy link
Contributor

Spuds commented Apr 27, 2014

@emanuele45 I've added the above css to a PR that I have in progress, looks good to me :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants