astrada / ppx_bs_css

A ppx rewriter for CSS expressions.
MIT License
98 stars 7 forks source link

selector " .name" becauses ". name" #31

Closed c19 closed 4 years ago

c19 commented 5 years ago
open Css;
  let skillHeader =
    style @@
    [%css
      {|
      {
        background: #fff;
        border-bottom: 1px solid #dfdfdf;
      }
      .ant-breadcrumb{
        padding-top: 20px;
      }
    |}
    ];

compiled to

var skillHeader = Css.style(/* :: */Block.simpleVariant("::", [
        Css.background(Css.hex("fff")),
        /* :: */Block.simpleVariant("::", [
            Css.borderBottom(Css.px(1), Css.solid, Css.hex("dfdfdf")),
            /* :: */Block.simpleVariant("::", [
                Css.selector(". ant-breadcrumb", /* :: */Block.simpleVariant("::", [
                        Css.paddingTop(Css.px(20)),
                        /* [] */0
                      ])),
                /* [] */0
              ])
          ])
      ]));

but we need Css.selector(" .ant-breadcrumb", ... instead of Css.selector(". ant-breadcrumb", ...