Skip to content

Commit fd61bd8

Browse files
committed
Write files as UTF8; default precision to 8
1 parent 17a254b commit fd61bd8

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
django-sass
22
===========
33

4-
The absolute simplest way to use [Sass]() with Django. Pure Python,
5-
minimal dependencies, and no special configuration required.
4+
The absolute simplest way to use [Sass](https://sass-lang.com/) with Django.
5+
Pure Python, minimal dependencies, and no special configuration required.
66

77
[Source code on GitHub](https://github.com/coderedcorp/wagtail-cache)
88

@@ -34,7 +34,7 @@ Usage
3434
-----
3535

3636
In your app's static files, use Sass as normal. The only difference is that
37-
you should not traverse upwards using `../` in `@import` statements. For example:
37+
you can **not** traverse upwards using `../` in `@import` statements. For example:
3838

3939
```
4040
app1/
@@ -145,8 +145,6 @@ Limitations
145145

146146
* Only supports `-t` and `-p` options similar to `pysassc`. Ideally `django-sass` will
147147
be as similar as possible to the `pysassc` command line interface.
148-
**Note:** if using with Bootstrap, specify `-p 8` as Bootstrap requires higher floating
149-
point precision to work correctly.
150148

151149
Feel free to file an issue or make a pull request to improve any of these limitations. 🐱‍💻
152150

@@ -170,3 +168,17 @@ other packages that require compilation to install.
170168

171169
django-sass only depends on libsass (which provides pre-built wheels for Windows, Mac,
172170
and Linux), and of course Django (any version).
171+
172+
173+
Changelog
174+
---------
175+
176+
#### 0.1.2
177+
* Fix: Write compiled CSS files as UTF-8.
178+
* Change: Default `-p` precision from 5 to 8 for better support building Bootstrap CSS.
179+
180+
#### 0.1.1
181+
* Fix: Create full file path if not exists when specifying a file output.
182+
183+
#### 0.1.0
184+
* Initial release

django_sass/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.1"
1+
__version__ = "0.1.2"

django_sass/management/commands/sass.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def add_arguments(self, parser):
3333
"-p",
3434
type=int,
3535
dest="p",
36-
default=5,
37-
help="Precision. Defaults to 5 (Bootstrap requires 8)",
36+
default=8,
37+
help="Precision. Defaults to 8",
3838
)
3939
parser.add_argument(
4040
"--watch",
@@ -53,7 +53,7 @@ def compile_sass(self, outfile, **kwargs):
5353
outfile_dir = os.path.dirname(outfile)
5454
if not os.path.exists(outfile_dir):
5555
os.makedirs(outfile_dir, exist_ok=True)
56-
file = open(outfile, "w")
56+
file = open(outfile, "w", encoding="utf8")
5757
file.write(rval)
5858
file.close()
5959

0 commit comments

Comments
 (0)