mirror of
https://github.com/danog/dart-sass.git
synced 2024-12-02 09:37:49 +01:00
Indent comma-separated multiline selectors inside @media queries (#1814)
* Indent comma-separated multiline selectors inside @media queries * update pubspec and changelog
This commit is contained in:
parent
6e670ef6b8
commit
655b55c51d
@ -1,3 +1,7 @@
|
|||||||
|
## 1.55.1
|
||||||
|
|
||||||
|
* Fix indentation for selectors that span multiple lines in a `@media` query.
|
||||||
|
|
||||||
## 1.55.0
|
## 1.55.0
|
||||||
|
|
||||||
* **Potentially breaking bug fix:** Sass numbers are now universally stored as
|
* **Potentially breaking bug fix:** Sass numbers are now universally stored as
|
||||||
|
@ -1240,6 +1240,7 @@ class _SerializeVisitor
|
|||||||
_buffer.writeCharCode($comma);
|
_buffer.writeCharCode($comma);
|
||||||
if (complex.lineBreak) {
|
if (complex.lineBreak) {
|
||||||
_writeLineFeed();
|
_writeLineFeed();
|
||||||
|
_writeIndentation();
|
||||||
} else {
|
} else {
|
||||||
_writeOptionalSpace();
|
_writeOptionalSpace();
|
||||||
}
|
}
|
||||||
@ -1318,7 +1319,7 @@ class _SerializeVisitor
|
|||||||
|
|
||||||
if (_isTrailingComment(child, previous ?? parent)) {
|
if (_isTrailingComment(child, previous ?? parent)) {
|
||||||
_writeOptionalSpace();
|
_writeOptionalSpace();
|
||||||
_withoutIndendation(() => child.accept(this));
|
_withoutIndentation(() => child.accept(this));
|
||||||
} else {
|
} else {
|
||||||
_writeLineFeed();
|
_writeLineFeed();
|
||||||
_indent(() {
|
_indent(() {
|
||||||
@ -1431,7 +1432,7 @@ class _SerializeVisitor
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Runs [callback] without any indentation.
|
/// Runs [callback] without any indentation.
|
||||||
void _withoutIndendation(void callback()) {
|
void _withoutIndentation(void callback()) {
|
||||||
var savedIndentation = _indentation;
|
var savedIndentation = _indentation;
|
||||||
_indentation = 0;
|
_indentation = 0;
|
||||||
callback();
|
callback();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name: sass
|
name: sass
|
||||||
version: 1.55.0
|
version: 1.55.1-dev
|
||||||
description: A Sass implementation in Dart.
|
description: A Sass implementation in Dart.
|
||||||
homepage: https://github.com/sass/dart-sass
|
homepage: https://github.com/sass/dart-sass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user