func getSassNumberUnit(arg SassValue) (string, error) { u := libs.Unit(arg.Val()) var err error if noSassNumberUnit(arg) { return u, ErrSassNumberNoUnit } if _, ok := libs.SassUnitConversions[u]; !ok { return u, fmt.Errorf("SassNumber units %s are unsupported", u) } return u, err }
func noSassNumberUnit(arg SassValue) bool { u := libs.Unit(arg.Val()) return u == "" || u == "none" }