Skip to content

Commit

Permalink
Re-organize the changelog.
Browse files Browse the repository at this point in the history
The old organization was based on script &, the new one is based on
maps and source maps.
  • Loading branch information
nex3 committed Jan 22, 2014
1 parent 3f1498a commit 267aa0d
Showing 1 changed file with 91 additions and 91 deletions.
182 changes: 91 additions & 91 deletions doc-src/SASS_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,97 +5,6 @@

## 3.3.0 (Unreleased)

#### `@at-root`

Sass 3.3 adds the `@at-root` directive, which is a way to tell Sass to
put a collection of rules at the top-level root of the document. The
easiest way to use it is with a selector:

.badge {
@at-root .info { ... }
@at-root .header { ... }
}

In addition to using `@at-root` on a single selector, you can also use it on a
whole block of them. For example:

.badge {
@at-root {
.info { ... }
.header { ... }
}
}

Also produces:

.info { ... }
.header { ... }

#### `@at-root (without: ...)` and `@at-root (with: ...)`

By default, `@at-root` just excludes selectors. However, it's also
possible to use `@at-root` to move outside of nested directives such
as `@media` as well. For example:

@media print {
.page {
width: 8in;
@at-root (without: media) {
color: red;
}
}
}

produces:

@media print {
.page {
width: 8in;
}
}
.page {
color: red;
}

You can use `@at-root (without: ...)` to move outside of any
directive. You can also do it with multiple directives separated by a
space: `@at-root (without: media supports)` moves outside of both
`@media` and `@supports` queries.

There are two special values you can pass to `@at-root`. "rule" refers
to normal CSS rules; `@at-root (without: rule)` is the same as
`@at-root` with no query. `@at-root (without: all)` means that the
styles should be moved outside of *all* directives and CSS rules.

If you want to specify which directives or rules to include, rather
than listing which ones should be excluded, you can use `with` instead
of `without`. For example, `@at-root (with: rule)` will move outside
of all directives, but will preserve any CSS rules.

### Source Maps

Sass now has the ability to generate standard JSON [source maps][] of a format
that will soon be supported in most major browsers. These source maps tell the
browser how to find the Sass styles that caused each CSS style to be generated.
They're much more fine-grained than the old Sass-specific debug info that was
generated; rather than providing the source location of entire CSS rules at a
time, source maps provide the source location of each individual selector and
property.

Source maps can be generated by passing the `--sourcemap` flag to the `sass`
executable, by passing the {file:SASS_REFERENCE.md#sourcemap-option `:sourcemap`
option} to \{Sass::Plugin}, or by using the
\{Sass::Engine#render\_with\_sourcemap} method. By default, Sass assumes that
the source stylesheets will be made available on whatever server you're using,
and that their relative location will be the same as it is on the local
filesystem. If this isn't the case, you'll need to make a custom class that
extends \{Sass::Importers::Base} or \{Sass::Importers::Filesystem} and overrides
\{Sass::Importers::Base#public\_url `#public_url`}.

Thanks to Alexander Pavlov for implementing this.

[source maps]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?hl=en_US&pli=1&pli=1

### SassScript Maps

SassScript has a new data type: maps. These are associations from SassScript
Expand Down Expand Up @@ -227,6 +136,97 @@ Since it's just a migration feature, using lists of pairs in place of maps is
already deprecated. Library authors should encourage their users to use actual
maps instead.

### Source Maps

Sass now has the ability to generate standard JSON [source maps][] of a format
that will soon be supported in most major browsers. These source maps tell the
browser how to find the Sass styles that caused each CSS style to be generated.
They're much more fine-grained than the old Sass-specific debug info that was
generated; rather than providing the source location of entire CSS rules at a
time, source maps provide the source location of each individual selector and
property.

Source maps can be generated by passing the `--sourcemap` flag to the `sass`
executable, by passing the {file:SASS_REFERENCE.md#sourcemap-option `:sourcemap`
option} to \{Sass::Plugin}, or by using the
\{Sass::Engine#render\_with\_sourcemap} method. By default, Sass assumes that
the source stylesheets will be made available on whatever server you're using,
and that their relative location will be the same as it is on the local
filesystem. If this isn't the case, you'll need to make a custom class that
extends \{Sass::Importers::Base} or \{Sass::Importers::Filesystem} and overrides
\{Sass::Importers::Base#public\_url `#public_url`}.

Thanks to Alexander Pavlov for implementing this.

[source maps]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?hl=en_US&pli=1&pli=1

#### `@at-root`

Sass 3.3 adds the `@at-root` directive, which is a way to tell Sass to
put a collection of rules at the top-level root of the document. The
easiest way to use it is with a selector:

.badge {
@at-root .info { ... }
@at-root .header { ... }
}

In addition to using `@at-root` on a single selector, you can also use it on a
whole block of them. For example:

.badge {
@at-root {
.info { ... }
.header { ... }
}
}

Also produces:

.info { ... }
.header { ... }

#### `@at-root (without: ...)` and `@at-root (with: ...)`

By default, `@at-root` just excludes selectors. However, it's also
possible to use `@at-root` to move outside of nested directives such
as `@media` as well. For example:

@media print {
.page {
width: 8in;
@at-root (without: media) {
color: red;
}
}
}

produces:

@media print {
.page {
width: 8in;
}
}
.page {
color: red;
}

You can use `@at-root (without: ...)` to move outside of any
directive. You can also do it with multiple directives separated by a
space: `@at-root (without: media supports)` moves outside of both
`@media` and `@supports` queries.

There are two special values you can pass to `@at-root`. "rule" refers
to normal CSS rules; `@at-root (without: rule)` is the same as
`@at-root` with no query. `@at-root (without: all)` means that the
styles should be moved outside of *all* directives and CSS rules.

If you want to specify which directives or rules to include, rather
than listing which ones should be excluded, you can use `with` instead
of `without`. For example, `@at-root (with: rule)` will move outside
of all directives, but will preserve any CSS rules.

### Smaller Improvements

* The parent selector, `&`, can be used with an identifier suffix. For
Expand Down

0 comments on commit 267aa0d

Please sign in to comment.