我有一个问题,因为我正在开展一个项目,我的团队正在使用@include breakpoint和@include at-breakpoint。我们正在使用sass,指南针和susy。这两者有什么区别?
答案 0 :(得分:1)
at-breakpoint
是Susy的一部分,用于更改不同断点处的总列数。受初始语法的启发,Mason Wendell为管理所有媒体查询创建了更强大,更通用的Breakpoint Plugin。现在,很多人(包括我)都在同一个项目中使用。他们一起工作很好,但差异可能会令人困惑。
at-breakpoint
设置,请使用$total-columns
。breakpoint
进行更复杂的媒体查询,或者您不想更改列数的任何地方。如果您只想使用其中一个并且更加一致,则可以使用简写重新创建at-breakpoint
的功能:
@include breakpoint($media-query) { // set your media-query
@include layout($columns) { // set your columns
// nested code will use the new column count at the given media-query
}
}
at-breakpoint
只是一个捷径。