Skip to content

Commit

Permalink
Merge pull request #448 from peterramsing/update-to-latest-versions
Browse files Browse the repository at this point in the history
Update to latest versions and minor cleanup
  • Loading branch information
peterramsing committed May 27, 2022
2 parents 18bb1e7 + 8458e4b commit 7ec741f
Show file tree
Hide file tree
Showing 15 changed files with 1,385 additions and 1,661 deletions.
16 changes: 2 additions & 14 deletions .github/ISSUE_TEMPLATE.md
@@ -1,29 +1,17 @@
*For support questions you might try tweeting me [@lostgrid](https://twitter.com/lostgrid) first.*
_For support questions you might try tweeting me [@lostgrid](https://twitter.com/lostgrid) first._

-----
---

**Is this a feature request or a bug report?**



**What is the current behavior?**



**If it's a bug please provide the steps to reproduce it and maybe some code samples.**



**What is the desired behavior?**



**What's the motivation or use-case behind changing the behavior?**



**What version of LostGrid, browser and browser version are affected by this issue? Did this happen in previous versions?**



**Anything else?**
6 changes: 1 addition & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -1,18 +1,14 @@
**What kind of change is this? (Bug Fix, Feature...)**


**What is the current behavior (You can also link to an issue)**


**What is the new behavior this introduces (if any)**


**Does this introduce any breaking changes?**


**Does the PR fulfill these requirements?**

- [ ] Tests for the changes have been added
- [ ] Docs have been added or updated


**Other Comments**
23 changes: 11 additions & 12 deletions .github/workflows/node.js.yml
Expand Up @@ -13,22 +13,21 @@ on:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [14.x, 16.x, 17.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm test
- run: npm run lint
- run: npm run report-coverage
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm test
- run: npm run lint
- run: npm run report-coverage
5 changes: 5 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx pretty-quick --staged
npm test
5 changes: 5 additions & 0 deletions .prettierignore
@@ -0,0 +1,5 @@
## Ignore docs
docs

## Ignore test to presever some formatting
test
3 changes: 3 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,3 @@
{
"cSpell.words": ["codecov", "lcov"]
}
104 changes: 1 addition & 103 deletions CHANGELOG.md
@@ -1,103 +1 @@
# Changelog
All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](http://semver.org/).

---
## [v8.3.0] - 2018-06-11

### Fixed
- [#406](https://github.com/peterramsing/lost/pull/406) [#370](https://github.com/peterramsing/lost/issues/370) Fixes issue where waffle widths were the wrong width on FF browsers


[Diff with previous version 8.2.1](https://github.com/peterramsing/lost/compare/v8.2.1...v8.3.0)


## [v8.2.1] - 2018-02-28

### Fixed
- [#405](https://github.com/peterramsing/lost/pull/405) Fixed issue where the shorthand override for flexbox wasn't working for the override of the global flexbox setting for `lost-center`.

---

## [v8.2.0] - 2017-07-18

[v8.2 Milestone](https://github.com/peterramsing/lost/milestone/12?closed=1)

There are various bug fixes in here due to increasing the test coverage. Huge props to @BarryThePenguin for [setting up the coverage](https://github.com/peterramsing/lost/pull/368)! A small change but it helped bring to light a fair amount of bugs (the ones listed here are not the only ones see: [#384](https://github.com/peterramsing/lost/pull/384), [#385](https://github.com/peterramsing/lost/pull/385)).


### Updates
- [#381](https://github.com/peterramsing/lost/pull/381) Code Coverage is now 100% Thanks @peterramsing 😳

### Fixed
- [#381](https://github.com/peterramsing/lost/pull/381) Fixed an issue where explicitly setting a custom `lost-column` or `lost-waffle` cycle to zero might not work correctly.
- [`lost-column` Commit](https://github.com/peterramsing/lost/pull/381/commits/fb957f22d42c8e2715d57c5cad3343ccfa73bf5e)
- [`lost-waffle` Commit](https://github.com/peterramsing/lost/pull/381/commits/e1dbbb60f0f697a41fee095a252cc5a0a7483863)
- [#381](https://github.com/peterramsing/lost/pull/381) Fixed an issue where the flexbox long-form for `lost-waffle` woudn't actually set.
- [Commit](https://github.com/peterramsing/lost/pull/381/commits/92fe8f785e29baff20a9fdac038601abe0687cc5)
- [#381](https://github.com/peterramsing/lost/pull/381) Fixed an issue where the long-form `lost-masonry-wrap-gutter` didn't actually do anything. 😳
- [#383/#384](https://github.com/peterramsing/lost/issues/383) Fixed an issue lost-masonry-column does not support no unit on a "0 gutter"
- [#385](https://github.com/peterramsing/lost/pull/385) Fixes issue where long-form flex isn't being set correctly

### Added
- [#389](https://github.com/peterramsing/lost/pull/389) New and improved Variables for using the gutters for other things like padding, etc. Thanks @codebysubtract 💪
- [#396](https://github.com/peterramsing/lost/pull/386) New grid overlay to help visualize your grid. Thanks @codebysubtract 📏


[Diff with previous *minor* version 8.1.0](https://github.com/peterramsing/lost/compare/v8.1.0...v8.2.0)

---

## [v8.1.0] - 2017-07-01

[v8.1 Milestone](https://github.com/peterramsing/lost/milestone/11?closed=1)

### Updates
- [#379](https://github.com/peterramsing/lost/pull/379) Updated to PostCSS version 6.0.2 - Thanks @codebysubtract ☕️

### Fixed
- [#374](https://github.com/peterramsing/lost/pull/374) Fixes issue with `flex-basis` where IE10/11 would not lay out correctly with `lost-column`. - Thanks @finneganh! 🏙

### Added
- [#337](https://github.com/peterramsing/lost/pull/377) `lost-column` not supports decimals without the leading zero. - Thanks @codebysubtract! 🔢
- [#365](https://github.com/peterramsing/lost/pull/365) `lost-center` now supports fractions! - Thanks @codebysubtract 📈
- [#363](https://github.com/peterramsing/lost/pull/363) Add param for `lost-offset` that disables it

### Changed
- [#375](https://github.com/peterramsing/lost/pull/375) Deprecation of Node move methods in postcss is triggering deprecation message "Node#moveTo was deprecated. Use Container#append." - Thanks @thebuilder 🏗

### LostGrid Infrastructure
- [#368](https://github.com/peterramsing/lost/pull/368) Adds NYC and Codecov coverage for reporting - Thanks @BarryThePenguin! 🛰
- [#364](https://github.com/peterramsing/lost/pull/364) Inline docs are removed from the code, see [lostgrid.org](http://lostgrid.org) for docs.


[Diff with previous *minor* version 8.0.0](https://github.com/peterramsing/lost/compare/v8.0.0...v8.1.0)

---

## [v8.0.0] - 2016-12-31
### Fixed
- [#339](https://github.com/peterramsing/lost/issues/233) Fixes issue where `lost-align` was targeting the incorrect element when using flexbox.
- [#329](https://github.com/peterramsing/lost/issues/329) Issue where flex-basis needed to be set for IE 10/11
- Issue where 99.9 pixels could cause issues. You can now use the custom rounder to fine-tune your width to remove pixel rounding issues.

### Changed
- [#343](https://github.com/peterramsing/lost/issues/328) Changes how the `lost-waffle` last element in a row is floated. Before, the last element in a row would be floated right where everything else would float left. This is typically with row based grids, however when using the waffle grid it was a bit strange. This now allows for a param to be used instead if you want the last element to float right and all elements floating left is default.
- ([#184](https://github.com/peterramsing/lost/issues/184))[API Change] Changes the lost-offset to be more intuitive.
This reverses the current api from moving left to right based on negative fractions which didn’t make much sense. This breaks that api’s current functionality and makes it more intuitive.

### Added
- [#345](https://github.com/peterramsing/lost/issues/345) Customizable units for calc (vw).
- In the `master` branch a warning was added for older versions of Node.JS so that there could be a notification for those using older version that it was being dropped in LostGrid version 8. This is included in this release but will probably be removed by the time this is merged into `master`.
- Global and local configuration for setting the "rounder". The default is 99.9% but this can be adapted with a global `@ rounder [insert percent here]` or you can do it on the local level with `lost-column-rounder: 100` rule.

### Removed
- Docs from the README.md file. I'd love to just have one place for these and that's at [lostgrid.org](http://lostgrid.org).

### LostGrid Infrastructure
- Added a way to validate whether or not a unit is valid based on the declaration.
- You're now able to pass a unit into the calcValue instead of the hard-coded %.
- Some [new global logic](https://github.com/peterramsing/lost/commit/9699bfc7e092ff6e2df00fc7861ac5a50c636c8b) for things. I'm a huge fan of breaking things out so they can be reused...LostGrid is in dire need of some breaking out within the codebase. This starts this (and it's been epic already and is starting to simplify things and improve readability.

[Diff with previous *major* version 7.1.1](https://github.com/peterramsing/lost/compare/v7.1.1...v8.0.0)
See changelog here: [GitHub Releases](https://github.com/peterramsing/lost/releases)
15 changes: 9 additions & 6 deletions CONTRIBUTING.md
Expand Up @@ -5,16 +5,18 @@ First off, thanks for wanting to help!
If this is your first time contributing to an Open Source Project, welcome!

## Pre-requisites

1. Ensure what you're writing has test coverage.
2. Lint before you commit *([Yes, Peter's still working on this](https://github.com/peterramsing/lost/commit/293cd9254ce44c28c0a742c62b4e441ce6d07b5b))*
- Don't be like Peter...use the [Git Hook](#git-hooks-for-lostgrid) like he does now. 🤓
- Lint by running `npm run lint`
- Don't worry–the Continuous Integration will enforce this if you forget.
2. Lint before you commit _([Yes, Peter's still working on this](https://github.com/peterramsing/lost/commit/293cd9254ce44c28c0a742c62b4e441ce6d07b5b))_

- Don't be like Peter...use the [Git Hook](#git-hooks-for-lostgrid) like he does now. 🤓
- Lint by running `npm run lint`
- Don't worry–the Continuous Integration will enforce this if you forget.

## Notes
- If this is your first commit/contribution to an open-source project, you got this far and you should feel epic!
- Whenever a PR is submitted, Peter's phone chirps and he does a little dance. 🕺

- If this is your first commit/contribution to an open-source project, you got this far and you should feel epic!
- Whenever a PR is submitted, Peter's phone chirps and he does a little dance. 🕺

Thanks, and don't hesitate to reach out if you have any questions!

Expand All @@ -28,6 +30,7 @@ This was taken from Angular's Material project nearly wholesale. Thanks to them
Read how: [Material2's Wiki](https://github.com/angular/material2/wiki/Pre-commit-hook-for-linters)

`pre-commit` code for LostGrid's linter

```bash
#!/bin/sh

Expand Down
4 changes: 0 additions & 4 deletions README.md
Expand Up @@ -46,10 +46,6 @@ Read the docs on [LostGrid.org](http://lostgrid.org/docs.html)!
- Safari 9+
- Automated browser testing with Selenium is coming soon. 👍

Note: LostGrid no longer supports Node less than 10 (i.e. 8.x, 4.x, etc.) . I'll be following the [Node LTS plan for Node](https://github.com/nodejs/LTS#lts-schedule). Let me know if you any questions. Thanks!

 

### LostGrid Team

- [Peter Ramsing](https://github.com/peterramsing) - Maintainer
Expand Down
1 change: 0 additions & 1 deletion docs/_includes/docs/browser-support.md
Expand Up @@ -18,4 +18,3 @@
- Safari 9+
- Automated browser testing with Selenium is coming soon. 👍

Note: LostGrid no longer supports Node < 8 (i.e. 6.x, 4.x, etc.). I'll be following the [Node LTS plan for Node](https://github.com/nodejs/LTS#lts-schedule). Let me know if you any questions. Thanks!
39 changes: 20 additions & 19 deletions lib/lost-flex-container.js
@@ -1,24 +1,25 @@
module.exports = function lostFlexContainerDecl(css) {
css.walkDecls('lost-flex-container', function lostFlexContainerFunction(
decl
) {
decl.cloneBefore({
prop: 'display',
value: 'flex',
});

if (decl.value === 'column') {
decl.cloneBefore({
prop: 'flex-flow',
value: 'column nowrap',
});
} else {
css.walkDecls(
'lost-flex-container',
function lostFlexContainerFunction(decl) {
decl.cloneBefore({
prop: 'flex-flow',
value: 'row wrap',
prop: 'display',
value: 'flex',
});
}

decl.remove();
});
if (decl.value === 'column') {
decl.cloneBefore({
prop: 'flex-flow',
value: 'column nowrap',
});
} else {
decl.cloneBefore({
prop: 'flex-flow',
value: 'row wrap',
});
}

decl.remove();
}
);
};

0 comments on commit 7ec741f

Please sign in to comment.