-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from timhettler/feat/v2
feat: v2
- Loading branch information
Showing
65 changed files
with
9,745 additions
and
787 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
build: | ||
name: Smoke Tests | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: "yarn" | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Generate Docs | ||
run: yarn generate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,19 @@ | ||
# Numerous always-ignore extensions | ||
*.diff | ||
*.err | ||
*.orig | ||
*.log | ||
*.rej | ||
*.swo | ||
*.swp | ||
*.vi | ||
*~ | ||
*.sass-cache | ||
*.iml | ||
*.gem | ||
.bundle | ||
*.lock | ||
|
||
# Package folders | ||
node_modules | ||
bower_components | ||
|
||
# OS or Editor folders | ||
.DS_Store | ||
Thumbs.db | ||
.cache | ||
.project | ||
.settings | ||
.tmproj | ||
.gitconfig | ||
*.esproj | ||
nbproject | ||
*.sublime-project | ||
*.sublime-workspace | ||
*.pem | ||
|
||
# Folders to ignore | ||
.hg | ||
.svn | ||
.CVS | ||
intermediate | ||
publish | ||
.idea | ||
build | ||
test/output | ||
test/output | ||
|
||
# yarn | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
!.* | ||
.git/ | ||
.vscode/ | ||
.yarn/ | ||
.yarnrc | ||
demo/ | ||
sassdoc/ | ||
node_modules/ | ||
**/*.scss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# See https://stylelint.io/user-guide/rules/list | ||
# Also https://github.com/kristerkari/stylelint-scss#list-of-rules | ||
|
||
extends: | ||
- stylelint-config-standard-scss | ||
- stylelint-prettier/recommended | ||
plugins: | ||
- stylelint-prettier | ||
|
||
ignoreFiles: | ||
- "test/**/*.*" | ||
|
||
rules: | ||
# Default rules: | ||
# - https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/index.js | ||
# - https://github.com/stylelint-scss/stylelint-config-recommended-scss/blob/master/index.js | ||
# - https://github.com/stylelint/stylelint-config-standard/blob/main/index.js | ||
# - https://github.com/stylelint/stylelint-config-recommended/blob/main/index.js | ||
# - https://github.com/prettier/stylelint-config-prettier/blob/master/src/index.js | ||
|
||
# Sass | ||
scss/at-function-pattern: | ||
- "^([_|-]*[a-z][a-z0-9]*)(-[a-z0-9]+)*-*$" | ||
- message: "Expected function to be kebab-case" | ||
scss/at-mixin-pattern: | ||
- "^([_|-]*[a-z][a-z0-9]*)(-[a-z0-9]+)*-*$" | ||
- message: "Expected mixin to be kebab-case" | ||
scss/at-rule-conditional-no-parentheses: null | ||
scss/dollar-variable-pattern: | ||
- "^([_|-]*[a-z][a-z0-9]*)(-[a-z0-9]+)*-*$" | ||
- message: "Expected variable to be kebab-case" | ||
|
||
# Disable for Prettier | ||
scss/at-else-closing-brace-newline-after: null | ||
scss/at-else-closing-brace-space-after: null | ||
scss/at-else-empty-line-before: null | ||
scss/at-else-if-parentheses-space-before: null | ||
scss/at-function-parentheses-space-before: null | ||
scss/at-if-closing-brace-newline-after: null | ||
scss/at-if-closing-brace-space-after: null | ||
scss/at-mixin-parentheses-space-before: null | ||
scss/dollar-variable-colon-newline-after: null | ||
scss/dollar-variable-colon-space-after: null | ||
scss/dollar-variable-colon-space-before: null | ||
scss/operator-no-newline-after: null | ||
scss/operator-no-newline-before: null | ||
scss/operator-no-unspaced: null |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
yarnPath: .yarn/releases/yarn-3.3.1.cjs | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Sass YIQ CHANGELOG | ||
|
||
## 2.0.0 (01/25/22) | ||
|
||
- BREAKING: Package name is now scoped: `@timhettler/sass-yiq` | ||
- BREAKING: Switch to Dart Sass with Sass module system, dropping support for Node Sass. | ||
- BREAKING: Move `sass` to `peerDependencies`. | ||
- BREAKING: Drop `yiq-` from variable, module, and function names. Projects not using Sass modules can still `@import '<path>/@timhettler/sass-yiq/sass/yiq'` to access the former names. | ||
- BREAKING: Removed Bower support. | ||
- BREAKING: Removed Sache support. | ||
- FEATURE: Added `\_index.scss` at the project root, for simpler import path: @use '<path>/@timhettler/sass-yiq' | ||
- INTERNAL: Remove Grunt(!) | ||
- INTERNAL: Update dev dependencies and package manager |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) [year] [fullname] | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,33 @@ | ||
# YIQ Color Contrast | ||
|
||
The obvious way to determe whether a color is "light" or "dark" by checking the lightness value in the HSL color space. this approach works sometimes, but often produces color pairings that - while technically correct - just look a little "off". The reason for this is that the eye is more sensitive to changes in the orange-blue range than in the purple-green range, so the percieved lightness of a color can change depending its wavelength. | ||
Most approaches to checking color contrast use the HSL color space. This often produces color pairings that - while technically correct - look just a little "off". The reason for this is that the eye is more sensitive to changes in the orange-blue range than in the purple-green range, so the percieved lightness of a color can change depending its wavelength. | ||
|
||
The YIQ color space is designed to take this bias into account. It weighs the different parts of the color according to their impact on our perpection of the color's brightness. By utilizing this color space when doing contrast comparison, the result is a color pairing that appears more natural. | ||
The YIQ color space is designed to take this bias into account. It weighs the different parts of the color according to their impact on our perpection of the color's brightness. Color pairings appear more natural when utilizing this color space for contrast comparisons. | ||
|
||
For information on color contrast and the YIQ color space: | ||
|
||
* [**24 Ways:** Calculating Color Contrast](http://24ways.org/2010/calculating-color-contrast/) | ||
* [**W3C:** Ensure that foreground and background color combinations provide sufficient contrast when viewed by someone having color deficits or when viewed on a black and white screen](http://www.w3.org/TR/AERT#color-contrast) | ||
* [**Wikipedia:** YIQ](http://en.wikipedia.org/wiki/YIQ) | ||
- [**24 Ways:** Calculating Color Contrast](http://24ways.org/2010/calculating-color-contrast/) | ||
- [**W3C:** Ensure that foreground and background color combinations provide sufficient contrast when viewed by someone having color deficits or when viewed on a black and white screen](http://www.w3.org/TR/AERT#color-contrast) | ||
- [**Wikipedia:** YIQ](http://en.wikipedia.org/wiki/YIQ) | ||
|
||
## Installation options | ||
## Demo | ||
|
||
### NPM | ||
Compare YIQ color contrast to HSL color contrast: http://timhettler.github.io/sass-yiq/demo/ | ||
|
||
``` | ||
npm install sass-yiq | ||
``` | ||
## Installation | ||
|
||
### Bower | ||
|
||
``` | ||
bower install sass-yiq | ||
``` | ||
``` | ||
yarn add @timhettler/sass-yiq | ||
``` | ||
|
||
## Usage & Configuration | ||
|
||
```scss | ||
@import 'sass-yiq' | ||
``` | ||
|
||
Details on available variables, functions, and mixins can be found in the [SassDoc documentation](http://timhettler.github.io/sass-yiq/sassdoc) | ||
```scss | ||
@use "@timhettler/sass-yiq" as yiq; | ||
|
||
### Demo | ||
.container { | ||
@include yiq.contrasted(#fa5400, #000, #fff); | ||
} | ||
``` | ||
|
||
Check out how the YIQ color contrast compares to HSL color contrast: http://timhettler.github.io/sass-yiq/demo/ | ||
Details on available variables, functions, and mixins can be found in the [SassDoc documentation](http://timhettler.github.io/sass-yiq/sassdoc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@forward "sass/yiq"; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.