dartfmt
diff --git a/lib/src/tree.dart b/lib/src/tree.dart
index 7e68473..7e1fe6d 100644
--- a/lib/src/tree.dart
+++ b/lib/src/tree.dart
@@ -640,8 +640,7 @@
final List<MediaQuery> mediaQueries;
final List<TreeNode> rules;
- MediaDirective(this.mediaQueries, this.rules, SourceSpan span)
- : super(span);
+ MediaDirective(this.mediaQueries, this.rules, SourceSpan span) : super(span);
MediaDirective clone() {
var cloneQueries = <MediaQuery>[];
diff --git a/test/compiler_test.dart b/test/compiler_test.dart
index e64af7f..5faabe2 100644
--- a/test/compiler_test.dart
+++ b/test/compiler_test.dart
@@ -533,9 +533,7 @@
expect(stylesheet != null, true);
expect(errors.isEmpty, true, reason: errors.toString());
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
.foo {
color: #f00;
left: 20px;
@@ -597,9 +595,7 @@
expect(stylesheet != null, true);
expect(errors.isEmpty, true, reason: errors.toString());
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
html:lang(fr-ca) {
quotes: '" ' ' "';
}
@@ -669,9 +665,7 @@
expect(stylesheet != null, true);
expect(errors.isEmpty, true, reason: errors.toString());
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
@host {
:scope {
white-space: nowrap;
@@ -697,9 +691,7 @@
expect(stylesheet != null, true);
expect(errors.isEmpty, true, reason: errors.toString());
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
a {
foo: '{"text" : "a\\\""}';
}''');
@@ -721,9 +713,7 @@
walkTree(stylesheet);
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
.foo {
color: #f00;
left: 20px;
diff --git a/test/error_test.dart b/test/error_test.dart
index 1060d83..013865e 100644
--- a/test/error_test.dart
+++ b/test/error_test.dart
@@ -21,17 +21,13 @@
var stylesheet = parseCss(input, errors: errors);
expect(errors.isEmpty, false);
- expect(
- errors[0].toString(),
- r'''
+ expect(errors[0].toString(), r'''
error on line 1, column 24: Unknown property value bolder
.foobar { font-weight: bolder; }
^^^^^^''');
expect(stylesheet != null, true);
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
.foobar {
font-weight: bolder;
}''');
@@ -42,16 +38,12 @@
stylesheet = parseCss(input, errors: errors..clear());
expect(errors.isEmpty, false);
- expect(
- errors[0].toString(),
- r'''
+ expect(errors[0].toString(), r'''
error on line 1, column 24: Unknown property value lighter
.foobar { font-weight: lighter; }
^^^^^^^''');
expect(stylesheet != null, true);
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
.foobar {
font-weight: lighter;
}''');
@@ -62,16 +54,12 @@
stylesheet = parseCss(input, errors: errors..clear());
expect(errors.isEmpty, false);
- expect(
- errors[0].toString(),
- r'''
+ expect(errors[0].toString(), r'''
error on line 1, column 24: Unknown property value inherit
.foobar { font-weight: inherit; }
^^^^^^^''');
expect(stylesheet != null, true);
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
.foobar {
font-weight: inherit;
}''');
@@ -89,16 +77,12 @@
var stylesheet = parseCss(input, errors: errors);
expect(errors.isEmpty, false);
- expect(
- errors[0].toString(),
- r'''
+ expect(errors[0].toString(), r'''
error on line 1, column 24: Unexpected value for line-height
.foobar { line-height: 120%; }
^^^''');
expect(stylesheet != null, true);
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
.foobar {
line-height: 120%;
}''');
@@ -109,16 +93,12 @@
stylesheet = parseCss(input, errors: errors..clear());
expect(errors.isEmpty, false);
- expect(
- errors[0].toString(),
- r'''
+ expect(errors[0].toString(), r'''
error on line 1, column 24: Unexpected unit for line-height
.foobar { line-height: 20cm; }
^^''');
expect(stylesheet != null, true);
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
.foobar {
line-height: 20cm;
}''');
@@ -129,16 +109,12 @@
stylesheet = parseCss(input, errors: errors..clear());
expect(errors.isEmpty, false);
- expect(
- errors[0].toString(),
- r'''
+ expect(errors[0].toString(), r'''
error on line 1, column 24: Unknown property value inherit
.foobar { line-height: inherit; }
^^^^^^^''');
expect(stylesheet != null, true);
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
.foobar {
line-height: inherit;
}''');
@@ -153,16 +129,12 @@
var stylesheet = parseCss(input, errors: errors);
expect(errors.isEmpty, false);
- expect(
- errors[0].toString(),
- r'''
+ expect(errors[0].toString(), r'''
error on line 1, column 1: Not a valid ID selector expected #id
# foo { color: #ff00ff; }
^''');
expect(stylesheet != null, true);
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
# foo {
color: #f0f;
}''');
@@ -172,16 +144,12 @@
stylesheet = parseCss(input, errors: errors..clear());
expect(errors.isEmpty, false);
- expect(
- errors[0].toString(),
- r'''
+ expect(errors[0].toString(), r'''
error on line 1, column 1: Not a valid class selector expected .className
. foo { color: #ff00ff; }
^''');
expect(stylesheet != null, true);
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
. foo {
color: #f0f;
}''');
@@ -196,16 +164,12 @@
var stylesheet = parseCss(input, errors: errors);
expect(errors.isEmpty, false);
- expect(
- errors[0].toString(),
- r'''
+ expect(errors[0].toString(), r'''
error on line 1, column 18: Bad hex number
.foobar { color: #AH787; }
^^^^^^''');
expect(stylesheet != null, true);
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
.foobar {
color: #AH787;
}''');
@@ -215,17 +179,13 @@
stylesheet = parseCss(input, errors: errors..clear());
expect(errors.isEmpty, false);
- expect(
- errors[0].toString(),
- r'''
+ expect(errors[0].toString(), r'''
error on line 1, column 18: Unknown property value redder
.foobar { color: redder; }
^^^^^^''');
expect(stylesheet != null, true);
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
.foobar {
color: redder;
}''');
@@ -235,17 +195,13 @@
stylesheet = parseCss(input, errors: errors..clear());
expect(errors.isEmpty, false);
- expect(
- errors[0].toString(),
- r'''
+ expect(errors[0].toString(), r'''
error on line 1, column 18: Expected hex number
.foobar { color: # ffffff; }
^''');
expect(stylesheet != null, true);
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
.foobar {
color: # ffffff;
}''');
@@ -255,9 +211,7 @@
stylesheet = parseCss(input, errors: errors..clear());
expect(errors.isEmpty, false);
- expect(
- errors[0].toString(),
- r'''
+ expect(errors[0].toString(), r'''
error on line 1, column 18: Expected hex number
.foobar { color: # 123fff; }
^''');
@@ -266,9 +220,7 @@
// Formating is off with an extra space. However, the entire value is bad
// and isn't processed anyway.
- expect(
- prettyPrint(stylesheet),
- r'''
+ expect(prettyPrint(stylesheet), r'''
.foobar {
color: # 123 fff;
}''');
diff --git a/test/extend_test.dart b/test/extend_test.dart
index 184a8b4..7df68c5 100644
--- a/test/extend_test.dart
+++ b/test/extend_test.dart
@@ -18,8 +18,7 @@
}
void simpleExtend() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
.error {
border: 1px red;
background-color: #fdd;
@@ -28,8 +27,7 @@
@extend .error;
border-width: 3px;
}
-''',
- r'''
+''', r'''
.error, .seriousError {
border: 1px #f00;
background-color: #fdd;
@@ -40,8 +38,7 @@
}
void complexSelectors() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
.error {
border: 1px #f00;
background-color: #fdd;
@@ -53,8 +50,7 @@
@extend .error;
border-width: 3px;
}
-''',
- r'''
+''', r'''
.error, .seriousError {
border: 1px #f00;
background-color: #fdd;
@@ -66,16 +62,14 @@
border-width: 3px;
}''');
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
a:hover {
text-decoration: underline;
}
.hoverlink {
@extend a:hover;
}
-''',
- r'''
+''', r'''
a:hover, .hoverlink {
text-decoration: underline;
}
@@ -84,8 +78,7 @@
}
void multipleExtends() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
.error {
border: 1px #f00;
background-color: #fdd;
@@ -99,8 +92,7 @@
@extend .attention;
border-width: 3px;
}
-''',
- r'''
+''', r'''
.error, .seriousError {
border: 1px #f00;
background-color: #fdd;
@@ -115,8 +107,7 @@
}
void chaining() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
.error {
border: 1px #f00;
background-color: #fdd;
@@ -133,8 +124,7 @@
left: 10%;
right: 10%;
}
-''',
- r'''
+''', r'''
.error, .seriousError, .criticalError {
border: 1px #f00;
background-color: #fdd;
@@ -152,8 +142,7 @@
}
void nestedSelectors() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
a {
color: blue;
&:hover {
@@ -164,8 +153,7 @@
#fake-links .link {
@extend a;
}
-''',
- r'''
+''', r'''
a, #fake-links .link {
color: #00f;
}
@@ -177,8 +165,7 @@
}
void nestedMulty() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
.btn {
display: inline-block;
}
@@ -190,8 +177,7 @@
@extend .btn;
}
}
-''',
- r'''
+''', r'''
.btn, input[type="checkbox"].toggle-button label {
display: inline-block;
}
diff --git a/test/mixin_test.dart b/test/mixin_test.dart
index 375054c..59071f9 100644
--- a/test/mixin_test.dart
+++ b/test/mixin_test.dart
@@ -26,8 +26,7 @@
}
void topLevelMixin() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin silly-links {
a {
color: blue;
@@ -36,8 +35,7 @@
}
@include silly-links;
-''',
- r'''
+''', r'''
a {
color: #00f;
background-color: #f00;
@@ -45,8 +43,7 @@
}
void topLevelMixinTwoIncludes() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin a {
a {
color: blue;
@@ -61,8 +58,7 @@
}
@include a;
@include b;
-''',
- r'''
+''', r'''
a {
color: #00f;
background-color: #f00;
@@ -75,8 +71,7 @@
/** Tests top-level mixins that includes another mixin. */
void topLevelMixinMultiRulesets() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin a {
a {
color: blue;
@@ -98,8 +93,7 @@
}
@include a;
@include c;
-''',
- r'''
+''', r'''
a {
color: #00f;
background-color: #f00;
@@ -115,8 +109,7 @@
}
void topLevelMixinDeeplyNestedRulesets() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin a {
a {
color: blue;
@@ -156,8 +149,7 @@
@include d;
}
@include c;
-''',
- r'''
+''', r'''
a {
color: #00f;
background-color: #f00;
@@ -183,8 +175,7 @@
/** Tests selector groups and other combinators. */
void topLevelMixinSelectors() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin a {
a, b {
color: blue;
@@ -197,8 +188,7 @@
}
@include a;
-''',
- r'''
+''', r'''
a, b {
color: #00f;
background-color: #f00;
@@ -210,24 +200,21 @@
}
void declSimpleMixin() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin div-border {
border: 2px dashed red;
}
div {
@include div-border;
}
-''',
- r'''
+''', r'''
div {
border: 2px dashed #f00;
}''');
}
void declMixinTwoIncludes() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin div-border {
border: 2px dashed red;
}
@@ -238,8 +225,7 @@
@include div-border;
@include div-color;
}
-''',
- r'''
+''', r'''
div {
border: 2px dashed #f00;
color: #00f;
@@ -247,8 +233,7 @@
}
void declMixinNestedIncludes() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin div-border {
border: 2px dashed red;
}
@@ -267,8 +252,7 @@
@include div-border;
@include div-color;
}
-''',
- r'''
+''', r'''
div {
border: 2px dashed #f00;
padding: .5em;
@@ -278,8 +262,7 @@
}
void declMixinDeeperNestedIncludes() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin div-border {
border: 2px dashed red;
}
@@ -297,8 +280,7 @@
@include div-border;
@include div-color;
}
-''',
- r'''
+''', r'''
div {
border: 2px dashed #f00;
padding: .5em;
@@ -307,8 +289,7 @@
}
void mixinArg() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin div-border-1 {
border: 2px dashed red;
}
@@ -337,8 +318,7 @@
div-4 {
@include div-border-2;
}
-''',
- r'''
+''', r'''
div-1 {
margin-left: 10px;
margin-right: 100px;
@@ -358,8 +338,7 @@
}
void mixinArgs() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin box-shadow(@shadows...) {
-moz-box-shadow: @shadows;
-webkit-box-shadow: @shadows;
@@ -368,8 +347,7 @@
.shadows {
@include box-shadow(0px 4px 5px #666, 2px 6px 10px #999);
-}''',
- r'''
+}''', r'''
.shadowed {
-moz-box-shadow: 0px 4px 5px #666, 2px 6px 10px #999;
-webkit-box-shadow: 0px 4px 5px #666, 2px 6px 10px #999;
@@ -379,8 +357,7 @@
}
void mixinManyArgs() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin border(@border-values) {
border: @border-values
}
@@ -388,14 +365,12 @@
.primary {
@include border(3px solid green);
}
-''',
- r'''
+''', r'''
.primary {
border: 3px solid #008000;
}''');
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin setup(@border-color, @border-style, @border-size, @color) {
border: @border-size @border-style @border-color;
color: @color;
@@ -404,16 +379,14 @@
.primary {
@include setup(red, solid, 5px, blue);
}
-''',
- r'''
+''', r'''
.primary {
border: 5px solid #f00;
color: #00f;
}''');
// Test passing a declaration that is multiple parameters.
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin colors(@text, @background, @border) {
color: @text;
background-color: @background;
@@ -424,8 +397,7 @@
.primary {
@include colors(@values);
}
-''',
- r'''
+''', r'''
var-values: #f00, #0f0, #00f;
.primary {
@@ -434,8 +406,7 @@
border-color: #00f;
}''');
- compilePolyfillAndValidate(
- r'''
+ compilePolyfillAndValidate(r'''
@mixin colors(@text, @background, @border) {
color: @text;
background-color: @background;
@@ -446,8 +417,7 @@
.primary {
@include colors(@values);
}
-''',
- r'''
+''', r'''
.primary {
color: #f00;
background-color: #0f0;
@@ -590,8 +560,7 @@
}
void includeGrammar() {
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin a {
foo { color: red }
}
@@ -602,8 +571,7 @@
}
@include b;
-''',
- r'''
+''', r'''
foo {
color: #f00;
}
@@ -611,8 +579,7 @@
color: #f00;
}''');
- compileAndValidate(
- r'''
+ compileAndValidate(r'''
@mixin a {
color: red
}
@@ -621,8 +588,7 @@
@include a;
@include a
}
-''',
- r'''
+''', r'''
foo {
color: #f00;
color: #f00;
diff --git a/test/var_test.dart b/test/var_test.dart
index 3c53169..39e7c45 100644
--- a/test/var_test.dart
+++ b/test/var_test.dart
@@ -748,15 +748,13 @@
}
void polyfill() {
- compilePolyfillAndValidate(
- r'''
+ compilePolyfillAndValidate(r'''
@color-background: red;
@color-foreground: blue;
.test {
background-color: @color-background;
color: @color-foreground;
-}''',
- r'''
+}''', r'''
.test {
background-color: #f00;
color: #00f;
@@ -764,8 +762,7 @@
}
void testIndirects() {
- compilePolyfillAndValidate(
- '''
+ compilePolyfillAndValidate('''
:root {
var-redef: #0f0;
@@ -782,8 +779,7 @@
}
.test-1 {
color: @redef;
-}''',
- r'''
+}''', r'''
:root {
}
.test {
diff --git a/test/visitor_test.dart b/test/visitor_test.dart
index 16071c7..02784c4 100644
--- a/test/visitor_test.dart
+++ b/test/visitor_test.dart
@@ -60,9 +60,7 @@
..visitTree(s);
expect(clsVisits.matches, true);
- expect(
- prettyPrint(s),
- r'''
+ expect(prettyPrint(s), r'''
.foobar1 {
}
.xyzzy .foo #my-div {