Skip to content

v1.6.2 #152

Description

@tbela99
  • fix base64 encoding error when inline sourcemap is enabled
  • handle division by zero in calc()
  • strip escaped new line from string
  • range media query : parse more expression as range query
  • handle NaN and Infinity in computation
  • parse <url-modifiers>

strip escaped new line from string

a[title="a not s\
o very long title"] {
  
color: blue;

is escaped as

a[title="a not so very long title"] {
 color: blue
}

parsing range query is improved

@media (min-resolution: 2dppx) {}

is parsed as

@media (resolution>=2x) {}

NaN and Infinity are now handled in calc().

    @media (min-width: 300px) and (max-width: 768px){
    .s {
  
    top: calc(NaN * 1px);
    line-height: calc(NaN * 1);
  color: alpha(from red/calc(0/0));
  background: alpha(from red/calc(pi/0));
    height: calc(1px * (NaN + 1));  
    width: calc(NaN + 1 + calc(NaN - 1 + calc(NaN / 1 + calc(NaN * 1))));
    margin-left: calc(infinity + 1 + calc(infinity - 1 + calc(infinity / 1 + calc(infinity * 1))));
    margin-right: calc(infinity + 1px + calc(infinity - 1 + calc(infinity / 1 + calc(infinity * 1))));

}

is parsed as

@media (300px<=width<=768px) {
 .s {
  top: calc(NaN*1px);
  line-height: calc(NaN);
  color: alpha(from red/calc(NaN));
  background: alpha(from red/calc(1/0));
  height: calc(1px*NaN);
  width: calc(NaN);
  margin-left: calc(0/0);
  margin-right: calc(0/0 + 1px)
 }
}

Parsing url() <url-modifiers> is supported.

    .s {
    background: url("star.gif" crossorigin(anonymous));
}

is parsed as

.s {
 background: url(star.gif crossorigin(anonymous))
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions