0

In SUSY v1.x, writing:

.content {
  @include container;
}

compiled as

.content {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.content:after {
  content: " ";
  display: block;
  clear: both; 
}

now, in SUSY 2.0 it compiles as

.content {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.content::after {
  content: " ";
  display: block;
  clear: both; 
}

The issue being the two colons in the after pseudo element. A single colon works in all browsers, including IE8 - so I'm wondering: 1) if this was an intentional change or an oversight, as two colons drops support for IE8 and 2) if there's a workaround without writing out all the extra CSS for IE8 "containers".

4

2 回答 2

0

我写了这个作为 IE8 项目的解决方法。由于该浏览器即将淘汰,我认为这可能比根据当前标准重写您的代码不正确更好。也许只是将 IE8 的解决方法添加到文档中?

$susy: (
    use-custom: (
        clearfix: true,
    )
);
// define custom clearfix because default uses ::after which doesn't work in IE8
@mixin clearfix() {
    &:after {
        content: " ";
        display: block;
        clear: both;
    }
}
于 2014-03-21T00:26:37.337 回答
0

根据标准,两个冒号是“正确的”,但我不知道 IE8 不支持它。请在GitHub 上提交错误报告,或提交补丁,我会尽快恢复。

于 2014-03-19T21:04:51.247 回答