我已经将Zurb Foundation sass安装到了一个表达引擎项目中,但是在保存app.scss文件时我得到了这个:
Compass无法编译项目中的一个或多个文件:
您必须从项目目录编译单个样式表.
我的所有路径都是正确的,因为它们与另一个工作正常的项目相同.
知道是什么触发了这个错误,所以我可以追查这个问题吗?
我想通过php查看页面是否是Magento中的cms_page.我需要针对cms页面的不同面包屑,所以我试着用条件,但我不知道如何或在哪里看.到目前为止,我的breadcrumbs.phtml.
<?php if(this is a cms page): ?>
<p>some content</p>
<?php else: ?>
<?php if($crumbs && is_array($crumbs)): ?>
<div class="breadcrumbs">
<ul>
<?php $charsges = 0; ?>
<?php foreach($crumbs as $_crumbName=>$_crumbInfo): ?>
<?php
$charsges = strlen($_crumbInfo['label']) + $charsges;
if($charsges > 40){
$chars = 18;
if(strlen($_crumbInfo['label']) > $chars){
$_crumbInfo['label'] = substr($_crumbInfo['label'], 0, $chars);
$_crumbInfo['label'] = $_crumbInfo['label'].'..';
}
}
?>
<li class="<?php echo $_crumbName ?>">
<?php if($_crumbInfo['link']): ?>
<a href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this->htmlEscape($_crumbInfo['title']) ?>"><?php echo $this->htmlEscape($_crumbInfo['label']) ?></a>
<?php elseif($_crumbInfo['last']): ?> …Run Code Online (Sandbox Code Playgroud) 我想使用css 将样式应用于所有类<p>和<input>元素numeric.
是否有可能巩固这一点,以便我只写一次"数字"?
p.numeric,input.numeric {
float: right;
}
Run Code Online (Sandbox Code Playgroud)
我也在使用sass,所以如果在CSS中不可能,那么可以添加sass吗?
我正在使用Sass 3.1.10和Compass 0.11.5.由于某些结构原因,我需要将我的指南针项目编译到许多不同的位置(css_dir).目前,我手动编译每个路径的所有文件.有没有办法同时编译到许多位置?
我的config.rb看起来像这样:
http_path = "/"
css_dir = "skin/main/css"
#css_dir = "uc/main/css"
#css_dir = "skin/abstract/css"
#css_dir = "skin/ksv/css"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"
output_style = :compressed
preferred_syntax = :sass
Run Code Online (Sandbox Code Playgroud) 当我刚刚运行middleman服务时,all.css编译得很好,只需要调用+box-shadow(none):
/* line 1, /home/yang/asdf/source/stylesheets/content.css.sass */
div {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none; }
Run Code Online (Sandbox Code Playgroud)
但是当我构建网站时,我得到了这个Sass/Compass错误:
$ middleman build
Slim::EmbeddedEngine is deprecated, it is called Slim::Embedded in Slim 2.0
Slim::EmbeddedEngine is deprecated, it is called Slim::Embedded in Slim 2.0
Slim::EmbeddedEngine is deprecated, it is called Slim::Embedded in Slim 2.0
/home/yang/asdf/source/stylesheets/content.css.sass:2:in `box-shadow': Undefined mixin 'box-shadow'. (Sass::SyntaxError)
(in /home/yang/asdf/source/stylesheets/content.css.sass:2)
from /home/yang/asdf/source/stylesheets/content.css.sass:2
from /var/lib/gems/1.9.1/gems/sass-3.2.7/lib/sass/tree/visitors/perform.rb:253:in `visit_mixin'
from /var/lib/gems/1.9.1/gems/sass-3.2.7/lib/sass/tree/visitors/base.rb:37:in `visit'
from /var/lib/gems/1.9.1/gems/sass-3.2.7/lib/sass/tree/visitors/perform.rb:100:in `visit'
from /var/lib/gems/1.9.1/gems/sass-3.2.7/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
from …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用指南针动画,但它似乎不起作用.
以下是我的文件设置方式:
Config.rb
# Require any additional compass plugins here.
require 'animation'
Run Code Online (Sandbox Code Playgroud)
Screen.scss
@import "compass";
@import "compass/reset";
@import "animation";
@import "animation/animate";
@import "animation/animate/classes";
.widget:hover {
@include animation(flipOutY);
background:pink;
}
body {
background:red;
}
Run Code Online (Sandbox Code Playgroud)
的index.html
<a href="#" class="widget">Click Me</a>
Run Code Online (Sandbox Code Playgroud)
这是我的CSS的输出:
@-moz-keyframes flipOutY {
/* line 79, ../../../../../../../../Library/Ruby/Gems/1.8/gems/animation-0.1.alpha.3/stylesheets/animation/animate/_flippers.scss */
0% {
-moz-transform: perspective(400px) rotateY(0deg);
transform: perspective(400px) rotateY(0deg);
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
opacity: 1; }
/* line 83, ../../../../../../../../Library/Ruby/Gems/1.8/gems/animation-0.1.alpha.3/stylesheets/animation/animate/_flippers.scss */
100% {
-moz-transform: perspective(400px) rotateY(90deg);
transform: perspective(400px) rotateY(90deg);
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0; } …Run Code Online (Sandbox Code Playgroud) 我有一个可以多次包含相同值的数组.我想要找到的是比较该数组内的值并仅输出每个值一次的方法.
$_just_a_tier = array();
foreach ($_associatedProducts as $_item){
// count all products
$_tierprice = $this->getTierPrices($_item);
foreach ($_tierprice as $_ay){
$_tier = $_ay['price_qty'];
// echo $_tier.' | ';
$_just_a_tier[] = $_tier;
}
}
print_r($_just_a_tier);
Run Code Online (Sandbox Code Playgroud)
这将输出例如:
Array
(
[0] => 36
[1] => 50
[2] => 72
[3] => 108
[4] => 110
[5] => 120
[6] => 144
[7] => 180
[8] => 360
[9] => 540
[10] => 960
[11] => 20
[12] => 30
[13] => 36
[14] => …Run Code Online (Sandbox Code Playgroud) 嗨,我有zurb基础,我完全是新手.我使用的是Ubuntu的12.04 PPC(G5)机,我没有从终端的安装,一切正常,但是当我尝试创建使用指南针和Zurb基金会的一个项目,这是什么错误?
LoadError上/usr/lib/ruby/vendor_ruby/sass/../compass/configuration/data.rb的122行:没有这样的文件来加载 - zurb基金会运行与--trace看到完整回溯
我做了须藤gedit中,看看这个文件data.rb存在,并肯定它确实存在......所以自从我上红宝石或罗盘不精明的设计师...什么是错的,剃我的头在耻辱...任何帮助将不胜感激.
顺便说一下,我用Google搜索,什么都没有.