[Kimchi-devel] [PATCH] [Wok 1/2] Added compact Sass function that was removed from libsass

sguimaraes943 at gmail.com sguimaraes943 at gmail.com
Tue Apr 12 21:35:11 UTC 2016


From: Samuel Guimarães <sguimaraes943 at gmail.com>

More info: https://github.com/Igosuki/compass-mixins/issues/34

Signed-off-by: Samuel Guimarães <sguimaraes943 at gmail.com>
---
 ui/css/src/modules/_compact.scss | 46 ++++++++++++++++++++++++++++++++++++++++
 ui/css/src/wok.scss              |  2 ++
 2 files changed, 48 insertions(+)
 create mode 100644 ui/css/src/modules/_compact.scss

diff --git a/ui/css/src/modules/_compact.scss b/ui/css/src/modules/_compact.scss
new file mode 100644
index 0000000..dc3fa4c
--- /dev/null
+++ b/ui/css/src/modules/_compact.scss
@@ -0,0 +1,46 @@
+//
+// Project Wok
+//
+// Copyright IBM Corp, 2016
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+// The MIT License (MIT)
+
+// Copyright © 2011 thoughtbot, inc.
+
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// This function adds compact function that was removed from Libsass and python-libsass. It contains original code from Bourbon, https://github.com/thoughtbot/bourbon
+
+ at function compact($var-1, $var-2: false,
+$var-3: false, $var-4: false,
+$var-5: false, $var-6: false,
+$var-7: false, $var-8: false,
+$var-9: false, $var-10: false) {
+    $full: $var-1;
+    $vars: $var-2, $var-3, $var-4, $var-5,
+    $var-6, $var-7, $var-8, $var-9, $var-10;
+
+    @each $var in $vars {
+        @if $var {
+            $full: $full, $var;
+        }
+    }
+    @return $full;
+}
\ No newline at end of file
diff --git a/ui/css/src/wok.scss b/ui/css/src/wok.scss
index 17626e4..3e18483 100755
--- a/ui/css/src/wok.scss
+++ b/ui/css/src/wok.scss
@@ -20,6 +20,8 @@
 
 // Core variables
 @import "modules/wok-variables";
+// Core functions
+ at import "modules/compact";
 // Compass Mixins
 @import "vendor/compass-mixins/lib/compass";
 
-- 
1.9.3




More information about the Kimchi-devel mailing list