Giter VIP home page Giter VIP logo

Comments (5)

codingdesigner avatar codingdesigner commented on May 18, 2024

Ahh, just did some testing on this. You can set default values before defining the function or mixin like we had before, but the problem you found was an error in the example sass file. The were setting new !default values, but were being ignored. The solution is to just set a new value to the variable. Like so:

_modular-scale.sass

$ratio: $golden !default
$base-size: 12px !default
$property: font-size !default
$class-slug: ms !default

// Modular Scale function
@function modular-scale($multiple, $base-size, $ratio)

example.sass

.foo
  width: modular-scale(2)
// $base-size value is 12px

$base-size: 14px

.bar
  width: modular-scale(2)
// $base-size value is 14px

$base-size: 16px !default

.baz
  width: modular-scale(2)
// $base-size value is 14px

This solves the problem. I'll push the code for this today.

from modularscale-sass.

codingdesigner avatar codingdesigner commented on May 18, 2024

pushed some code:

  • add default values back. fix the redeclared defaults in the test sass file
  • organize the example sass file
  • removing the duplicate test html and css. Went with the server version because I find it useful, and because that's the way the config.rb file was set up

from modularscale-sass.

scottkellum avatar scottkellum commented on May 18, 2024

nice, why use .html.erb though?

from modularscale-sass.

codingdesigner avatar codingdesigner commented on May 18, 2024

mostly because it was working with Serve. I think its moderately helpful while developing. not a dealbreaker for me if you feel like simplifying that tho.

from modularscale-sass.

scottkellum avatar scottkellum commented on May 18, 2024

ah, that makes sense. We can leave it as-is for now but in the long run I would like everything as bare-bones simple as possible.

from modularscale-sass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.