Skip to content

Update SASS syntax#184

Open
robsonsobral wants to merge 4 commits intomodularscale:4.xfrom
robsonsobral:4.x
Open

Update SASS syntax#184
robsonsobral wants to merge 4 commits intomodularscale:4.xfrom
robsonsobral:4.x

Conversation

@robsonsobral
Copy link
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
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
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
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
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

"homepage": "https://www.modularscale.com",
"dependencies": {
"sass": "^1.34.0"
"sass": "^1.94.2"
Copy link
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

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