Skip to content

Add support for multiline value #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 10, 2016
Merged

Add support for multiline value #27

merged 3 commits into from
Apr 10, 2016

Conversation

alienlebarge
Copy link
Contributor

About

For those who like to write calc() on multilines or use a max-line-length rules in their CSS linter.

Tests

I wrote some tests for this.
@MoOx can you have a look ? I'm not realy sure if I've done it right.

multiline.css

multiline {
    font-size: calc(
                       1rem
                       * 2
                       * 1.5
                   );
    width: calc(1px +
      10px
      + 100px );
    height: calc(
2em
    + 20em + 200em);
    padding: calc(30px
      + 3px ) calc(
2px *
2
+40 px
        );
}

multiline.expected.css

multiline {
    font-size: 3rem;
    width: 111px;
    height: 222em;
    padding: 33px 44px;
}

Related issue(s)

Change the regex to match any kind of character (including line breaks).
Test if calc() value on more than one line is resolved
@alienlebarge
Copy link
Contributor Author

Did I have to add some examples in the README.md ?

@alienlebarge alienlebarge changed the title Enable support for multiline value Add support for multiline value Apr 6, 2016
@MoOx MoOx merged commit 44fcff6 into postcss:master Apr 10, 2016
@MoOx
Copy link
Contributor

MoOx commented Apr 10, 2016

Released as 5.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for multiline calc()
2 participants