Initial commit

This commit is contained in:
ポール ウェッブ 2018-11-27 16:41:30 -06:00
parent 63cadabd3a
commit c5a55f00c4
9 changed files with 135 additions and 22 deletions

9
.editorconfig Normal file
View file

@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

8
.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
# Files
.DS_Store
.env
*.log
.sass-cache
# Directories
node_modules

1
.npmrc Normal file
View file

@ -0,0 +1 @@
package-lock=false

27
LICENSE
View file

@ -1,29 +1,14 @@
BSD 3-Clause License BSD 3-Clause License
Copyright (c) 2018, LBRY Copyright (c) LBRY Inc.
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -1,2 +1,26 @@
# components # @lbry/components
Styling for shared components across LBRY properties Styling for shared components across LBRY properties
### Installation
```bash
$ npm i @lbry/components sass -D SOON
```
We recommend using this module with [Dart Sass](https://www.npmjs.com/package/sass) for its' focus on speed and low dependency count.
If you are using `@lbry/components`, you can safely remove [@lbry/color](https://github.com/lbryio/color) if you've already included it separately (this module includes it by default).
### Usage
TBD
### License
[BSD-3-Clause](LICENSE) Copyright (c) LBRY Inc.

33
package.json Normal file
View file

@ -0,0 +1,33 @@
{
"author": {
"email": "paul+github@lbry.io",
"name": "Paul Anthony Webb"
},
"bugs": {
"url": "https://github.com/lbryio/components/issues"
},
"description": "Styling for shared components across LBRY properties",
"devDependencies": {
"@inc/sasslint-config": "^1.1.1",
"@lbry/color": "^1.0.5",
"npm-run-all": "^4.1.5",
"sass": "^1.15.1",
"sass-lint": "^1.12.1",
"updates": "^5.3.0"
},
"homepage": "https://github.com/lbryio/components#readme",
"license": "BSD-3-Clause",
"name": "@lbry/components",
"repository": {
"type": "git",
"url": "https://github.com/lbryio/components.git"
},
"scripts": {
"sass:dev": "sass --load-path=node_modules --watch sass:dist --style compressed",
"sass:prod": "sass --load-path=node_modules --update sass:dist --style compressed",
"test": "run-s test:*",
"test:dependencies": "updates --update ./",
"test:sass": "sass-lint --config ./node_modules/@inc/sasslint-config/config.json --verbose --no-exit"
},
"version": "1.0.1"
}

7
sass/init/_mixins.scss Normal file
View file

@ -0,0 +1,7 @@
// Use CSS variables without upsetting Sass-Lint
// https://github.com/sasstools/sass-lint/issues/1161#issuecomment-390537190
@mixin root-prop($prop: null, $value: null) {
@if ($prop and $value) {
#{$prop}: $value;
}
}

41
sass/init/_variables.scss Normal file
View file

@ -0,0 +1,41 @@
:root {
@include root-prop(--spacing-xxs, 0.2rem);
@include root-prop(--spacing-xs, 0.4rem);
@include root-prop(--spacing-s, 0.8rem);
@include root-prop(--spacing-m, 1.6rem);
@include root-prop(--spacing-l, 2.4rem);
@include root-prop(--spacing-xl, 3.2rem);
@include root-prop(--spacing-xxl, 6.4rem);
// 12:5
@include root-prop(--aspect-ratio-bluray, 41.6666666667%);
// 11:4
@include root-prop(--aspect-ratio-panavision, 36.3636363636%);
// 4:3
@include root-prop(--aspect-ratio-sd, 75%);
// 16:9
@include root-prop(--aspect-ratio-standard, 56.25%);
// --spacing-xxs: 0.2rem;
// --spacing-xs: 0.4rem;
// --spacing-s: 0.8rem;
// --spacing-m: 1.6rem;
// --spacing-l: 2.4rem;
// --spacing-xl: 3.2rem;
// --spacing-xxl: 6.4rem;
// // 12:5
// --aspect-ratio-bluray: 41.6666666667%;
// // 11:4
// --aspect-ratio-panavision: 36.3636363636%;
// // 4:3
// --aspect-ratio-sd: 75%;
// // 16:9
// --aspect-ratio-standard: 56.25%;
}

5
sass/style.scss Normal file
View file

@ -0,0 +1,5 @@
@charset "utf-8";
@import "@lbry/color/lbry-color";
@import "init/mixins";
@import "init/variables";