mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 13:51:31 +01:00
Preserve whitespace after and
in media queries in compressed mode (#242)
Closes #239
This commit is contained in:
parent
7d89ad0c1c
commit
b7d4384a5c
@ -12,6 +12,8 @@
|
||||
|
||||
* Preserve empty lines in `/*` comments in the indented syntax.
|
||||
|
||||
* Preserve whitespace after `and` in media queries in compressed mode.
|
||||
|
||||
## 1.0.0-beta.5.2
|
||||
|
||||
* Fix a bug where some colors would crash `compressed` mode.
|
||||
|
@ -249,7 +249,6 @@ class _SerializeVisitor implements CssVisitor, ValueVisitor, SelectorVisitor {
|
||||
_buffer.write(query.type);
|
||||
if (query.features.isNotEmpty) {
|
||||
_buffer.write(" and ");
|
||||
_writeOptionalSpace();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,9 @@ void main() {
|
||||
equals("@media screen{a{b:c}}"));
|
||||
});
|
||||
|
||||
test('removes whitespace around "and"', () {
|
||||
// Removing whitespace after "and", "or", or "not" is forbidden because it
|
||||
// would cause it to parse as a function token.
|
||||
test('removes whitespace before "and" when possible', () {
|
||||
expect(
|
||||
_compile("""
|
||||
@media screen and (min-width: 900px) and (max-width: 100px) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user