Skip to content

Commit b1a36e7

Browse files
Fix some vertical alignment issues, Safari style issues, select and checkbox now uses the primary color (#830)
* Remove unused rules * Use primary variable * Set border-radius 0 on input to fix issue on Safari where input id appeared rounded and fix the color picker to be rectangle instead of ovale on Safari * Use custom checkbox style so it appears the same on Chrome, Firefox, Safari with the correct primary color * Specify a .select__option--is-selected rule to use the correct primary color in camera select * Fix vertical alignment issues with entityPrint and icons rendered in scene graph and sidebar header, fix search input to make the scene graph horizontal scroll disappear * Increase font-weight for .propertyRowDefined to be more visible
1 parent d47f597 commit b1a36e7

4 files changed

Lines changed: 49 additions & 63 deletions

File tree

src/style/components.styl

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,6 @@
3939
font-size 13px
4040
&:hover
4141
background $bglighter
42-
/*
43-
.collapsible
44-
&.collapsed
45-
background-color $grayalt
46-
.static,
47-
.componentHeaderActions
48-
color #dedede
49-
&:hover
50-
background-color $grayhover
51-
*/
52-
.collapsible .menu
53-
text-align right
54-
55-
.collapsible .menuafter
56-
color #bbb
57-
content '\2807'
58-
font-size 12px
59-
padding 5px
60-
text-align right
6142

6243
.collapsible .static
6344
margin 0
@@ -127,7 +108,7 @@
127108
input.string,
128109
input.number
129110
background $bgdark
130-
color #1faaf2
111+
color $primary
131112
min-height 26px
132113
padding-bottom 1px
133114
padding-left 5px
@@ -145,23 +126,17 @@
145126
input.string:focus
146127
box-shadow none
147128

129+
.color-widget *
130+
vertical-align middle
131+
148132
.color_value
149133
margin 0 0 0 5px
150134
width 68px
151135
letter-spacing 1px
152136

153137
.propertyRowDefined .text
154138
color #FAFAFA
155-
font-weight 500
156-
157-
.components *
158-
vertical-align middle
159-
160-
span.subcomponent
161-
color #999
162-
float none !important
163-
margin-left 10px
164-
vertical-align top !important
139+
font-weight 600
165140

166141
#addComponentContainer
167142
align-items center
@@ -195,7 +170,7 @@ span.subcomponent
195170

196171
#componentEntityHeader
197172
.collapsible-header
198-
bottom 4px
173+
bottom 5px
199174
position relative
200175
.collapse-button
201176
display none
@@ -206,7 +181,6 @@ span.subcomponent
206181
padding-left 5px
207182
.entityName
208183
max-width 160px
209-
top 0
210184
.entityIcons
211185
color #FAFAFA
212186

@@ -220,4 +194,4 @@ span.subcomponent
220194
width 120px
221195

222196
#componentEntityHeader .gltfIcon img
223-
top 0
197+
top 4px

src/style/index.styl

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,33 @@ body.aframe-inspector-opened
174174
input.number
175175
min-height 14px
176176
outline none
177+
border-radius 0
177178

178179
input[type="checkbox"]
179-
appearance auto
180+
appearance none
180181
cursor pointer
181182
margin 0
182183
height 18px
183184
width 18px
185+
border 1px solid $white
186+
border-radius 0
187+
background transparent
188+
position relative
189+
190+
&:checked
191+
border 1px solid $primary
192+
background $primary
193+
194+
&::after
195+
content ''
196+
position absolute
197+
left 5px
198+
top 1px
199+
width 4px
200+
height 9px
201+
border solid white
202+
border-width 0 2px 2px 0
203+
transform rotate(45deg)
184204

185205
input[type="checkbox"]:focus
186206
box-shadow none
@@ -195,7 +215,7 @@ body.aframe-inspector-opened
195215

196216
input.string:focus,
197217
input.number:focus
198-
border 1px solid #1faaf2
218+
border 1px solid $primary
199219

200220
input.error
201221
border 1px solid #a00
@@ -204,9 +224,6 @@ body.aframe-inspector-opened
204224
background $bg
205225
width 331px
206226

207-
#sidebar *
208-
vertical-align middle
209-
210227
input,
211228
textarea,
212229
select
@@ -235,6 +252,7 @@ body.aframe-inspector-opened
235252

236253
input[type=color]::-webkit-color-swatch-wrapper
237254
padding 0 /* To remove the inner padding. */
255+
border-radius 0 /* So it appears as rectangle instead of an ovale in Safari */
238256

239257
input[type=color]::-moz-color-swatch
240258
border 0

src/style/scenegraph.styl

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@
2828

2929
.entity
3030
background $bg
31+
box-sizing border-box
3132
cursor pointer
3233
display flex
34+
gap 6px
3335
justify-content space-between
36+
align-items center
37+
line-height 1em
3438
padding 3px
3539
width 100%
3640
white-space nowrap
@@ -41,10 +45,10 @@
4145
&.active
4246
background-color #155373
4347
color #fff
44-
.component:hover
45-
color #1888c1
4648
.entityActions
47-
display inline
49+
align-items center
50+
display flex
51+
padding-right 2px
4852

4953
&.novisible
5054
&.active
@@ -62,14 +66,13 @@
6266
color #626262
6367

6468
.component:hover
65-
color #1faaf2
69+
color $primary
6670

6771
.entityIcons
6872
margin-left 2px
6973

7074
.entityActions
7175
display none
72-
margin 0 14px
7376

7477
.button
7578
color #fff
@@ -80,7 +83,8 @@
8083
color #CCC
8184

8285
.toolbarActions svg:hover,
83-
.entityActions svg:hover
86+
.entityActions svg:hover,
87+
.search a.button svg:hover
8488
color $primary
8589

8690
.active svg
@@ -98,24 +102,22 @@
98102
text-align center
99103
width 14px
100104

101-
.fa-eye
102-
color #bbb
103-
104105
.icons a.button
105106
color #fff
106107

107108
.search
108109
padding 5px
109110
font-size 16px
110111
position relative
112+
display flex
111113

112114
input
113115
color $white
114116
background $bgdark
115-
border-radius 5px
116-
height 22px
117-
text-indent 10px
118-
width 216px
117+
border-radius 0
118+
box-sizing border-box
119+
padding 5px 10px
120+
width 100%
119121

120122
>svg, a.button
121123
position absolute
@@ -134,15 +136,3 @@
134136
overflow-y auto
135137
padding 0
136138
width 230px
137-
138-
.scenegraph-bottom
139-
background-color #323232
140-
border-top 1px solid #111
141-
bottom 10
142-
height 40px
143-
left 0
144-
z-index 100
145-
146-
a
147-
float right
148-
margin 10px

src/style/select.styl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
.select__option--is-focused
4444
background #155373
4545

46+
.select__option--is-selected
47+
background $primary
48+
color $white
49+
4650
.select__value-container
4751
height 26px
4852
position static

0 commit comments

Comments
 (0)