Skip to content

Commit

Permalink
Merge branch 't/13119' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Jun 1, 2015
2 parents cb5fd3a + 14b7f0f commit 2e0eee9
Show file tree
Hide file tree
Showing 18 changed files with 144 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -32,6 +32,7 @@ Fixed Issues:

Other Changes:

* [#13119](http://dev.ckeditor.com/ticket/13119): Improved compatibility of editor skins ([Moono](http://ckeditor.com/addon/moono) and [Kama](http://ckeditor.com/addon/kama)) with external web page style sheets.
* Toolbar configurators:
* [#13147](http://dev.ckeditor.com/ticket/13147): Add buttons to the sticky toolbar.
* [#13207](http://dev.ckeditor.com/ticket/13207): Use modal window to display help in toolbar configurator.
Expand Down
2 changes: 1 addition & 1 deletion skins/kama/dialog.css
Expand Up @@ -250,7 +250,7 @@ a.cke_dialog_tab_disabled

/* The close button at the top of the dialog. */

.cke_dialog_close_button
a.cke_dialog_close_button
{
background-image: url(images/sprites.png);
background-repeat: no-repeat;
Expand Down
4 changes: 2 additions & 2 deletions skins/kama/elementspath.css
Expand Up @@ -27,10 +27,10 @@ The following is a visual representation of its main elements:
}

/* Each item of the elements path. */
.cke_path_item,
a.cke_path_item,
/* Empty element available at the end of the elements path, to help us keeping
the proper box size when the elements path is empty. */
.cke_path_empty
span.cke_path_empty
{
display: inline-block;
float: left;
Expand Down
6 changes: 5 additions & 1 deletion skins/kama/presets.css
Expand Up @@ -23,12 +23,16 @@ For licensing, see LICENSE.md or http://ckeditor.com/license
}

/* Editable regions */
.cke_source
textarea.cke_source
{
font-family: 'Courier New', Monospace;
font-size: small;
background-color: #fff;
white-space: pre-wrap;
border: none;
padding: 0;
margin: 0;
display: block;
}

.cke_wysiwyg_frame, .cke_wysiwyg_div
Expand Down
4 changes: 3 additions & 1 deletion skins/kama/reset.css
Expand Up @@ -46,7 +46,8 @@ http://docs.cksource.com/CKEditor_4.x/Skin_SDK/Reset
}

/* Reset for elements and their children. */
.cke_reset_all, .cke_reset_all *
.cke_reset_all, .cke_reset_all *,
.cke_reset_all a, .cke_reset_all textarea
{
/* The following must be identical to .cke_reset. */
margin: 0;
Expand All @@ -73,6 +74,7 @@ http://docs.cksource.com/CKEditor_4.x/Skin_SDK/Reset
text-align: left;
white-space: nowrap;
cursor: auto;
float: none;
}

.cke_reset_all .cke_rtl *
Expand Down
2 changes: 1 addition & 1 deletion skins/kama/richcombo.css
Expand Up @@ -57,7 +57,7 @@ The visual representation of a rich combo widget looks as follows:
}

/* The container for combo text and arrow. */
.cke_combo_button
a.cke_combo_button
{
display: inline-block;
-moz-border-radius: 5px;
Expand Down
8 changes: 4 additions & 4 deletions skins/kama/toolbar.css
Expand Up @@ -135,7 +135,7 @@ a.cke_button
/* This class is applied to the button when it is "active" (pushed).
This style indicates that the feature associated with the button is active
i.e. currently writing in bold or when spell checking is enabled. */
.cke_button_on
a.cke_button_on
{
background-color: #a3d7ff;
}
Expand All @@ -150,7 +150,7 @@ a.cke_button

/* This class is applied to the button when the feature associated with the
button is available but currently not active.*/
.cke_button_off
a.cke_button_off
{
opacity: 0.7;
}
Expand All @@ -159,7 +159,7 @@ a.cke_button
button cannot be used (grayed-out).
i.e. paste button remains disabled when there is nothing in the clipboard to
be pasted. */
.cke_button_disabled
a.cke_button_disabled
{
opacity: 0.3;
}
Expand Down Expand Up @@ -309,7 +309,7 @@ a.cke_button_off:active
}

/* The button, which when clicked hides (collapses) all the toolbars. */
.cke_toolbox_collapser
a.cke_toolbox_collapser
{
width: 12px;
height: 11px;
Expand Down
4 changes: 2 additions & 2 deletions skins/moono/dialog.css
Expand Up @@ -317,7 +317,7 @@ a.cke_dialog_tab_disabled

/* The close button at the top of the dialog. */

.cke_dialog_close_button
a.cke_dialog_close_button
{
background-image: url(images/close.png);
background-repeat: no-repeat;
Expand All @@ -327,7 +327,7 @@ a.cke_dialog_tab_disabled
text-align: center;
height: 20px;
width: 20px;
top: 5px;
top: 4px;
z-index: 5;
opacity: 0.8;
filter: alpha(opacity = 80);
Expand Down
4 changes: 2 additions & 2 deletions skins/moono/elementspath.css
Expand Up @@ -27,10 +27,10 @@ The following is a visual representation of its main elements:
}

/* Each item of the elements path. */
.cke_path_item,
a.cke_path_item,
/* Empty element available at the end of the elements path, to help us keeping
the proper box size when the elements path is empty. */
.cke_path_empty
span.cke_path_empty
{
display: inline-block;
float: left;
Expand Down
6 changes: 5 additions & 1 deletion skins/moono/presets.css
Expand Up @@ -23,12 +23,16 @@ For licensing, see LICENSE.md or http://ckeditor.com/license
}

/* Editable regions */
.cke_source
textarea.cke_source
{
font-family: 'Courier New', Monospace;
font-size: small;
background-color: #fff;
white-space: pre-wrap;
border: none;
padding: 0;
margin: 0;
display: block;
}

.cke_wysiwyg_frame, .cke_wysiwyg_div
Expand Down
3 changes: 2 additions & 1 deletion skins/moono/reset.css
Expand Up @@ -46,7 +46,8 @@ http://docs.cksource.com/CKEditor_4.x/Skin_SDK/Reset
}

/* Reset for elements and their children. */
.cke_reset_all, .cke_reset_all *
.cke_reset_all, .cke_reset_all *,
.cke_reset_all a, .cke_reset_all textarea
{
/* The following must be identical to .cke_reset. */
margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion skins/moono/richcombo.css
Expand Up @@ -60,7 +60,7 @@ The visual representation of a rich combo widget looks as follows:
}

/* The container for combo text and arrow. */
.cke_combo_button
a.cke_combo_button
{
cursor: default;
display: inline-block;
Expand Down
4 changes: 2 additions & 2 deletions skins/moono/toolbar.css
Expand Up @@ -147,7 +147,7 @@ a.cke_button
/* This class is applied to the button when it is "active" (pushed).
This style indicates that the feature associated with the button is active
i.e. currently writing in bold or when spell checking is enabled. */
.cke_button_on
a.cke_button_on
{
-moz-box-shadow: 0 1px 5px rgba(0,0,0,.6) inset, 0 1px 0 rgba(0,0,0,.2);
-webkit-box-shadow: 0 1px 5px rgba(0,0,0,.6) inset, 0 1px 0 rgba(0,0,0,.2);
Expand Down Expand Up @@ -348,7 +348,7 @@ a.cke_button_disabled:active
}

/* The button, which when clicked hides (collapses) all the toolbars. */
.cke_toolbox_collapser
a.cke_toolbox_collapser
{
width: 12px;
height: 11px;
Expand Down
56 changes: 56 additions & 0 deletions tests/core/skin/manual/_assets/styles.css
@@ -0,0 +1,56 @@
/*
There's only sense testing rules with specificity 11
because CKEditor's reset is not able to override higher ones.
It also only makes sense to test some reasonable selectors.
It is of course possible to do:
.styled * { float: left }
but it's unrealistic and it would be a developer's fault.
Realistic, imprecise styles are based on specific tag names like `a` or `table`.
*/

* {
box-sizing: border-box;
font-family: Courier;
font-size: 20px;
}

input, textarea, a, label {
border: solid 5px blue;
padding: 5px;
text-decoration: underline;
}

table {
table-layout: fixed;
width: 800px;
float: right;
border: solid 2px blue;
}

p, h1 {
color: red;
}

iframe {
width: 500px;
border: solid 2px green;
}

/* Links are pretty often styled with similar styles
and are used by us in many places in the UI. */
.styled a {
text-decoration: underline;
border: solid 2px green;
color: red;
font-size: 15px;
background: blue;
padding: 5px;
}

.styled textarea {
margin: 20px;
padding: 10px;
border: solid 5px red;
width: 200px;
background: red;
}
18 changes: 18 additions & 0 deletions tests/core/skin/manual/reset.html
@@ -0,0 +1,18 @@
<head>
<link rel="stylesheet" href="_assets/styles.css">
</head>

<body class="styled">
<div id="editor">
<p>Foo</p>
<p>Foo</p>
<p>Foo</p>
<p>Foo</p>
</div>

<script>
CKEDITOR.replace( 'editor', {
toolbarCanCollapse: true
} );
</script>
</body>
10 changes: 10 additions & 0 deletions tests/core/skin/manual/reset.md
@@ -0,0 +1,10 @@
@bender-tags: 4.5.0, tc
@bender-ckeditor-plugins: wysiwygarea, sourcearea, toolbar, basicstyles, colorbutton, image, font,about, language, elementspath, resize, justify, undo
@bender-ui: collapsed

Test whether skin of the editor was not affected by page's styling. Check:

* Links in the elements path.
* All dialogs.
* Sourcearea.
* Button states.
19 changes: 19 additions & 0 deletions tests/core/skin/manual/resetkama.html
@@ -0,0 +1,19 @@
<head>
<link rel="stylesheet" href="_assets/styles.css">
</head>

<body class="styled">
<div id="editor">
<p>Foo</p>
<p>Foo</p>
<p>Foo</p>
<p>Foo</p>
</div>

<script>
CKEDITOR.replace( 'editor', {
skin: 'kama',
toolbarCanCollapse: true
} );
</script>
</body>
10 changes: 10 additions & 0 deletions tests/core/skin/manual/resetkama.md
@@ -0,0 +1,10 @@
@bender-tags: 4.5.0, tc
@bender-ckeditor-plugins: wysiwygarea, sourcearea, toolbar, basicstyles, colorbutton, image, font, about, language, elementspath, resize, justify, undo
@bender-ui: collapsed

Test whether skin of the editor was not affected by page's styling. Check:

* Links in the elements path.
* All dialogs.
* Sourcearea.
* Button states.

0 comments on commit 2e0eee9

Please sign in to comment.