Skip to content

Commit

Permalink
fix(styling): fix unwanted top range control alignment in module insp…
Browse files Browse the repository at this point in the history
…ector (#806)
  • Loading branch information
2xAA authored Jan 4, 2023
1 parent 07ac0a0 commit 0082450
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/components/ActiveModule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}"
>
<c span="2">Alpha</c>
<c span="4">
<c span="4" class="active-module__alpha-input">
<Range
value="1"
min="0"
Expand Down
6 changes: 6 additions & 0 deletions src/components/Control.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,10 @@ input[type="number"] {
color: #fff;
padding: 2px 3px;
}
.input {
display: flex;
align-items: center;
height: 100%;
}
</style>
4 changes: 2 additions & 2 deletions src/components/Controls/CollapsibleControl.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<fragment>
<div>
<c span="1.." class="label-row" :class="{ disabled }">
<grid columns="4">
<c span="1">
Expand All @@ -15,7 +15,7 @@
</c>

<slot name="body" v-if="!disabled && open" />
</fragment>
</div>
</template>

<script>
Expand Down
1 change: 1 addition & 0 deletions src/components/Controls/RangeControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -382,5 +382,6 @@ div {
height: 16px;
display: inline-block;
vertical-align: top;
line-height: 0;
}
</style>
4 changes: 2 additions & 2 deletions src/components/Controls/Vec2DControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@mousedown.stop="focusInput('0', 'x')"
>
<c span="1+1">X</c>
<c span="3">
<c span="3" class="input">
<RangeControl
:min="-1"
:max="1"
Expand All @@ -26,7 +26,7 @@
@mousedown.stop="focusInput('1', 'y')"
>
<c span="1+1">Y</c>
<c span="3">
<c span="3" class="input">
<RangeControl
:min="-1"
:max="1"
Expand Down
1 change: 0 additions & 1 deletion src/components/inputs/Number.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ input {
padding: 0 4px;
box-sizing: border-box;
width: 100%;
vertical-align: top;
}
</style>
16 changes: 12 additions & 4 deletions src/components/inputs/Range.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<template>
<RightClickNumberInput v-bind="$props" @input="handleNumberInput">
<input
<RightClickNumberInput
v-bind="$props"
@input="handleNumberInput"
class="range-control__number"
><input
type="range"
@input="$emit('input', parseFloat($event.target.value, 10))"
v-bind="$props"
/>
</RightClickNumberInput>
/></RightClickNumberInput>
</template>

<script>
Expand Down Expand Up @@ -36,6 +38,12 @@ export default {
</script>

<style scoped>
.range-control__number {
width: 100%;
height: 16px;
display: flex;
}
input {
-webkit-appearance: none;
background: transparent;
Expand Down

0 comments on commit 0082450

Please sign in to comment.