Skip to content
This repository was archived by the owner on May 15, 2022. It is now read-only.

Commit fa59c4f

Browse files
Removed custom styling from DatBoolean component and fixed minor style issues
1 parent 0c267bf commit fa59c4f

21 files changed

+83
-267
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Release Notes
22

3+
## (2017-10-08) `v0.0.21`
4+
5+
### Changed
6+
7+
* Removed custom check box styling from `DatBoolean` component
8+
* Ensured sliders are the same height as number inputs
9+
* Minor style changes for consistency
10+
311
## (2017-10-08) `v0.0.20`
412

513
### Changed

build/react-dat-gui.css

Lines changed: 12 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/react-dat-gui.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6384,16 +6384,7 @@ var DatBoolean = function (_Component) {
63846384
type: 'checkbox',
63856385
checked: this.state.value,
63866386
onChange: this.handleChange
6387-
}),
6388-
_react2.default.createElement(
6389-
'div',
6390-
{ className: 'checkbox' },
6391-
_react2.default.createElement(
6392-
'svg',
6393-
{ className: 'checkmark', xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 50 50' },
6394-
_react2.default.createElement('path', { d: 'M0,0L50,50M50,0L0,50Z' })
6395-
)
6396-
)
6387+
})
63976388
)
63986389
);
63996390
}

build/react-dat-gui.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/src/chrome-experiments.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
@charset "UTF-8";
22

3+
html {
4+
box-sizing: border-box;
5+
}
6+
*, *:before, *:after {
7+
box-sizing: inherit;
8+
}
9+
310
/**
411
* @see https://workshop.chromeexperiments.com/css/examples.css
512
*/

dev/src/react-dat-gui/components/DatBoolean.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ export default class DatBoolean extends Component {
5353
checked={this.state.value}
5454
onChange={this.handleChange}
5555
/>
56-
<div className="checkbox">
57-
<svg className="checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
58-
<path d="M0,0L50,50M50,0L0,50Z" />
59-
</svg>
60-
</div>
6156
</label>
6257
</li>
6358
);

dev/src/react-dat-gui/style/_boolean.scss

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,17 @@
22
position: relative;
33
border-left: $border-left-size solid $boolean-color;
44

5+
label {
6+
cursor: pointer;
7+
}
8+
59
.label-text {
610
display: block;
711
padding: 5px 0;
8-
width: calc(100% - 2em);
9-
}
1012

11-
.checkbox,
12-
input[type=checkbox] {
13-
position: absolute;
14-
top: 1px;
15-
right: 2px;
16-
bottom: 1px;
17-
width: 2em;
18-
}
19-
20-
.checkbox {
21-
display: flex;
22-
align-items: center;
23-
justify-content: center;
24-
border: 3px solid $background-color;
25-
background: $input-color;
26-
z-index: 0;
27-
28-
> .checkmark {
29-
display: none;
30-
width: 0.6em;
31-
height: 0.6em;
32-
stroke-width: 7px;
33-
stroke: lighten($boolean-color, 20%);
34-
}
3513
}
3614

3715
input[type=checkbox] {
38-
height: calc(100% - 4px);
3916
margin: 0;
40-
opacity: 0;
41-
z-index: 1;
42-
}
43-
44-
input[type=checkbox]:hover ~ .checkbox {
45-
background-color: lighten($input-color, $hover-lighten);
46-
}
47-
48-
input[type=checkbox]:checked ~ .checkbox {
49-
> .checkmark {
50-
display: block;
51-
}
5217
}
5318
}

dev/src/react-dat-gui/style/_color.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
.popover {
1515
position: absolute;
1616
z-index: 2;
17-
right: 4px;
17+
right: 5px;
1818
}
1919

2020
.cover {
@@ -27,11 +27,11 @@
2727

2828
.picker {
2929
background: '#fff';
30-
border-radius: 2px;
3130
box-shadow: 0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3);
3231
box-sizing: initial;
3332
width: auto;
3433
font-family: 'Menlo';
34+
margin-top: -3px;
3535

3636
.body {
3737
padding: 0px;
@@ -58,7 +58,6 @@
5858
width: 100%;
5959
padding-bottom: 55%;
6060
position: relative;
61-
border-radius: 2px 2px 0 0;
6261
overflow: hidden;
6362

6463
.saturation {
@@ -82,7 +81,6 @@
8281
input {
8382
font-size: 11px;
8483
color: #333;
85-
width: 100%;
8684
border-radius: 2px;
8785
border: none;
8886
box-shadow: inset 0 0 0 1px #dadada;

dev/src/react-dat-gui/style/_main.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
label {
6161
display: flex;
62-
align-items: baseline;
62+
align-items: center;
6363
justify-content: flex-start;
6464
width: 100%;
6565
padding: 1px 2px 1px 8px;

dev/src/react-dat-gui/style/_number.scss

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@
1515
background-size: 0% 100%;
1616
background-repeat: no-repeat;
1717
cursor: ew-resize;
18-
19-
&:before {
20-
content: '\A0';
21-
display: block;
22-
padding: 2px;
23-
}
18+
height: 25px;
2419
}
2520
}

0 commit comments

Comments
 (0)