Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less 3.8 #14

Merged
merged 26 commits into from
Feb 26, 2019
Merged

Less 3.8 #14

merged 26 commits into from
Feb 26, 2019

Conversation

calvinjuarez
Copy link
Collaborator

@calvinjuarez calvinjuarez commented Dec 7, 2018

As requested, here's a PR requiring only Less 3.8.1 (which included a fix for a bug with source maps that would break building). Peer dependency has also been set to Less ^3.8.1, while the dev dependency is still ^3.9.0.

--strict-math has been deprecated and replaced by --math.  See less/less.js#3274
Still haven't updated for the grid breakpoints just yet, though some breakpoint loops have been written in anticipation of those updates.
There are 4 loops in mixins/_grid-framework.less that loop 'til a static number.  I'm not aware of any answer for that at the moment, but a plugin could be easily written that could just leverage `each()`.
Except one in breakpoints.js:

```
91:6   warning  Variable 'nextBreakpoint' should be initialized on declaration
```
Copy link
Owner

@seanCodes seanCodes left a comment

Choose a reason for hiding this comment

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

Thanks for all the hard work on this from you and @matthew-dean! I had quite a few questions/comments but overall it looks great! Let me know if you have any questions!

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
less/mixins/_grid-framework.less Outdated Show resolved Hide resolved
less/_functions.less Outdated Show resolved Hide resolved
less/_variables.less Outdated Show resolved Hide resolved
less/plugins/breakpoints.js Outdated Show resolved Hide resolved
less/plugins/theme-color-level.js Outdated Show resolved Hide resolved
@matthew-dean matthew-dean mentioned this pull request Dec 9, 2018
seanCodes and others added 17 commits December 15, 2018 18:25
Co-Authored-By: calvinjuarez <[email protected]>
Reverting the name change for now, until @calvinjuarez is able to pull
in the plugin from NPM and alias it. (See [his
comment](seanCodes#14 (comment)
sion_r241965904).)

This change addresses [this PR review
comment](seanCodes#14 (comment)
sion_r239916331).
Reduce the number of changes in the PR to avoid potential bugs.

This change addresses [this PR review comment](seanCodes#14 (comment)).
Match var names used in the Sass version of the mixin.

This change addresses [this PR review comment](seanCodes#14 (comment)).
(instead of including at the end of a line)
Revert deletion of plugin files that add the `color()`, `gray()` and
`theme-color()` functions. Even though Less’ new ruleset accessors could
be used, we’re going to keep them for parity with the Sass version and
for backwards compatibility.

This change addresses [this PR review comment](seanCodes#14).
Revert the conversion the `color()`, `gray()` and `theme-color()`
functions to Less’ ruleset accessors. This change is primarily being
made to keep the syntax as similar to the Sass version as possible, for
easy reference/comparison.

Note that keeping things similar to Sass may prove unnecessary in the
future, so we may go back to accessors, but for now we’ll keep it like
this.

This change addresses [this PR review comment](seanCodes#14).
Instead of pulling the `value` directly from each item in the ruleset,
evaluate the item first to determine the true value of the item. This
fixes the issue where the `value` is actually a var name and what we
want is the the value of the var—not the var name itself.
@calvinjuarez calvinjuarez merged commit 6978579 into seanCodes:master Feb 26, 2019
seanCodes pushed a commit that referenced this pull request Mar 3, 2019
* package – update css-compile script to use --math

--strict-math has been deprecated and replaced by --math.  See less/less.js#3274

* maps – begin converting to DRs

* each – use each() for loops (WIP)

Still haven't updated for the grid breakpoints just yet, though some breakpoint loops have been written in anticipation of those updates.

* breakpoints – fix breakpoint JS after converting to DR maps

* each – replace all #each-* loop with each or #for-*

There are 4 loops in mixins/_grid-framework.less that loop 'til a static number.  I'm not aware of any answer for that at the moment, but a plugin could be easily written that could just leverage `each()`.

* dev, meta – steal nice stuff from #12

Thanks @matthew-dean!

* plugins – fix lint warnings/errors

Except one in breakpoints.js:

```
91:6   warning  Variable 'nextBreakpoint' should be initialized on declaration
```

* _tables – fix .table-responsive output order

See less/less.js#3340

* _navbar – fix .navbar-expand output order

See less/less.js#3340

* README – update to match true min version required

Co-Authored-By: calvinjuarez <[email protected]>

* plugins/theme-color-level – more readable code

Co-Authored-By: calvinjuarez <[email protected]>

* README – replace the other, less easy ways of installing

* _grid-framework – restore comment

See #14 (comment)

* README – wording edits

Co-Authored-By: calvinjuarez <[email protected]>

* _functions – restore commented Sass

* README – more wording edits

Co-Authored-By: calvinjuarez <[email protected]>

* README – remove clone note

per #14 (comment)

* plugins/breakpoints – remove parseUnit(); fix nextBreakpoint ESLint issue

See https://github.com/seanCodes/bootstrap-less-port/pull/14/files/94a03d156dde954caccf58130ebc8fa3adaf397e#r240023403

* rename plugin `keys` → `map-keys`

Reverting the name change for now, until @calvinjuarez is able to pull
in the plugin from NPM and alias it. (See [his
comment](#14 (comment)
sion_r241965904).)

This change addresses [this PR review
comment](#14 (comment)
sion_r239916331).

* _grid-framework – revert loop renaming

Reduce the number of changes in the PR to avoid potential bugs.

This change addresses [this PR review comment](#14 (comment)).

* _transition – revert var renaming

Match var names used in the Sass version of the mixin.

This change addresses [this PR review comment](#14 (comment)).

* breakpoints – put long comments on own line

(instead of including at the end of a line)

* restore color-function plugins

Revert deletion of plugin files that add the `color()`, `gray()` and
`theme-color()` functions. Even though Less’ new ruleset accessors could
be used, we’re going to keep them for parity with the Sass version and
for backwards compatibility.

This change addresses [this PR review comment](#14).

* restore usages of color functions

Revert the conversion the `color()`, `gray()` and `theme-color()`
functions to Less’ ruleset accessors. This change is primarily being
made to keep the syntax as similar to the Sass version as possible, for
easy reference/comparison.

Note that keeping things similar to Sass may prove unnecessary in the
future, so we may go back to accessors, but for now we’ll keep it like
this.

This change addresses [this PR review comment](#14).

* change color functions to handle rulesets vs lists

* fix bug in ruleset-to-map conversion

Instead of pulling the `value` directly from each item in the ruleset,
evaluate the item first to determine the true value of the item. This
fixes the issue where the `value` is actually a var name and what we
want is the the value of the var—not the var name itself.
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