Aleksander Nowodzinski преди 8 години
родител
ревизия
7d0ffdd544

+ 1 - 1
packages/ckeditor5-ui/src/tooltip/tooltipview.js

@@ -9,7 +9,7 @@
 
 import View from '../view';
 
-import '../../theme/components/tooltip.css';
+import '../../theme/components/tooltip/tooltip.css';
 
 /**
  * The tooltip view class.

+ 3 - 1
packages/ckeditor5-ui/src/view.js

@@ -16,7 +16,9 @@ import Collection from '@ckeditor/ckeditor5-utils/src/collection';
 import mix from '@ckeditor/ckeditor5-utils/src/mix';
 import isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';
 
-import '../theme/reset.css';
+import '../theme/globals/_reset.css';
+import '../theme/globals/_hidden.css';
+import '../theme/globals/_zindex.css';
 
 /**
  * The basic view class, which represents an HTML element created out of a

+ 2 - 2
packages/ckeditor5-ui/theme/components/button.css

@@ -3,8 +3,8 @@
  * For licensing, see LICENSE.md.
  */
 
-@import "../helpers/states.css";
-@import "./tooltip.css";
+@import "../mixins/_unselectable.css";
+@import "./tooltip/mixins/_tooltip.css";
 
 .ck-button,
 a.ck-button {

+ 0 - 2
packages/ckeditor5-ui/theme/components/dropdown.css

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  */
 
-@import "../helpers/zindex.css";
-
 .ck-dropdown {
 	display: inline-block;
 	position: relative;

+ 1 - 2
packages/ckeditor5-ui/theme/components/list.css

@@ -3,8 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-@import "../helpers/states.css";
-@import "../helpers/zindex.css";
+@import "../mixins/_unselectable.css";
 
 .ck-list {
 	@mixin ck-unselectable;

+ 0 - 2
packages/ckeditor5-ui/theme/components/panel/balloonpanel.css

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  */
 
-@import "../../helpers/zindex.css";
-
 .ck-balloon-panel {
 	display: none;
 	position: absolute;

+ 0 - 2
packages/ckeditor5-ui/theme/components/panel/stickypanel.css

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  */
 
-@import "../../helpers/zindex.css";
-
 .ck-editor {
 	& .ck-sticky-panel {
 		& .ck-sticky-panel__content_sticky {

+ 1 - 1
packages/ckeditor5-ui/theme/components/toolbar/toolbar.css

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-@import "../../helpers/states.css";
+@import "../../mixins/_unselectable.css";
 
 .ck-toolbar {
 	@mixin ck-unselectable;

+ 34 - 0
packages/ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css

@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/**
+ * Enables the tooltip, which is the tooltip is in DOM but
+ * not yet displayed.
+ */
+@define-mixin ck-tooltip_enabled {
+	& .ck-tooltip {
+		display: block;
+	}
+}
+
+/**
+ * Disables the tooltip making it disappear from DOM.
+ */
+@define-mixin ck-tooltip_disabled {
+	& .ck-tooltip {
+		display: none;
+	}
+}
+
+/**
+ * Shows the tooltip, which is already in DOM.
+ * Requires `ck-tooltip_enabled` first.
+ */
+@define-mixin ck-tooltip_visible {
+	& .ck-tooltip {
+		visibility: visible;
+		opacity: 1;
+	}
+}

+ 0 - 32
packages/ckeditor5-ui/theme/components/tooltip.css

@@ -3,38 +3,6 @@
  * For licensing, see LICENSE.md.
  */
 
-@import "../helpers/zindex.css";
-
-/**
- * Enables the tooltip, which is the tooltip is in DOM but
- * not yet displayed.
- */
-@define-mixin ck-tooltip_enabled {
-	& .ck-tooltip {
-		display: block;
-	}
-}
-
-/**
- * Disables the tooltip making it disappear from DOM.
- */
-@define-mixin ck-tooltip_disabled {
-	& .ck-tooltip {
-		display: none;
-	}
-}
-
-/**
- * Shows the tooltip, which is already in DOM.
- * Requires `ck-tooltip_enabled` first.
- */
-@define-mixin ck-tooltip_visible {
-	& .ck-tooltip {
-		visibility: visible;
-		opacity: 1;
-	}
-}
-
 .ck-tooltip,
 .ck-tooltip__text::after {
 	position: absolute;

+ 0 - 9
packages/ckeditor5-ui/theme/helpers/states.css

@@ -4,15 +4,6 @@
  */
 
 /**
- * Makes element unselectable.
- */
-@define-mixin ck-unselectable {
-	-moz-user-select: none;
-	-webkit-user-select: none;
-	-ms-user-select: none;
-}
-
-/**
  * A class which hides an element in DOM.
  */
 .ck-hidden {

packages/ckeditor5-ui/theme/reset.css → packages/ckeditor5-ui/theme/globals/_reset.css


packages/ckeditor5-ui/theme/helpers/zindex.css → packages/ckeditor5-ui/theme/globals/_zindex.css


+ 13 - 0
packages/ckeditor5-ui/theme/mixins/_unselectable.css

@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/**
+ * Makes element unselectable.
+ */
+@define-mixin ck-unselectable {
+	-moz-user-select: none;
+	-webkit-user-select: none;
+	-ms-user-select: none;
+}