Skip to content
This repository was archived by the owner on Feb 10, 2020. It is now read-only.

Commit b72e290

Browse files
committed
Add Precision option
1 parent 0ba4def commit b72e290

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

‎scss/common.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ const (
2525
)
2626

2727
type Options struct {
28+
//TODO(bep) icon font path
2829
// Default is nested.
2930
OutputStyle OutputStyle
3031

32+
// Precision of floating point math.
33+
Precision int
34+
3135
// File paths to use to resolve imports.
3236
IncludePaths []string
3337

‎scss/libsass/transpiler.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ func (t *libsassTranspiler) Execute(dst io.Writer, src io.Reader) error {
4444
defer libs.RemoveImporter(idx)
4545
}
4646

47+
if t.options.Precision != 0 {
48+
libs.SassOptionSetPrecision(opts, t.options.Precision)
49+
}
50+
4751
libs.SassOptionSetSourceMapEmbed(opts, t.options.EnableEmbeddedSourceMap)
4852
libs.SassOptionSetIncludePath(opts, strings.Join(t.options.IncludePaths, string(os.PathListSeparator)))
4953
//libs.SassOptionSetPrecision(opts, TODO)

0 commit comments

Comments
 (0)