Skip to content

Update SASS syntax#184

Open
robsonsobral wants to merge 7 commits into
modularscale:4.xfrom
robsonsobral:4.x
Open

Update SASS syntax#184
robsonsobral wants to merge 7 commits into
modularscale:4.xfrom
robsonsobral:4.x

Conversation

@robsonsobral
Copy link
Copy Markdown
Collaborator

No changes besides updates on syntax.

Please, take a look, @Lukortech .

$global-settings: _get-global-settings();

// let's avoid modifying the provided $settings map directly
$combined-settings: map.deep-merge((), $settings);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea 👌🏻

Copy link
Copy Markdown
Collaborator Author

@robsonsobral robsonsobral Jan 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should NOT remove these default settings, set by @scottkellum !

/// round-to(3.14159, 2) // 3.14
/// round-to(2.6999999999999997em, 2) // 2.7em
/// round-to(41.052552223205566px, 2) // 41.05px
/// round-to(0.8888888888888888, 4) // 0.8889
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't aware there's no precision rounding in sass.
I've seen you covered it with tests already which is nice! 👍🏻

@use '../modularscale/round-to' as *;


@include true.describe('round-to [function]') {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth checking for largest number for some specific cases where someone applies very large margin.
math.$max-number
is specified to be 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 but safest integer is just 9007199254740991.

I may be worrying too much into the future but it might be something worth attention. LMK @robsonsobral

Comment thread package.json
"homepage": "https://www.modularscale.com",
"dependencies": {
"sass": "^1.34.0"
"sass": "^1.94.2"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very glad to see this as a side-effect of the changes <3

$base-length: list.length($base);
$bases: ();

// Resolve named ratio from settings map (e.g. ratio: 'minor-second')
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes #176

Copy link
Copy Markdown
Collaborator Author

@robsonsobral robsonsobral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing #176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants