问题标签 [susy-compass]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
compass-sass - 指南针编译错误(未定义的混合“set-legacy-ie-support”)
在过去的 2 天里,我在编译我的 sass 文件时遇到了这个错误。
Compass 无法编译项目中的一个或多个文件:
我确实安装了以下库
谁能告诉我这个mixin应该在哪里?如果我在 /Library/Ruby 中进行递归搜索,则没有具有该名称的 mixin。我想不通。请问有人吗?
问候诺曼
susy-compass - Susy:不同断点的块顺序不同?
我希望我的网站的标题看起来像这样:
在较小的屏幕上,我希望它像这样适应:
这可以通过 ZenGrids 轻松实现,但我无法为 Susy 提供解决方案。
我怎样才能使用 Susy's 实现这一目标at-breakpoint
?
compass-sass - 将mixin声明中的变量传递到附加的内容块中?
在 Ruby 中,您可以轻松地将方法内部的变量传递到附加的代码块中:
我想在 SASS mixin 中做同样的事情:
此代码不起作用,因为 $i 是在 mixin 声明中声明的,并且无法在使用 mixin 的外部看到。:(
那么......我如何利用在 mixin 声明中声明的变量?
当我使用网格框架和媒体查询时,我非常需要这个功能。目前,我每次需要时都必须复制 mixin 声明中的内容,这违反了 DRY 规则。
更新 2013-01-24
这是一个真实的例子。
我有一个混合断点循环并为每个断点应用一次提供的代码:
当我使用这个 mixin 时,我必须在 @content 中使用这个 $bp 值。它可能是这样的:
但这不起作用,因为 $bp 的值在 @content 中不可用。
在调用 mixin 之前声明变量将无济于事,因为 @content 在 mixin 被解析之前被解析一次。
相反,每次我需要它时,我都必须做两个丑陋的大腿:
- 声明一个临时混合,
- 写循环,违反DRY原则:
所以,问题是:有没有办法做到这种 Ruby 风格?
susy-compass - 使用 Susy 创建一个没有边距的容器(Compass/Sass)
我的 body 元素上有一个 8px 的边距,我不想在那里,因为它使导航看起来有点奇怪。我可以将 margin-top 设置为 0 像素,或者在导航上设置负 8 px 的边距,这样更好,为什么 Susy 在模板中有这个?
css - Susy:基于最大 px 值的流体网格
我正在尝试制作一个流体网格,其最大宽度具有以下值:
http://gridcalculator.dk/#/1224/12/40/56
当浏览器的大小调整到 1264px 以下(允许主体上的 20px 填充)时,所有内容(边距、装订线和列)都应该按比例缩小。这可能吗?
我已经尝试过这些方法:
第一次尝试:
这不起作用,因为填充固定在 56px 并且不会缩小。
第二次尝试:
这几乎可以工作,但由于某种原因,网格填充大于列宽......
我错过了什么?谢谢!
css - SCSS 和 Susy:使盒子延伸到网格排水沟中
我用优秀的 Susy做了一个网格。
我想在我的网格中添加一个框内容。当我这样做时,一切都会变得局促,因为框与内容对齐到网格的同一边缘。
我可以向盒子添加填充,然后应用 box-sizing:border-box。这消除了“抽筋”,但也导致内容不再与网格对齐。
我真正想做的是保持内容与网格对齐并将框延伸到排水沟中。有没有办法用 Susy 做到这一点?
我附上了一张图表来说明我的意思:
css - 如何使用 Susy 将两个网格项目放在一起?
我有一个用Susy创建的 CSS 网格,有两个边和一个内容部分,如下所示:
push()
源顺序是 content-1-2,但上面使用and很容易pull()
。
在较窄的屏幕上,我希望边线彼此上方,如下所示:
我可以将它们拉到同一列,但它们只会重叠。我怎样才能使这项工作?
ruby-on-rails - Sass, Compass and Susy in a Rails 3.2 app
Starting a redesign of my site which is using Rails 3.2. I was already using Sass and Compass and for the redesign have thrown all the old styles out and want to add Susy into the mix. Just a few quick questions about how things work before I get going:
I have just added: config.compass.preferred_syntax :sass
to my application.rb
file in /config
, is this correct? Is the application.rb
file sort of substituting itself for the normal compass.rb
config file on standard compass projects?
The line I added obviously changes the expected syntax to the sass indented one which I much prefer but it looks like that line is telling compass what syntax I like. Is compass now doing the compiling of the css and not sass? I also read in the sass docs that you can tell it what syntax you prefer, do I need to set them both? I'm just not sure what is doing what function!
I have also added gem "susy"
into my Gemfile
, do I need to add config.compass.require "susy"
to /config/application.rb
?
Also, If I want to set the fonts_dir, Compass docs state that by default for Rails apps it will default to public/fonts
but I want to put them in /app/assets/fonts
. Will that work?
From Compass docs:
String The directory where the font files are kept. Standalone projects will default to /fonts. Rails projects will default to "public/fonts".
I hope people will be able to shed some light on these issues for me.