Skip to content

Commit 098826e

Browse files
committed
moved to parcel
1 parent 51dbcce commit 098826e

File tree

7 files changed

+3354
-3167
lines changed

7 files changed

+3354
-3167
lines changed

index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<!DOCTYPE html >
22
<html lang="en-US">
33
<head>
4-
<title>Scratch</title>
5-
<link rel="stylesheet" type="text/css" href="bundle.css">
4+
<title>Scratch UI</title>
65
</head>
76
<body>
87
<h1>Do you see nice input field?</h1>
98
<br>
10-
<input type="text" class="big field">
11-
<script type="text/javascript" src="bundle.js"></script>
9+
<input type="text" class="ui big field">
10+
<button class="ui big button">Search</button>
11+
12+
<script type="text/javascript" src="./index.js"></script>
1213
</body>
1314
</html>

lib/form/checkbox.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
line-height: 1;
1818
position: relative;
1919

20-
> input {
20+
& > input {
2121
position: absolute;
2222
top: 0; left: 0;
2323
width: 100%;
2424
height: 100%;
2525
opacity: 0;
2626
}
2727

28-
> span {
28+
& > span {
2929
position: relative;
3030
color: var(--checkbox-label-color);
3131
transition: ease var(--checkbox-transition-duration) color;
@@ -41,7 +41,7 @@
4141
transition: ease var(--checkbox-transition-duration) background;
4242
}
4343

44-
.icon {
44+
& .icon {
4545
width: 0;
4646
font-size: var(--field-font-size-tiny);
4747
position: absolute;
@@ -54,7 +54,7 @@
5454
}
5555
}
5656

57-
> input:checked {
57+
& > input:checked {
5858
& + span {
5959
color: var(--checkbox-label-active-color);
6060

lib/form/config.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
:root {
22
/* unit */
3-
--field-unit: var(--unit);
3+
--field-unit: var(--sizing-unit);
44

55
/* sequence */
66
--field-height-sequence: var(--minor-third);
77
--field-height-base: 2.4;
8-
--field-height: var(--field-height-base)var(--field-unit);
8+
--field-height: calc(
9+
var(--field-height-base) * var(--field-unit)
10+
);
911

1012
/* heighs */
1113
--field-height-tiny: calc(var(--field-height-small) /

lib/form/textarea.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
:root {
22
--textarea-min-height-base: 18;
3-
--textarea-min-height: var(--textarea-min-height-base)var(--unit);
3+
--textarea-min-height: calc(
4+
var(--textarea-min-height-base) * var(--sizing-unit)
5+
);
46

57
--textarea-min-width-base: 56;
6-
--textarea-min-width: var(--textarea-min-width-base)var(--unit);
8+
--textarea-min-width: calc(
9+
var(--textarea-min-width-base) * var(--sizing-unit)
10+
);
711
}
812

913
.ui.flexible.field {

package.json

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
11
{
22
"name": "@scratch-css/ui",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "",
55
"main": "lib/index.css",
66
"scripts": {
7-
"start": "webpack-dev-server",
8-
"dev": "webpack-dev-server --watch",
9-
"build": "webpack",
10-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"start": "parcel index.html --no-cache",
8+
"build": "parcel build index.html",
9+
"deploy": "yarn build && gh-pages -d dist"
1110
},
1211
"author": "",
1312
"license": "",
1413
"dependencies": {
1514
"@scratch-css/scratch": "^1.0.0"
1615
},
1716
"devDependencies": {
18-
"babel-core": "^6.14.0",
19-
"babel-loader": "^6.2.5",
20-
"babel-plugin-transform-class-properties": "^6.11.5",
21-
"babel-preset-es2015": "^6.14.0",
22-
"css-loader": "^0.25.0",
23-
"extract-text-webpack-plugin": "^1.0.1",
24-
"postcss-cssnext": "^2.8.0",
25-
"postcss-import": "^8.1.2",
26-
"postcss-loader": "^0.13.0",
27-
"postcss-url": "^5.1.2",
28-
"precss": "^1.4.0",
29-
"style-loader": "^0.13.1",
30-
"webpack": "^1.13.2",
31-
"webpack-dev-server": "^1.15.1"
17+
"gh-pages": "^2.0.1",
18+
"parcel-bundler": "^1.12.3",
19+
"postcss-preset-env": "^6.7.0"
20+
},
21+
"browserslist": [
22+
"last 1 version",
23+
"> 1%"
24+
],
25+
"postcss": {
26+
"plugins": {
27+
"postcss-preset-env": {
28+
"stage": 0
29+
}
30+
}
3231
}
3332
}

webpack.config.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)