如何在手写笔上为Opera 12编写一个hack?

时间:2015-07-13 15:57:36

标签: stylus

下午好! 有必要使用doesnotexist在Opera 12的手写笔黑客上书写:-o-prefocus,.selector

有这样的代码:

.class-name 
    background url('my.svg') no-repeat
    background-size contain

    .svg_no &
       &.icon_size
            &_16
                background url('my_size_16.png') no-repeat
            &_32
                background url('my_size_32.png') no-repeat
            &_56
                background url('my_size_56.png') no-repeat

现在位于:

.class-name {
  background: url("my.svg") no-repeat;
  background-size: contain;
}
.svg_no .class-name.icon_size_16 {
   background: url("my_size_16.png") no-repeat;
}
.svg_no .class-name.icon_size_32 {
   background: url("my_size_32.png") no-repeat;
}
.svg_no .class-name.icon_size_56 {
  background: url("my_size_56.png") no-repeat;
}

如何添加以下行:“donotexist:-o-prefocus,.selector”:

.class-name {
  background: url("my.svg") no-repeat;
  background-size: contain;
}
doesnotexist:-o-prefocus, .class-name.icon_size_16,
.svg_no .class-name.icon_size_16 {
   background: url("my_size_16.png") no-repeat;
}
doesnotexist:-o-prefocus, .class-name.icon_size_32,
.svg_no .class-name.icon_size_32 {
   background: url("my_size_32.png") no-repeat;
}
doesnotexist:-o-prefocus, .class-name.icon_size_56,
.svg_no .class-name.icon_size_56 {
    background: url("my_size_56.png") no-repeat;
}

1 个答案:

答案 0 :(得分:0)

试试这个:

.class-name
    background url('my.svg') no-repeat
    background-size contain

    &.icon_size
        &_16
            /doesnotexist:-o-prefocus
            &
            .svg_no &
                background url('my_size_16.png') no-repeat
        &_32
            /doesnotexist:-o-prefocus
            &
            .svg_no &
                background url('my_size_32.png') no-repeat
        &_56
            /doesnotexist:-o-prefocus
            &
            .svg_no &
                background url('my_size_56.png') no-repeat