From 55302b3e2857244fc0d3ef6cc296d2b2f0cb9f8a Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Wed, 8 May 2024 15:53:36 +0200 Subject: [PATCH] Adding calc() exception See https://lesscss.org/#operations-calc-exception --- .../less-same-webjars-different-version/build.sbt | 2 +- .../src/main/assets/css/main.less | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/sbt-test/sbt-less-plugin/less-same-webjars-different-version/build.sbt b/src/sbt-test/sbt-less-plugin/less-same-webjars-different-version/build.sbt index bffbe83..c4cfb1c 100644 --- a/src/sbt-test/sbt-less-plugin/less-same-webjars-different-version/build.sbt +++ b/src/sbt-test/sbt-less-plugin/less-same-webjars-different-version/build.sbt @@ -4,7 +4,7 @@ val checkMapFileContents = taskKey[Unit]("check that map contents are correct") checkMapFileContents := { val contents = IO.read((Assets / WebKeys.public).value / "css" / "main.min.css.map") - val expectedContents = """{"version":3,"sources":["main.less"],"names":[],"mappings":"AAAA,GACE","file":"main.min.css"}""" + val expectedContents = """{"version":3,"sources":["main.less"],"names":[],"mappings":"AAGA,GACE,UAAA,CACA,IAAK","file":"main.min.css"}""" if (contents != expectedContents) { sys.error(s"Unexpected contents: $contents, \nexpected: $expectedContents") diff --git a/src/sbt-test/sbt-less-plugin/less-same-webjars-different-version/src/main/assets/css/main.less b/src/sbt-test/sbt-less-plugin/less-same-webjars-different-version/src/main/assets/css/main.less index 34fb9ac..c773cb6 100644 --- a/src/sbt-test/sbt-less-plugin/less-same-webjars-different-version/src/main/assets/css/main.less +++ b/src/sbt-test/sbt-less-plugin/less-same-webjars-different-version/src/main/assets/css/main.less @@ -1,3 +1,7 @@ +@li-vspace: 1.7rem; +@icon-size: 2rem; + h1 { - color: blue -} \ No newline at end of file + color: blue; + top: calc(-@li-vspace + @icon-size / 2 - 5px); +}