gpt4 book ai didi

css - Susy Grid 系统上 Debug模式和隔离装订线位置的问题

转载 作者:行者123 更新时间:2023-11-28 03:25:12 24 4
gpt4 key购买 nike

我试图查看 Susy 上的 Debug模式以了解网格如何工作并弄清楚我们是否有问题,但是当我将其添加到我的 susy-config 时它没有显示 Debug模式。

我使用的是 2.2.12 版。这是我在 _variables.scss 上的代码:

$susy: (
column-width: 45px,
columns: 12,
container-position: center,
container: auto,
global-box-sizing: border-box,
gutter-position: after,
gutters: 18px / 45px,
math: static,
output: isolate,
debug: (
image: show,
color: rgba($debugg-color, .2),
output: background,
)
);

$susy-desktop: (
column-width: 67px,
columns: 12,
container-position: center,
container: auto,
global-box-sizing: border-box,
gutter-position: after,
gutters: 30px / 67px,
math: static,
output: isolate,
debug: (
image: show,
color: rgba($debugg-color, .2),
output: background,
)
);

Image of the full Grid without the debug mode以及添加了 margin-top: -100% 的按钮,因为我们使用了 output: isolate

我们希望第一个按钮span(2 at 8),第二个按钮span(2 at 10)

网格覆盖是一个 Chrome 插件(不是 Susy Debug模式),如您所见,它不能按需要工作。

我在我们的按钮中使用这个 Sass:

.btn--full {
@include span(2 at 8);
margin-bottom: 28px;

&.btn--ghost-darkgrey {
@include span(2 at 10);
}
}

This is the representation of the buttons without gutter-position: isolate and math: fluid, output: float

所以我们有这个问题:

  • 我们可以看到 Susy 的 Debug模式。
  • 如果我们使用隔离模式,按钮就会损坏

最佳答案

看起来 Debug模式在您的 CodePen 示例中正常工作。我 fork 了,added a sample $desktop breakpoint .

隔离是 John Albin Wilkins 开发的一种技术,使用负右边距 to help avoid sub-pixel rounding errors .隔离从自然流中移除元素,因此如果您在给定上下文中隔离所有元素,效果最好。您可以通过几种方式解决这个问题:隔离所有段落,使它们不重叠,或者在按钮段落上使用 last(而不是隔离)使按钮向右浮动。

在不知道您的标记限制或所需外观的情况下,很难更具体。

如果我遗漏了什么,请告诉我。

关于css - Susy Grid 系统上 Debug模式和隔离装订线位置的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45007225/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com